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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Change LightningLoggerBase to Logger #973

Merged

Conversation

julien-blanchon
Copy link
Contributor

What does this PR do?

Fix cannot import name 'LightningLoggerBase' from 'pytorch_lightning.loggers'. Since pytorch_lightning.loggers.base.LightningLoggerBase is deprecated over pytorch_lightning.loggers.base.Logger.
Fixes #972

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • 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?
  • Did you write any new necessary tests? [not needed for typos/docs]
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

@Delaunay Delaunay mentioned this pull request Feb 20, 2023
@ludwigwinkler
Copy link

Is there a workaround at the moment by installing an older version?

@senarvi
Copy link
Contributor

senarvi commented Feb 24, 2023

If we want to maintain compatibility to older versions, then we could do something like this:

try:
    from pytorch_lightning.loggers import Logger
except ImportError:
    from pytorch_lightning.loggers import LightningLoggerBase
    Logger = LightningLoggerBase

@julien-blanchon
Copy link
Contributor Author

@senarvi I did commit your idea to maintain older version compatibility

@D0miH
Copy link

D0miH commented Mar 18, 2023

Any updates on this? Having to change LightningLoggerBase to Logger every time I re-install the package is kinda tedious.

@tedtroxell
Copy link

Are we able to get this merged? I'm willing to help out any way possible. It seems like not being able to use lightning bolts with the latest pytorch lightning seems like a big deal

@Borda Borda changed the title 馃悰 Change LightningLoggerBase to Logger 馃悰 Change LightningLoggerBase to Logger May 11, 2023
@Borda Borda merged commit b2f6220 into Lightning-Universe:master May 11, 2023
7 of 19 checks passed
@julien-blanchon julien-blanchon deleted the fix-lightningloggerbase branch May 11, 2023 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pytorch_lightning.loggers import LightningLoggerBase
6 participants