question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

detect_anomaly not supported for pytorch-lightning<1.5

See original GitHub issue

Support for passing detect_anomaly (in conf/defaults.yaml) was added in pytorch-lightning 1.5 (Refer PyTorchLightning/pytorch-lightning#9848). For lower versions training will fail with

Traceback (most recent call last):
  File "/home/ashwin/Desktop/Projects/torchgeo/train.py", line 226, in <module>
    main(conf)
  File "/home/ashwin/Desktop/Projects/torchgeo/train.py", line 196, in main
    trainer = pl.Trainer(**trainer_args)
  File "/home/ashwin/anaconda3/envs/torchgeo/lib/python3.9/site-packages/pytorch_lightning/trainer/connectors/env_vars_connector.py", line 40, in insert_env_defaults
    return fn(self, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'detect_anomaly'

So we either need to pin minimum version to 1.5 or remove this flag from conf/defaults.yaml.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
adamjstewartcommented, Jan 2, 2022

Yep!

1reaction
calebrob6commented, Jan 1, 2022

Yeah we should definitely get rid of it

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trainer — PyTorch Lightning 1.8.6 documentation
When turned on, it ensures that e.g. data augmentations are not repeated across workers. Trainer flags. accelerator. Supports passing different accelerator ...
Read more >
PyTorch Lightning 1.5 Released - Exxact Corporation
With this, PyTorch detects numerical anomalies like NaN or inf during forward and backward. Read more about anomaly detection here. from ...
Read more >
How to trace back from Anomaly detection errors? - autograd
I am using pytorch lightning. How can I trace it back to the source line? RuntimeError Traceback (most recent call last) <ipython-input-5- ...
Read more >
See raw diff - Hugging Face
Anomalib comprises state-of-the-art + anomaly detection algorithms that achieve ... + +If the specified weight path points to a PyTorch Lightning checkpoint ...
Read more >
RSR_Layers_PyTorch.ipynb - Colaboratory
!pip install pytorch-lightning==1.2.8 scikit-learn~=0.22.2 plotly==4.4.1 ... does not compete with semi-supervised or supervised anomaly detection setting, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found