Description
I am in the process of running training.
Operating System
ubuntu 18.04
Problems
When I run the commend 'python inter/train_cl.py --exp-name inter_cl ','ray.exceptions.RayTaskError(KeyError)' and 'KeyError: step_reward' happened.
I hope to get help.,thank you!
error:
Failure # 1 (occurred at 2022-04-22_09-18-36)
Traceback (most recent call last):
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/tune/trial_runner.py", line 586, in _process_trial
results = self.trial_executor.fetch_result(trial)
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/tune/ray_trial_executor.py", line 609, in fetch_result
result = ray.get(trial_future[0], timeout=DEFAULT_GET_TIMEOUT)
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/_private/client_mode_hook.py", line 47, in wrapper
return func(*args, **kwargs)
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/worker.py", line 1456, in get
raise value.as_instanceof_cause()
ray.exceptions.RayTaskError(KeyError): [36mray::IPPOCL.train_buffered()[39m (pid=55550, ip=192.168.79.142)
File "python/ray/_raylet.pyx", line 480, in ray._raylet.execute_task
File "python/ray/_raylet.pyx", line 432, in ray._raylet.execute_task.function_executor
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/tune/trainable.py", line 167, in train_buffered
result = self.train()
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/rllib/agents/trainer.py", line 526, in train
raise e
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/rllib/agents/trainer.py", line 515, in train
result = Trainable.train(self)
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/tune/trainable.py", line 226, in train
result = self.step()
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/rllib/agents/trainer_template.py", line 148, in step
res = next(self.train_exec_impl)
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/util/iter.py", line 756, in next
return next(self.built_iterator)
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/util/iter.py", line 783, in apply_foreach
for item in it:
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/util/iter.py", line 783, in apply_foreach
for item in it:
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/util/iter.py", line 843, in apply_filter
for item in it:
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/util/iter.py", line 843, in apply_filter
for item in it:
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/util/iter.py", line 783, in apply_foreach
for item in it:
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/util/iter.py", line 783, in apply_foreach
for item in it:
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/util/iter.py", line 783, in apply_foreach
for item in it:
[Previous line repeated 1 more time]
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/util/iter.py", line 876, in apply_flatten
for item in it:
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/util/iter.py", line 828, in add_wait_hooks
item = next(it)
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/util/iter.py", line 783, in apply_foreach
for item in it:
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/util/iter.py", line 783, in apply_foreach
for item in it:
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/util/iter.py", line 783, in apply_foreach
for item in it:
[Previous line repeated 1 more time]
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/util/iter.py", line 471, in base_iterator
yield ray.get(futures, timeout=timeout)
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/_private/client_mode_hook.py", line 47, in wrapper
return func(*args, **kwargs)
ray.exceptions.RayTaskError(KeyError): [36mray::RolloutWorker.par_iter_next()[39m (pid=55549, ip=192.168.79.142)
File "python/ray/_raylet.pyx", line 480, in ray._raylet.execute_task
File "python/ray/_raylet.pyx", line 432, in ray._raylet.execute_task.function_executor
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/util/iter.py", line 1152, in par_iter_next
return next(self.local_it)
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/rllib/evaluation/rollout_worker.py", line 327, in gen_rollouts
yield self.sample()
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/rllib/evaluation/rollout_worker.py", line 662, in sample
batches = [self.input_reader.next()]
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/rllib/evaluation/sampler.py", line 95, in next
batches = [self.get_data()]
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/rllib/evaluation/sampler.py", line 224, in get_data
item = next(self.rollout_provider)
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/rllib/evaluation/sampler.py", line 620, in _env_runner
sample_collector=sample_collector,
File "/home/behazy/anaconda3/envs/copo/lib/python3.7/site-packages/ray/rllib/evaluation/sampler.py", line 1124, in _process_observations_w_trajectory_view_api
env_index=env_id)
File "/home/behazy/CoPO/copo_code/copo/callbacks.py", line 41, in on_episode_step
episode.user_data["step_reward"][k].append(info["step_reward"])
KeyError: 'step_reward'