-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate logger=bool
#15662
Deprecate logger=bool
#15662
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very excited for this, thanks!
src/pytorch_lightning/trainer/connectors/logger_connector/logger_connector.py
Outdated
Show resolved
Hide resolved
tests/tests_pytorch/test_cli.py
Outdated
cli = LightningCLI( | ||
BoringModel, | ||
BoringDataModule, | ||
subclass_mode_model=True, | ||
subclass_mode_data=True, | ||
trainer_defaults={"callbacks": LearningRateMonitor()}, | ||
save_config_kwargs={"overwrite": True}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed one small annoyance. If a logger is not set (which would write configs to a new version_x
directory), then passing a config forces the user to overwrite it even if the contents are the same.
Maybe we should avoid the error if they would be equal. cc @mauvilsa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure what you mean. If no logger is set by the user, then in the saved config the value will be null
. Why is it that the user is forced to overwrite?
@@ -765,7 +765,7 @@ def test_dataloader(self): | |||
return [super().test_dataloader(), super().test_dataloader()] | |||
|
|||
model = CustomBoringModel() | |||
trainer = Trainer(default_root_dir=tmpdir, limit_test_batches=1) | |||
trainer = Trainer(default_root_dir=tmpdir, limit_test_batches=1, logger=TensorBoardLogger(tmpdir)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@awaelchli Should we also look into making save_dir
None by default so that it can be replaced with Trainer.default_root_dir
at setup time? (not in this PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what you mean. It is already like this: If user does not set save dir in the logger, trainer will log to default root dir
3ab20e8
to
dc7353d
Compare
af6bd31
to
c6598dd
Compare
What does this PR do?
Fixes #9900
Does your PR introduce any breaking changes? If yes, please list them.
None
Before submitting
PR review