yaoxt3 / MILLION

The implementation of MILLION
4 stars 2 forks source link

No module named 'opposite_language_instructions' #1

Open NagisaZj opened 1 year ago

NagisaZj commented 1 year ago

Hi, thank you for the code!

I set up the conda environment as instructed in the Readme. When I tried to run the following command: python3 MILLION/learning_to_be_taught/environments/meta_world/save_used_word_embeddings.py

It gives the following error:

Traceback (most recent call last): File "MILLION/learning_to_be_taught/environments/meta_world/save_used_word_embeddings.py", line 1, in from learning_to_be_taught.environments.meta_world.language_meta_world import env_instructions, LanguageMetaWorld File "/data3/zj/MILLION/MILLION/learning_to_be_taught/environments/meta_world/language_meta_world.py", line 2, in from opposite_language_instructions import OpposedLanguageInstruction ModuleNotFoundError: No module named 'opposite_language_instructions'

I searched over the repo, but did not find the 'opposite_language_instructions ' module nor the 'OpposedLanguageInstruction' module. It also seems not to be a pip package. Maybe you missed uploading some files.

yaoxt3 commented 1 year ago

Thanks for your feedback, I will check the code and reupload.

NagisaZj commented 1 year ago

Now it seems to work. @yaoxt3
One more thing: can you check the mujoco_py and torch version you used? The metaworld version you used requires mujoco-py<2.1,>=2.0, but MILLION requires mujoco-py==2.1.2.14, which is the right one? Also, MILLION/learning_to_be_taught/environments/meta_world/save_used_word_embeddings.py requires torchtext, which depends on torch==1.3.1, but MILLION requires torch==1.8.1, how to fix this? Update: error when running ml10_language_instructions.py: Process Process-5:1: Traceback (most recent call last): File "/home/zj/anaconda3/envs/metalearn/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/home/zj/anaconda3/envs/metalearn/lib/python3.8/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/data3/zj/MILLION/rlpyt/rlpyt/samplers/parallel/worker.py", line 94, in sampling_process agent_inputs, traj_infos, completed_infos = collector.collect_batch( File "/data3/zj/MILLION/rlpyt/rlpyt/samplers/async_/collectors.py", line 19, in collect_batch return super().collect_batch(*args, **kwargs) File "/data3/zj/MILLION/rlpyt/rlpyt/samplers/parallel/cpu/collectors.py", line 42, in collect_batch o, r, d, env_info = env.step(action[b]) File "/data3/zj/MILLION/rlpyt/rlpyt/envs/gym.py", line 67, in step o, r, d, info = self.env.step(a) File "/data3/zj/MILLION/MILLION/learning_to_be_taught/environments/env_info_wrapper.py", line 21, in step o, r, d, info = super().step(action) File "/home/zj/anaconda3/envs/metalearn/lib/python3.8/site-packages/gym/core.py", line 289, in step return self.env.step(action) File "/data3/zj/MILLION/MILLION/learning_to_be_taught/environments/meta_world/language_meta_world.py", line 82, in step self.valid_samples.append((full_observation, reward_sum, info)) AttributeError: 'LanguageMetaWorld' object has no attribute 'valid_samples'

yaoxt3 commented 1 year ago

Actually, mujoco-py==2.1.2.14 works fine. There are many previous code versions, so some places haven't been sorted out. I will rearrange and upload them. Sorry for the inconvenience.

The panda-meta-world repository is used for sim2real, the experimental results in our paper are carried out under the original MetaWorld benchmark setting.

NagisaZj commented 1 year ago

@yaoxt3 Thank you for your time and effort! Looking forward to the rearranged codes!

yaoxt3 commented 1 year ago

Fixed. Please let me know if you encounter any problems.