You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3.10.12 (main, Jul 5 2023, 18:54:27) [GCC 11.2.0] linux
0.5.1.dev11+g7432fc2
Problem description
AutoReset not enabled for MuJoCo envs resulting in crash when learning agent.
Reproducible example code
The Python snippets:
Command lines:
python examples/train_policy --env-id Hopper-v4
Extra dependencies:
Steps to reproduce:
Traceback
Traceback (most recent call last):
File "/home/daniel/Documents/github/rl_cbf/rl_cbf/safe_rl/train_policy.py", line 91, in <module>
agent.learn()
File "/home/daniel/Documents/github/rl_cbf/.venv/lib/python3.10/site-packages/omnisafe/algorithms/algo_wrapper.py", line 172, in learn
ep_ret, ep_cost, ep_len =self.agent.learn()
File "/home/daniel/Documents/github/rl_cbf/.venv/lib/python3.10/site-packages/omnisafe/algorithms/on_policy/base/policy_gradient.py", line 246, in learnself._env.rollout(
File "/home/daniel/Documents/github/rl_cbf/.venv/lib/python3.10/site-packages/omnisafe/adapter/onpolicy_adapter.py", line 118, in rollout
info['final_observation'][idx],
KeyError: 'final_observation'
Expected behavior
Training works with MuJoCo envs.
Additional context
No response
The text was updated successfully, but these errors were encountered:
After careful reviewing of omnisafe/envs/mujoco_env.py file, I approve with your opinion and I think setting need_auto_reset_wrapper = True is critical to solve that problem. Thanks to your pull request in #269.
Required prerequisites
What version of OmniSafe are you using?
0.5.1.dev11+g7432fc2
System information
3.10.12 (main, Jul 5 2023, 18:54:27) [GCC 11.2.0] linux
0.5.1.dev11+g7432fc2
Problem description
AutoReset not enabled for MuJoCo envs resulting in crash when learning agent.
Reproducible example code
The Python snippets:
Command lines:
Extra dependencies:
Steps to reproduce:
Traceback
Expected behavior
Training works with MuJoCo envs.
Additional context
No response
The text was updated successfully, but these errors were encountered: