Skip to content

Save video option when training robosuite env #14

@zichunxx

Description

@zichunxx

Hi!

I got the following error when training the robosuite env:

Traceback (most recent call last):
  File "train.py", line 304, in main
    workspace.train()
  File "/home/xzc/Documents/RL-ViGen/train.py", line 260, in train
    self.eval()
  File "/home/xzc/Documents/RL-ViGen/train.py", line 168, in eval
    self.video_recorder.init(self.eval_env, enabled=(episode == 0))
  File "/home/xzc/Documents/RL-ViGen/video.py", line 25, in init
    self.record(env)
  File "/home/xzc/Documents/RL-ViGen/video.py", line 39, in record
    frame = env.render()
  File "/home/xzc/Documents/RL-ViGen/wrappers/dmc.py", line 183, in __getattr__
    return getattr(self._env, name)
  File "/home/xzc/Documents/RL-ViGen/wrappers/robo_wrapper.py", line 106, in __getattr__
    return getattr(self._env, name)
  File "/home/xzc/mambaforge/envs/pieg/lib/python3.8/site-packages/dm_control/suite/wrappers/action_scale.py", line 103, in __getattr__
    return getattr(self._env, name)
  File "/home/xzc/Documents/RL-ViGen/wrappers/dmc.py", line 67, in __getattr__
    return getattr(self._env, name)
  File "/home/xzc/Documents/RL-ViGen/wrappers/dmc.py", line 149, in __getattr__
    return getattr(self._env, name)
AttributeError: 'Gym2DMC' object has no attribute 'render'

It seems that this error was triggered by missing __getattr_ in Gym2DMC wrapper. Is that right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions