Skip to content
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

Closed
wants to merge 26 commits into from
Closed

Deprecate logger=bool #15662

wants to merge 26 commits into from

Conversation

carmocca
Copy link
Contributor

@carmocca carmocca commented Nov 12, 2022

What does this PR do?

Fixes #9900

Does your PR introduce any breaking changes? If yes, please list them.

None

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

@carmocca carmocca added deprecation Includes a deprecation logger: tensorboard trainer: argument pl Generic label for PyTorch Lightning package labels Nov 12, 2022
@carmocca carmocca added this to the v1.9 milestone Nov 12, 2022
@carmocca carmocca self-assigned this Nov 12, 2022
Copy link

@JacobHayes JacobHayes left a 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!

cli = LightningCLI(
BoringModel,
BoringDataModule,
subclass_mode_model=True,
subclass_mode_data=True,
trainer_defaults={"callbacks": LearningRateMonitor()},
save_config_kwargs={"overwrite": True},
Copy link
Contributor Author

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

Copy link
Contributor

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))
Copy link
Contributor Author

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)

Copy link
Contributor

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

@carmocca carmocca force-pushed the deprecate/logger-bool branch from 3ab20e8 to dc7353d Compare November 12, 2022 22:38
@carmocca carmocca force-pushed the deprecate/logger-bool branch from af6bd31 to c6598dd Compare November 12, 2022 23:15
@carmocca carmocca changed the title [WIP] Deprecate logger=bool Deprecate logger=bool Nov 13, 2022
@carmocca carmocca mentioned this pull request Nov 13, 2022
12 tasks
@carmocca carmocca closed this Dec 10, 2022
@carmocca carmocca deleted the deprecate/logger-bool branch December 10, 2022 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation Includes a deprecation logger: tensorboard pl Generic label for PyTorch Lightning package trainer: argument
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Make tensorboard into an pip extra
5 participants