AttributeError: 'NoneType' object has no attribute 'set_grad_enabled' #1804
Unanswered
dai-ichiro
asked this question in
Q&A
Replies: 1 comment
-
The exception occurs while the Python process is shutting down. The generator As to why the generator is cleaned up that late (after the torch module is no longer valid), you'd have to investigate the garbage collector/module cleanup of Python itself |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When I ran the following code, figure was drawn fine but I got the error.
Please tell me how to solve it.
Is it OK to ignore it?
Thank you so much.
To Reproduce
Error Message
Exception ignored in: <generator object PyTorchPredictor.predict at 0x7f811663f660>
Traceback (most recent call last):
File "/home/username/gluonts/lib/python3.8/site-packages/gluonts/torch/model/predictor.py", line 82, in predict
File "/home/username/gluonts/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 129, in exit
AttributeError: 'NoneType' object has no attribute 'set_grad_enabled'
Environment
OS: Ubuntu 20.04 on WSL2
Python version: 3.8.10
gluonts==0.8.1
torch==1.10.0+cu113
pytorch-lightning==1.5.3
Beta Was this translation helpful? Give feedback.
All reactions