You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/Users/adrian/repositories/lightning/examples/pl_bug_report/bug_report_model.py", line 57, in <module>
run()
File "/Users/adrian/repositories/lightning/examples/pl_bug_report/bug_report_model.py", line 53, in run
model.logger
File "/Users/adrian/miniconda3/envs/lightning/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1207, in __getattr__
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'BoringModel' object has no attribute 'logger'. Did you mean: 'loggers'?
We should fix this by importing warnings correctly as you said (thanks!!), and release this in 1.7.x
We should get rid of the code completely because the deprecation phase is over in 1.8.
🐛 Bug
https://github.com/Lightning-AI/lightning/blob/2622989b108368813fdd3850b002fd1ad69988c2/src/pytorch_lightning/core/module.py#L41
https://github.com/Lightning-AI/lightning/blob/2622989b108368813fdd3850b002fd1ad69988c2/src/pytorch_lightning/core/module.py#L280-L282
L280-L282 intend to use python warnings module instead of the one defined in pytorch lightning.
To Reproduce
Use multiple loggers:
pl.trainer(loggers=[logger1, logger2], ...)
Expected behavior
Since
pytorch_lightning.utilities.warnings
isn't used anywhere in the file, the solution will be:import warnings
Environment
Doesn't really matter.
conda
,pip
, source):torch.__config__.show()
:Additional context
cc @awaelchli @edward-io @Borda @ananthsub @rohitgr7 @kamil-kaczmarek @Raalsky @Blaizzy @carmocca @justusschock @ninginthecloud @jjenniferdai
The text was updated successfully, but these errors were encountered: