Comments (7)
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"
from rl-starter-files.
Hi,
How did you install the package?
Did you do pip3 install -e torch_rl
?
from rl-starter-files.
Hi,
Yes, I installed it that way. If I try running it again, I get that it uninstalls and reinstalls it.
Installing collected packages: torch-rl Found existing installation: torch-rl 1.0.0 Uninstalling torch-rl-1.0.0: Successfully uninstalled torch-rl-1.0.0 Running setup.py develop for torch-rl Successfully installed torch-rl
from rl-starter-files.
I can't reproduce your error...
I installed my package in a new environment and executed your command and I don't have any problem...
Did you modify some code in the repository?
from rl-starter-files.
I had not change anything. However, I've tried reinstalling "everything" from scratch. In particular, I've created a new environment
conda create -n spinningup python=3.7
Then
git clone https://github.com/openai/spinningup.git
cd spinningup
pip install -e .
Then I've installed the package inside spinningup directory
git clone https://github.com/lcswillems/torch-rl.git
cd torch-rl
pip3 install -e torch_rl
and inside torch_rl
I've cloned and installed the Minigrid
git clone https://github.com/maximecb/gym-minigrid.git
cd gym-minigrid
pip3 install -e .
Finally, I've gone out of this last directory, so in the folder called torch-rl and executed
python3 -m scripts.train --algo ppo --env MiniGrid-DoorKey-5x5-v0 --model DoorKey
with the result you already know:
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/spinningup/torch-rl/scripts/train.py", line 17, in <module>
from model import ACModel
File "/Users/pablo/spinningup/torch-rl/model.py", line 17, in <module>
class ACModel(nn.Module, torch_rl.RecurrentACModel):
AttributeError: module 'torch_rl' has no attribute 'RecurrentACModel'
I think it might have to do with the structure of directories... I'm unsure. However, if I am in a different directory and environment without the spinningup package, I get this:
Traceback (most recent call last):
File "/anaconda3/envs/minigrid/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/anaconda3/envs/minigrid/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/pablo/torch-rl/scripts/train.py", line 4, in <module>
import gym
ModuleNotFoundError: No module named 'gym'
from rl-starter-files.
I'm amazed. It was precisely that.
Many thanks!
from rl-starter-files.
Great!!
Good luck for your work :)
from rl-starter-files.
Related Issues (20)
- Question: Did anyone solve MiniGrid-DoorKey-8x8-v0? HOT 1
- Maybe missing __init__.py in scripts and utils folder? HOT 1
- How can i clone this repo on colab ? it is saying setup.py not found !!! HOT 3
- VIsualization script problem when dealing with cpu only machine HOT 3
- How do I plot the training results in a figure/graph? HOT 1
- Segmentation fault: 11 HOT 1
- Image Encoder / Applying Transformer as the memory module HOT 2
- Recurrent is always True HOT 2
- Minor fix needed to run train.py on macOS Monterey HOT 2
- Not learning in large 16x16 gridworld
- Can't run example of use HOT 3
- TypeError: tuple indices must be integers or slices, not str HOT 5
- AttributeError HOT 4
- Incompatible with MiniGrid > 1.1.0 HOT 5
- TypeError: tuple indices must be integers or slices, not str HOT 2
- Question| Which file imports minigrid?? HOT 1
- Update the requirement.txt for gym-minigrid HOT 1
- Issues during "example of use" HOT 2
- README Example fails due to renderer change in Minigrid 2.2.0 HOT 3
- What do we need to do this operation for computing image embedding in AC?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rl-starter-files.