Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Step-by-step instalation tutorial? #156

Open
ivanvoid opened this issue May 30, 2022 · 2 comments
Open

Step-by-step instalation tutorial? #156

ivanvoid opened this issue May 30, 2022 · 2 comments

Comments

@ivanvoid
Copy link

ivanvoid commented May 30, 2022

Hi, I assume that this project was made to help the RL community develop better algorithms for solving offline RL problems. I think that time should be spent exactly on model development and not on figuring out how to install and use provided env software.
So I assembled a little step-by-step guide on how to install D4RL. But I hope that maintainers can update wiki or readme file, thank you. (I can contribute this writeup with more explanations, just tell me where you want it)

This is link to my attempt to set up everything

PS: I am writing here, not because I wrote how to set everything up, but because I failed to do so.
PSS: for me attempt to run test d4rl script crashes with error:

Traceback (most recent call last):
  File "/home/ivan/Projects/offlineRL2/test_env.py", line 5, in <module>
    env = gym.make('maze2d-umaze-v1')
  File "/home/ivan/miniconda3/envs/offlineRL/lib/python3.9/site-packages/gym/envs/registration.py", line 597, in make
    env = cls(**_kwargs)
  File "/home/ivan/Projects/offlineRL2/d4rl/d4rl/pointmaze/maze_model.py", line 175, in __init__
    mujoco_env.MujocoEnv.__init__(self, model_path=f.name, frame_skip=1)
  File "/home/ivan/miniconda3/envs/offlineRL/lib/python3.9/site-packages/gym/envs/mujoco/mujoco_env.py", line 97, in __init__
    observation, _reward, done, _info = self.step(action)
  File "/home/ivan/Projects/offlineRL2/d4rl/d4rl/pointmaze/maze_model.py", line 192, in step
    self.clip_velocity()
  File "/home/ivan/Projects/offlineRL2/d4rl/d4rl/pointmaze/maze_model.py", line 222, in clip_velocity
    qvel = np.clip(self.sim.data.qvel, -5.0, 5.0)
AttributeError: 'MazeEnv' object has no attribute 'sim'

@huangzizhen
Copy link

huangzizhen commented Jun 6, 2022

hi, when i test the code, I encountered the following bug. Do u know how to solve it? thanks !!!
Traceback (most recent call last): File "D:/PyProject/BCQ-master/text.py", line 5, in <module> env = gym.make('maze2d-umaze-v1') File "D:\Program Files\Anaconda3\envs\mujoco\lib\site-packages\gym\envs\registration.py", line 597, in make env = cls(**_kwargs) File "d:\d4rl\d4rl\pointmaze\maze_model.py", line 175, in __init__ mujoco_env.MujocoEnv.__init__(self, model_path=f.name, frame_skip=1) File "D:\Program Files\Anaconda3\envs\mujoco\lib\site-packages\gym\envs\mujoco\mujoco_env.py", line 78, in __init__ self.model = self._mujoco_bindings.MjModel.from_xml_path(fullpath) ValueError: XML parse error 3: Error=XML_ERROR_FILE_NOT_FOUND ErrorID=3 (0x3) Line number=0: filename=C:\Users\86137\AppData\Local\Temp\tmpfvbqdq7w.xml

@agiachris
Copy link

I managed to fix this error @ivanvoid by modifying the gym version:

  1. pip uninstall gym
  2. pip install gym==0.23.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants