-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HELP: failed to run gym_hybrid_pdqn_config..py #664
Comments
How did you install P.S. installation command: |
Yes, I installed the dizoo version in dizoo/gym_hybrid/envs/gym-hybrid. |
I have reproduced this bug, and I will fix this problem in two days, you can keep track of this issue. |
@xujinming01 You can use the above commit to test whether this bug has been fixed. |
Before going that far, another error arose. python dizoo/gym_hybrid/config/gym_hybrid_pdqn_config.py Traceback (most recent call last):
File "/home/jinming/anaconda3/envs/ding-dev/lib/python3.8/site-packages/ding/envs/env_manager/base_env_manager.py", line 111, in __init__
self._observation_space = self._env_ref.observation_space
File "/home/jinming/anaconda3/envs/ding-dev/lib/python3.8/site-packages/dizoo/gym_hybrid/envs/gym_hybrid_env.py", line 133, in observation_space
return self._observation_space
AttributeError: 'GymHybridEnv' object has no attribute '_observation_space'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "dizoo/gym_hybrid/config/gym_hybrid_pdqn_config.py", line 76, in <module>
serial_pipeline([main_config, create_config], seed=0, max_env_step=int(1e7))
File "/home/jinming/anaconda3/envs/ding-dev/lib/python3.8/site-packages/ding/entry/serial_entry.py", line 56, in serial_pipeline
collector_env = create_env_manager(cfg.env.manager, [partial(env_fn, cfg=c) for c in collector_env_cfg])
File "/home/jinming/anaconda3/envs/ding-dev/lib/python3.8/site-packages/ding/envs/env_manager/base_env_manager.py", line 531, in create_env_manager
return ENV_MANAGER_REGISTRY.build(manager_type, env_fn=env_fn, cfg=manager_cfg)
File "/home/jinming/anaconda3/envs/ding-dev/lib/python3.8/site-packages/ding/utils/registry.py", line 96, in build
raise e
File "/home/jinming/anaconda3/envs/ding-dev/lib/python3.8/site-packages/ding/utils/registry.py", line 82, in build
return build_fn(*obj_args, **obj_kwargs)
File "/home/jinming/anaconda3/envs/ding-dev/lib/python3.8/site-packages/ding/envs/env_manager/subprocess_env_manager.py", line 79, in __init__
super().__init__(env_fn, cfg)
File "/home/jinming/anaconda3/envs/ding-dev/lib/python3.8/site-packages/ding/envs/env_manager/base_env_manager.py", line 120, in __init__
self._env_ref.reset()
File "/home/jinming/anaconda3/envs/ding-dev/lib/python3.8/site-packages/dizoo/gym_hybrid/envs/gym_hybrid_env.py", line 48, in reset
self._env = gym.make(self._env_id)
File "/home/jinming/anaconda3/envs/ding-dev/lib/python3.8/site-packages/gym/envs/registration.py", line 662, in make
env = env_creator(**_kwargs)
File "/home/jinming/anaconda3/envs/ding-dev/lib/python3.8/site-packages/gym_hybrid/environments.py", line 248, in __init__
super(MovingEnv, self).__init__(
File "/home/jinming/anaconda3/envs/ding-dev/lib/python3.8/site-packages/gym_hybrid/environments.py", line 106, in __init__
self.bg = cv2.cvtColor(self.bg, cv2.COLOR_BGR2RGB)
cv2.error: OpenCV(4.7.0) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor' How about you? @super1603 |
Maybe it is a opencv version bug, you can try |
Not work, the error message has not changed, except for the last line: cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor' |
You need to check why these images ( |
I don't get this error, it seems fixed my bug. And my opencv version is 4.7.0.72 |
Install DI-engine by:
then I run the config:
So I set
cuda=False
in the gym_hybrid_pdqn_config.pyThen I get:
I want to check why there are inhomogeneous shape in
episode_return
, but the error is not arised consistently within a fixed iteration, sometimes 1000, sometimes 4000, or else. I don't know how to debug this.The text was updated successfully, but these errors were encountered: