What does the error ray.exceptions.RayTaskError(Empty)
refer to?
I am using Ray 1.1.0. The code uses A3C on 9 agents linked to three policies; 1, 4 and 4 agents are linked to the same policy respectively using the following function "policy_mapping_fn": lambda x: policy_mapping(x)
:
def policy_mapping(x):
if x in ['agent_BM_A_1', 'agent_BM_A_2', 'agent_BM_A_3', 'agent_BM_A_4']:
return "agent_BM_A"
elif x in ['agent_BM_B_1', 'agent_BM_B_2', 'agent_BM_B_3', 'agent_BM_B_4']:
return "agent_BM_B"
else:
return "agent_C"
Unfortunately, I cannot share the code, but the traceback is the following
#033[2m#033[36m(pid=184)#033[0m 2021-10-10 22:16:40,456#011INFO rollout_worker.py:1114 -- Built policy map: {'agent_BM_A': <ray.rllib.policy.tf_policy_template.A3CTFPolicy object at 0x7fc94bb528d0>, 'agent_BM_B': <ray.rllib.policy.tf_policy_template.A3CTFPolicy object at 0x7fc94803e400>, 'agent_C': <ray.rllib.policy.tf_policy_template.A3CTFPolicy object at 0x7fc930207d68>}
#033[2m#033[36m(pid=184)#033[0m 2021-10-10 22:16:40,456#011INFO rollout_worker.py:1115 -- Built preprocessor map: {'agent_BM_A': <ray.rllib.models.preprocessors.NoPreprocessor object at 0x7fc94bb52438>, 'agent_BM_B': <ray.rllib.models.preprocessors.NoPreprocessor object at 0x7fce0c026f98>, 'agent_C': <ray.rllib.models.preprocessors.NoPreprocessor object at 0x7fc9302644a8>}
#033[2m#033[36m(pid=184)#033[0m 2021-10-10 22:16:40,460#011INFO rollout_worker.py:526 -- Built filter map: {'agent_BM_A': <ray.rllib.utils.filter.NoFilter object at 0x7fc94bb52390>, 'agent_BM_B': <ray.rllib.utils.filter.NoFilter object at 0x7fc94bb52358>, 'agent_C': <ray.rllib.utils.filter.NoFilter object at 0x7fc94bb524a8>}
#033[2m#033[36m(pid=184)#033[0m 2021-10-10 22:16:40,654#011INFO trainable.py:103 -- Trainable.setup took 17.529 seconds. If your trainable is slow to initialize, consider setting reuse_actors=True to reduce actor creation overheads.
#033[2m#033[36m(pid=183)#033[0m 2021-10-10 22:16:40,978#011INFO rollout_worker.py:660 -- Generating sample batch of size 10
#033[2m#033[36m(pid=184)#033[0m 2021-10-10 22:26:40,995#011INFO trainer.py:523 -- Worker crashed during call to train(). To attempt to continue training without the failed worker, set `'ignore_worker_failures': True`.
2021-10-10 22:26:41,003#011ERROR trial_runner.py:616 -- Trial A3C_PowerTrading-v0_b254d_00000: Error processing event.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/ray/tune/trial_runner.py", line 586, in _process_trial
results = self.trial_executor.fetch_result(trial)
File "/usr/local/lib/python3.6/dist-packages/ray/tune/ray_trial_executor.py", line 609, in fetch_result
result = ray.get(trial_future[0], timeout=DEFAULT_GET_TIMEOUT)
File "/usr/local/lib/python3.6/dist-packages/ray/_private/client_mode_hook.py", line 47, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/ray/worker.py", line 1456, in get
raise value.as_instanceof_cause()
ray.exceptions.RayTaskError(Empty): #033[36mray::A3C.train_buffered()#033[39m (pid=184, ip=10.0.111.1)
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 "/usr/local/lib/python3.6/dist-packages/ray/tune/trainable.py", line 167, in train_buffered
result = self.train()
File "/usr/local/lib/python3.6/dist-packages/ray/rllib/agents/trainer.py", line 526, in train
raise e
File "/usr/local/lib/python3.6/dist-packages/ray/rllib/agents/trainer.py", line 515, in train
result = Trainable.train(self)
File "/usr/local/lib/python3.6/dist-packages/ray/tune/trainable.py", line 226, in train
result = self.step()
File "/usr/local/lib/python3.6/dist-packages/ray/rllib/agents/trainer_template.py", line 148, in step
res = next(self.train_exec_impl)
File "/usr/local/lib/python3.6/dist-packages/ray/util/iter.py", line 756, in __next__
return next(self.built_iterator)
File "/usr/local/lib/python3.6/dist-packages/ray/util/iter.py", line 783, in apply_foreach
for item in it:
File "/usr/local/lib/python3.6/dist-packages/ray/util/iter.py", line 843, in apply_filter
for item in it:
File "/usr/local/lib/python3.6/dist-packages/ray/util/iter.py", line 843, in apply_filter
for item in it:
File "/usr/local/lib/python3.6/dist-packages/ray/util/iter.py", line 783, in apply_foreach
for item in it:
File "/usr/local/lib/python3.6/dist-packages/ray/util/iter.py", line 828, in add_wait_hooks
item = next(it)
File "/usr/local/lib/python3.6/dist-packages/ray/util/iter.py", line 783, in apply_foreach
for item in it:
File "/usr/local/lib/python3.6/dist-packages/ray/util/iter.py", line 551, in base_iterator
batch = ray.get(obj_ref)
File "/usr/local/lib/python3.6/dist-packages/ray/_private/client_mode_hook.py", line 47, in wrapper
return func(*args, **kwargs)
ray.exceptions.RayTaskError(Empty): #033[36mray::RolloutWorker.par_iter_next_batch()#033[39m (pid=181, ip=10.0.111.1)
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 "/usr/local/lib/python3.6/dist-packages/ray/util/iter.py", line 1158, in par_iter_next_batch
batch.append(self.par_iter_next())
File "/usr/local/lib/python3.6/dist-packages/ray/util/iter.py", line 1152, in par_iter_next
return next(self.local_it)
File "/usr/local/lib/python3.6/dist-packages/ray/util/iter.py", line 783, in apply_foreach
for item in it:
File "/usr/local/lib/python3.6/dist-packages/ray/rllib/evaluation/rollout_worker.py", line 327, in gen_rollouts
yield self.sample()
File "/usr/local/lib/python3.6/dist-packages/ray/rllib/evaluation/rollout_worker.py", line 662, in sample
batches = [self.input_reader.next()]
File "/usr/local/lib/python3.6/dist-packages/ray/rllib/evaluation/sampler.py", line 95, in next
batches = [self.get_data()]
File "/usr/local/lib/python3.6/dist-packages/ray/rllib/evaluation/sampler.py", line 410, in get_data
rollout = self.queue.get(timeout=600.0)
File "/usr/lib/python3.6/queue.py", line 172, in get
raise Empty
queue.Empty
Result for A3C_PowerTrading-v0_b254d_00000:
{}