Skip to content

Conversation

@tshu-w
Copy link
Contributor

@tshu-w tshu-w commented Aug 20, 2022

What does this PR do?

Fixes #12748 make sure WandbLogger save_dir set after creation.

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

No.

Test

from pytorch_lightning.cli import LightningCLI

from pytorch_lightning.demos.boring_classes import DemoModel, BoringDataModule

class LitCLI(LightningCLI):
    def before_instantiate_classes(self) -> None:
        print(self.config[self.subcommand].trainer.logger)

def run():
    cli = LitCLI(
        DemoModel,
        BoringDataModule,
        trainer_defaults={"max_epochs": 2},
        save_config_callback=False,
    )


if __name__ == "__main__":
    run()
python cli.py fit --trainer.logger WandbLogger

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

Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

  • 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

Did you have fun?

Make sure you had fun coding 🙃

@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Aug 20, 2022
@tshu-w tshu-w marked this pull request as draft August 20, 2022 15:23
@tshu-w tshu-w marked this pull request as ready for review September 3, 2022 07:15
@carmocca carmocca added bug Something isn't working logger: wandb Weights & Biases labels Sep 3, 2022
@carmocca carmocca added this to the pl:1.7.x milestone Sep 3, 2022
@mergify mergify bot added ready PRs ready to be merged has conflicts and removed ready PRs ready to be merged labels Sep 3, 2022
@mergify mergify bot added ready PRs ready to be merged and removed has conflicts labels Sep 5, 2022
@mergify mergify bot added ready PRs ready to be merged and removed ready PRs ready to be merged labels Sep 5, 2022
@awaelchli awaelchli enabled auto-merge (squash) September 5, 2022 09:30
@awaelchli awaelchli merged commit 23f0e20 into Lightning-AI:master Sep 5, 2022
@tshu-w tshu-w deleted the fix-12748 branch September 5, 2022 10:42
krshrimali pushed a commit that referenced this pull request Sep 6, 2022
…4326)

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
krshrimali pushed a commit that referenced this pull request Sep 6, 2022
…4326)

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
lexierule pushed a commit that referenced this pull request Sep 6, 2022
…4326)

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working logger: wandb Weights & Biases pl Generic label for PyTorch Lightning package ready PRs ready to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WandbLogger save_dir should be set after creation

4 participants