DI-engine icon indicating copy to clipboard operation
DI-engine copied to clipboard

AssertionError: gym_hybrid

Open ddharshan opened this issue 3 years ago • 6 comments

Hi I am new to DI-engine. when I run DI-engine/dizoo/gym_hybrid/envs/gym_hybrid_env.py (gym_hybrid_env.py ) code only in jupyter notebook, i am getting the AssertionError: gym_hybrid error. can anyone please help me on how to get rid from this?? The documents are required to understand the DI-Engine.

ddharshan avatar Aug 13 '22 09:08 ddharshan

Can you provide more details, like screen snapshots of your errors?

PaParaZz1 avatar Aug 14 '22 08:08 PaParaZz1

Can you provide more details, like screen snapshots of your errors? Thank you for your reply. Sure, I ran this code { DI-engine/dizoo/gym_hybrid/envs/gym_hybrid_env.py} in jupyter notebook but i got the following error message image

What this error mentioning about gym_hybrid?

ddharshan avatar Aug 14 '22 09:08 ddharshan

This error could be a repeat register error, which is caused by the repeat import of GymHybridEnv.

For simplicity, you can modify line 14 like @ENV_REGISTRY.register('gym_hybrid', force_overwrite=True) to figure it out.

PaParaZz1 avatar Aug 14 '22 14:08 PaParaZz1

This error could be a repeat register error, which is caused by the repeat import of GymHybridEnv.

For simplicity, you can modify line 14 like @ENV_REGISTRY.register('gym_hybrid', force_overwrite=True) to figure it out.

Yes it worked. Thank you

ddharshan avatar Aug 14 '22 15:08 ddharshan

Why this error occurs? Is that because of python 3?? I ran the DI-engine/dizoo/gym_hybrid/config/gym_hybrid_ddpg_config.py code image

ddharshan avatar Aug 14 '22 15:08 ddharshan

please let me know, why am i getting this error when i run the DI-engine/dizoo/gym_hybrid/entry/gym_hybrid_ddpg_eval.py code ??

image

ddharshan avatar Aug 14 '22 16:08 ddharshan

Also please let me know, why am i getting this error when i run the DI-engine/dizoo/gym_hybrid/entry/gym_hybrid_ddpg_main.py code?? image

ddharshan avatar Aug 15 '22 03:08 ddharshan

Also please let me know, why am i getting this error when i run the DI-engine/dizoo/gym_hybrid/entry/gym_hybrid_ddpg_main.py code?? image

For this problem, you should add replay_path field in your config, just like

gym_hybrid_hppo_config = dict(
  env=dict(
      replay_path="your own file directory path to save replay video"
  ),
  ...,
)

PaParaZz1 avatar Aug 15 '22 04:08 PaParaZz1

For more detailed discussion, you can join our slack channel and some message to us.

PaParaZz1 avatar Aug 15 '22 04:08 PaParaZz1

For more detailed discussion, you can join our slack channel and some message to us.

The replay path is not activated in the ddpg config, ?? DI-engine/dizoo/gym_hybrid/config/gym_hybrid_ddpg_config.py

image

ddharshan avatar Aug 15 '22 04:08 ddharshan