Lightning CLI not working with WandbLogger
See original GitHub issue🐛 Bug
Using Lightning CLI with --trainer.logger=WandbLogger
results in the following error:
ValueError: Value "Namespace(class_path='pytorch_lightning.loggers.WandbLogger', init_args=Namespace(agg_default_func=None, agg_key_funcs=None, anonymous=None, experiment=None, id=None, log_model=False, name=None, offline=False, prefix='', project=None, save_dir='/tmp/save_dir', version=None))" does not validate against any of the types in typing.Union[pytorch_lightning.loggers.base.LightningLoggerBase, typing.Iterable[pytorch_lightning.loggers.base.LightningLoggerBase], bool]:
- init() got an unexpected keyword argument 'agg_key_funcs'
- Expected a List but got "Namespace(class_path='pytorch_lightning.loggers.WandbLogger', init_args=Namespace(agg_default_func=None, agg_key_funcs=None, anonymous=None, experiment=None, id=None, log_model=False, name=None, offline=False, prefix='', project=None, save_dir='/tmp/save_dir', version=None))"
- Expected a <class 'bool'> but got "Namespace(class_path='pytorch_lightning.loggers.WandbLogger', init_args=Namespace(agg_default_func=None, agg_key_funcs=None, anonymous=None, experiment=None, id=None, log_model=False, name=None, offline=False, prefix='', project=None, save_dir='/tmp/save_dir', version=None))"
To Reproduce
Environment
- CUDA:
- GPU:
- Tesla K80
- available: True
- version: 11.1
- GPU:
- Packages:
- numpy: 1.21.5
- pyTorch_debug: False
- pyTorch_version: 1.10.0+cu111
- pytorch-lightning: 1.6.0
- tqdm: 4.63.0
- System:
- OS: Linux
- architecture:
- 64bit
- processor: x86_64
- python: 3.7.13
- version: # 1 SMP Tue Dec 7 09:58:10 PST 2021
cc @awaelchli @morganmcg1 @AyushExel @borisdayma @scottire @manangoel99 @carmocca @mauvilsa
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Support for Weights and Biases logger (and possibly others ...
Currently, instantiating a weights and biases logger from lightning CLI is not supported, and causes an error:.
Read more >WandbLogger — PyTorch Lightning 1.8.5.post0 documentation
A new W&B run will be created when training starts if you have not created one manually before with wandb.init() . Log metrics....
Read more >Improved Lightning External Loggers
Lightning 1.5 adds new methods to WandbLogger that help you elevate your logging experience inside PL by giving you the ability to monitor...
Read more >PyTorch Lightning - Documentation - Weights & Biases - WandB
PyTorch Lightning has a WandbLogger class that can be used to seamlessly log metrics, model weights, media and more. Just instantiate the WandbLogger...
Read more >pytorch lightning wandb
Pytorch Lightning Wandbloggers import WandbLogger from pytorch_lightning import Trainer ... This is however a problem for multi-gpu training as the wandb…
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@cifkao Hi, this is the same as https://github.com/PyTorchLightning/pytorch-lightning/issues/12529
Workaround: