-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Description
Background
Currently, the logger parameter in Trainer has the type Union[LightningLoggerBase, Iterable[LightningLoggerBase], bool]. The correct way to specify no logger is to say logger=False, however previously logger=None would work too (if ignoring type-checking errors).
A recent refactor #11920 changed the behavior such that logger=None results in errors, however this was not seen as an issue at the time because it was undefined behavior. We have since discovered that logger=None was being used in some places, so a fix has been made #12249.
Originally posted by @akashkw in #12249 (comment)
Discussion Questions
What approach should we take here? Should we:
- Change the type of
loggerto beOptional[Union[LightningLoggerBase, Iterable[LightningLoggerBase], bool]] - Insist that users pass in the correct types
cc @awaelchli @edward-io @Borda @ananthsub @rohitgr7 @kamil-kaczmarek @Raalsky @Blaizzy @justusschock @kaushikb11
daniellepintz