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.

Module 'torch_rl' has no attribute 'RecurrentACModel'

See original GitHub issue

When trying to run

(spinningup) Pablos-iMac:torch-rl pablo$ python3 -m scripts.train --algo ppo --env MiniGrid-DoorKey-5x5-v0

I get the following error

Traceback (most recent call last):
  File "/anaconda3/envs/spinningup/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/anaconda3/envs/spinningup/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/pablo/torch-rl/scripts/train.py", line 17, in <module>
    from model import ACModel
  File "/Users/pablo/torch-rl/model.py", line 17, in <module>
    class ACModel(nn.Module, torch_rl.RecurrentACModel):
AttributeError: module 'torch_rl' has no attribute 'RecurrentACModel'

I have not been able to find out what is going on. Thanks!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
lcswillemscommented, Mar 28, 2019

I followed “exactly” what you did and I have no issue…

I write “exactly” between quotes because I replaced the “pip3” by “pip”. I think that when you do “pip3”, you install it for Python, not for your environment. This issue might come from this.

Let me know if it solves your problem.

Edit : And “python” instead of “python3”

0reactions
lcswillemscommented, Mar 28, 2019

Great!! Good luck for your work 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

pytorch, AttributeError: module 'torch' has no attribute 'Tensor'
The Python binary that you are running does not have torch installed. It does have a directory named torch on the module search...
Read more >
module 'torch' has no attribute 'potrf' · Issue #50379
I am having the issue on the lines below. ~/Desktop/ULfAD/ceadarscript/DAGMMphase/model.py in forward(ctx, a) 17 class Cholesky(torch.autograd.
Read more >
Deploying a Seq2Seq Model with TorchScript
Deploying a Seq2Seq Model with TorchScript. Author: Matthew Inkawhich. This tutorial will walk through the process of transitioning a sequence-to-sequence ...
Read more >
LightningModule — PyTorch Lightning 1.8.6 documentation
All the other code that's not in the LightningModule has been automated for you by the Trainer. ... This is found automatically if...
Read more >
torch.nn — PyTorch master documentation
Parameters are Tensor subclasses, that have a very special property when used with Module s - when they're assigned as Module attributes they...
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