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
Traceback (most recent call last):
File "/home/user/code/python/train_ppo.py", line 9, in<module>
agent.train(total_time_steps=20000) # 开始训练,并设置环境运行总步数为20000
File "/home/user/anaconda3/envs/OpenRL/lib/python3.9/site-packages/openrl/runners/common/ppo_agent.py", line 134, in train
driver.run()
File "/home/user/anaconda3/envs/OpenRL/lib/python3.9/site-packages/openrl/drivers/onpolicy_driver.py", line 227, in run
self._inner_loop()
File "/home/user/anaconda3/envs/OpenRL/lib/python3.9/site-packages/openrl/drivers/onpolicy_driver.py", line 112, in _inner_loop
rollout_infos = self.actor_rollout()
File "/home/user/anaconda3/envs/OpenRL/lib/python3.9/site-packages/openrl/drivers/onpolicy_driver.py", line 189, in actor_rollout
obs, rewards, dones, infos = self.envs.step(actions, extra_data)
File "/home/user/anaconda3/envs/OpenRL/lib/python3.9/site-packages/openrl/envs/vec_env/wrappers/vec_monitor_wrapper.py", line 37, in step
returns = self.env.step(action, extra_data)
File "/home/user/anaconda3/envs/OpenRL/lib/python3.9/site-packages/openrl/envs/vec_env/wrappers/reward_wrapper.py", line 46, in step
rewards, new_infos = self.reward_class.step_reward(data=extra_data)
File "/home/user/anaconda3/envs/OpenRL/lib/python3.9/site-packages/openrl/rewards/base_reward.py", line 18, in step_reward
rewards = data["reward"].copy()
KeyError: 'reward'
System Info
No response
Checklist
I have checked that there is no similar issues in the repo
🐛 Bug
base_reward.py中 rewards = data["reward"].copy(),没有reward,reward_wrapper.py是rewards,修改之后还有其他问题。。。
To Reproduce
Relevant log output / Error message
System Info
No response
Checklist
The text was updated successfully, but these errors were encountered: