PierreMarza / task_conditioned_adaptation

Code for CVPR 2024 paper "Task-conditioned adaptation of visual features in multi-task policy learning"
MIT License
1 stars 0 forks source link

AssertionError #3

Closed pussinmood closed 2 weeks ago

pussinmood commented 2 weeks ago

I tried to run 《Test on faucet-close-v2-goal-observable》 after 《Task embedding search on faucet-close-v2-goal-observable》,this issue showed : RS:> Registering Arms Envs RS:> Registering Biomechanics Envs RS:> Registering Hand Envs RS:> Registering Kitchen Envs Using CUDA. Traceback (most recent call last): File "/home/oem/anaconda3/envs/eai-vc/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/oem/anaconda3/envs/eai-vc/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/oem/data/fb/新项目/task_conditioned_adaptation-main/src/run/eval.py", line 168, in e = env_constructor( File "/home/oem/data/fb/新项目/task_conditioned_adaptation-main/src/gym/gym_wrapper.py", line 87, in env_constructor e = FrozenEmbeddingWrapper( File "/home/oem/data/fb/新项目/task_conditioned_adaptation-main/src/gym/gym_wrapper.py", line 249, in init proprio = self.get_proprio() File "/home/oem/data/fb/新项目/task_conditioned_adaptation-main/src/gym/gym_wrapper.py", line 248, in self.get_proprio = lambda: get_proprioception(self.unwrapped, suite) File "/home/oem/data/fb/新项目/task_conditioned_adaptation-main/src/gym/gym_wrapper.py", line 335, in get_proprioception assert isinstance(env, gym.Env) AssertionError My metaworld==2.0.0

pussinmood commented 2 weeks ago

Trying to do《Test on assembly-v2-goal-observable》 is the same issue like this.

PierreMarza commented 2 weeks ago

I cannot reproduce this error. I have 3 questions:

  1. Do you also get the same error when running eval.py on known tasks from MetaWorld?
  2. Are you able to run eval.py for tasks that are not from MetaWorld (e.g. known tasks from DMC or Adroit)?
  3. How have you installed metaworld?
pussinmood commented 2 weeks ago

1.yes,i tried other known tasks from metaworld,same issues. 2.i can run eval.py for tasks not from metaworld 3.i cloned metaworld from https://github.com/Farama-Foundation/Metaworld ,and pip install -e. metaworld==2.0.0 sorry to bother you with these numb issues.....

pussinmood commented 2 weeks ago

i also tried metaworld==0.1.0,different issue appeared: Traceback (most recent call last): File "/home/oem/data/fb/新项目/task_conditioned_adaptation-main/src/gym/gym_env.py", line 110, in reset return self.env.unwrapped.reset_model(seed=seed) TypeError: reset_model() got an unexpected keyword argument 'seed'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/oem/anaconda3/envs/eai-vc/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/oem/anaconda3/envs/eai-vc/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/oem/data/fb/新项目/task_conditioned_adaptation-main/src/run/eval.py", line 174, in paths = sample_paths( File "/home/oem/data/fb/新项目/task_conditioned_adaptation-main/src/utils/utils.py", line 218, in sample_paths return do_rollout(input_dict) File "/home/oem/data/fb/新项目/task_conditioned_adaptation-main/src/utils/utils.py", line 145, in do_rollout o = env.reset() File "/home/oem/data/fb/新项目/task_conditioned_adaptation-main/src/gym/gym_env.py", line 114, in reset return self.env.reset() File "/home/oem/data/fb/新项目/task_conditioned_adaptation-main/src/gym/gym_wrapper.py", line 325, in reset return super().reset() File "/home/oem/anaconda3/envs/eai-vc/lib/python3.8/site-packages/gym/core.py", line 311, in reset return self.observation(self.env.reset(kwargs)) File "/home/oem/anaconda3/envs/eai-vc/lib/python3.8/site-packages/gym/core.py", line 311, in reset return self.observation(self.env.reset(**kwargs)) File "/home/oem/data/fb/新项目/task_conditioned_adaptation-main/src/gym/gym_wrapper.py", line 169, in observation return self.get_image() File "/home/oem/data/fb/新项目/task_conditioned_adaptation-main/src/gym/gym_wrapper.py", line 155, in get_image img = self.sim.render( File "mjsim.pyx", line 153, in mujoco_py.cymj.MjSim.render File "wrappers.pxi", line 1069, in mujoco_py.cymj.PyMjModel.camera_name2id ValueError: No "camera" with name top_cap2 exists. Available "camera" names = ('topview', 'corner', 'corner2', 'corner3', 'behindGripper', 'gripperPOV').

PierreMarza commented 2 weeks ago

Hi, thank you for this additional information, and sorry to hear you are facing these issues... Have you followed all the installation guidelines? Have you had any trouble with some of them, or have you done additional installations? Also, in another issue (https://github.com/PierreMarza/task_conditioned_adaptation/issues/2), you updated your mujoco version, right? Have you done this after or before installing metaworld?

pussinmood commented 2 weeks ago

Thanks again for your attention and guidence ,i followed your installation guidelines,but some issues appeared such as lackness of something ,i solved them with
''' sudo apt-get update sudo apt-get install -y libx11-dev
sudo apt-get install libglew-dev
sudo apt-get install libegl1-mesa-dev pip install cython==0.29.12(to avoid a issue) ''' don't know why my mujoco==3.2.2,so i use 'pip install mujoco==2.3.5',i may did something wrong during the installation,so maybe i can solve this problem with rebuilding the environment ? By the way,i'm a chinese ,so i'm using a cloud server without a global internet,it may cause some trouble during installation,i had to pip every single one of your environment.yml one by one. When i use my laptop ,i installed more properly,but same issue appear ,metaworld installation is after the main envs installation and two issues before. my situations now is metaworld‘s task can't be done through eval.py ,what is the metaworld's version you are using ? i will try to install this env again to see the outcoming ,appreciate your kindness one more time~.~

PierreMarza commented 2 weeks ago

The installation guidelines involve cloning the _eaivc code repository. Have you tried installing metaworld from their _thirdparty dependencies? If not, try the following,

cd eai_vc
pip install -e ./third_party/metaworld
pussinmood commented 2 weeks ago

i didn't ,thanks ,i will try this out~。~

pussinmood commented 2 weeks ago

it looks like ok now ,just use 'export MUJOCO_GL=osmesa' to avoid issue 'mujoco.FatalError: gladLoadGL error'. thank you very very much!you just made my day.

PierreMarza commented 2 weeks ago

Great, I'm thus closing this issue. Feel free to reopen if needed!