vitchyr / multiworld

Multitask Environments for RL
Other
273 stars 64 forks source link

sawyer_push_and_reach_mocap_goal_hidden.xml does not exist #71

Closed chenyiwen97 closed 5 years ago

chenyiwen97 commented 5 years ago

I ran the code from the rlkit ,but it seems that something is missing in the environment.

Traceback (most recent call last): File "rig/pusher/rig.py", line 86, in use_gpu=True, # Turn on if you have a GPU File "/home/ubuntu/rlkit/rlkit/launchers/launcher_util.py", line 166, in run_experiment_here return experiment_function(variant) File "/home/ubuntu/rlkit/rlkit/launchers/rig_experiments.py", line 40, in grill_her_td3_full_experiment train_vae_and_update_variant(variant) File "/home/ubuntu/rlkit/rlkit/launchers/rig_experiments.py", line 86, in train_vae_and_update_variant return_data=True, File "/home/ubuntu/rlkit/rlkit/launchers/rig_experiments.py", line 248, in train_vae variant['generate_vae_dataset_kwargs'] File "/home/ubuntu/rlkit/rlkit/launchers/rig_experiments.py", line 166, in generate_vae_dataset env = gym.make(env_id) File "/home/ubuntu/anaconda3/envs/rlkit/lib/python3.5/site-packages/gym/envs/registration.py", line 167, in make return registry.make(id) File "/home/ubuntu/anaconda3/envs/rlkit/lib/python3.5/site-packages/gym/envs/registration.py", line 119, in make env = spec.make() File "/home/ubuntu/anaconda3/envs/rlkit/lib/python3.5/site-packages/gym/envs/registration.py", line 86, in make env = cls(self._kwargs) File "/home/ubuntu/anaconda3/envs/rlkit/lib/python3.5/site-packages/multiworld-0.0.0-py3.5.egg/multiworld/envs/mujoco/sawyer_xyz/sawyer_push_nips.py", line 478, in init kwargs File "/home/ubuntu/anaconda3/envs/rlkit/lib/python3.5/site-packages/multiworld-0.0.0-py3.5.egg/multiworld/envs/mujoco/sawyer_xyz/sawyer_push_nips.py", line 59, in init MujocoEnv.init(self, self.model_name, frame_skip=frame_skip) File "/home/ubuntu/anaconda3/envs/rlkit/lib/python3.5/site-packages/multiworld-0.0.0-py3.5.egg/multiworld/envs/mujoco/mujoco_env.py", line 28, in init raise IOError("File %s does not exist" % fullpath) OSError: File /home/ubuntu/anaconda3/envs/rlkit/lib/python3.5/site-packages/multiworld-0.0.0-py3.5.egg/multiworld/envs/assets/sawyer_xyz/sawyer_push_and_reach_mocap_goal_hidden.xml does not exist

zach-nervana commented 5 years ago

I ran into this problem as well. The problem is that setup.py uses packages=find_packages() to determine which directories to include when installing. It only includes directories with __init__.py which the assets directories do not have. One simple fix is to install the package by cloning the repository locally and then installing with pip install -e .. This works because all files, even those not included by find_packages will be available. I ran into this problem by installing using: pip install git+https://github.com/vitchyr/multiworld and based on the traceback you posted it looks like you did a similar thing. The fix would be to manually include the assets directory in the setup call.

vitchyr commented 5 years ago

Fixed with #72. Thanks Zach!