Skip to content

Can not train/evaluate with --video option #7

@mscwu

Description

@mscwu

First of all, thank you for open sourcing COMPASS.

When I try to run train/evaluate script with --video option on, I get the following error:

logger.warn( Traceback (most recent call last): File "/home/ww/COMPASS/run.py", line 289, in <module> main() File "/home/ww/COMPASS/run.py", line 284, in main run() File "/home/ww/env_isaaclab/lib/python3.10/site-packages/gin/config.py", line 1605, in gin_wrapper utils.augment_exception_message_and_reraise(e, err_str) File "/home/ww/env_isaaclab/lib/python3.10/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise raise proxy.with_traceback(exception.__traceback__) from None File "/home/ww/env_isaaclab/lib/python3.10/site-packages/gin/config.py", line 1582, in gin_wrapper return fn(*new_args, **new_kwargs) File "/home/ww/COMPASS/run.py", line 236, in run rl_trainer = ResidualPPOTrainer(env=env, File "/home/ww/env_isaaclab/lib/python3.10/site-packages/gin/config.py", line 1605, in gin_wrapper utils.augment_exception_message_and_reraise(e, err_str) File "/home/ww/env_isaaclab/lib/python3.10/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise raise proxy.with_traceback(exception.__traceback__) from None File "/home/ww/env_isaaclab/lib/python3.10/site-packages/gin/config.py", line 1582, in gin_wrapper return fn(*new_args, **new_kwargs) File "/home/ww/COMPASS/compass/residual_rl/residual_ppo_trainer.py", line 75, in __init__ self.alg.init_storage(self.env.num_envs, AttributeError: 'RecordVideo' object has no attribute 'num_envs' In call to configurable 'ResidualPPOTrainer' (<class 'compass.residual_rl.residual_ppo_trainer.ResidualPPOTrainer'>) In call to configurable 'run' (<function run at 0x7df80bf3b6d0>)

COMPASS/run.py

Line 232 in 0886e8c

env = gym.wrappers.RecordVideo(env, **video_kwargs)

It seems like RecordVideo wrapper makes env non-vectorized.

I can finish training when video option is off.

Any help on this issue?

BTW I changed the code to make compass work with the latest Isaac Lab and Isaac Sim 4.5. For example changing module imports from "omni.isaac.lab.xxx" to " isaaclab.xxx". I'm not sure if this would affect run.py.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions