2022-08-05 10:51:56,358 ERROR ray_trial_executor.py:102 – An exception occurred when trying to stop the Ray actor:Traceback (most recent call last):
File “C:\ProgramData\Anaconda3\lib\site-packages\ray\tune\ray_trial_executor.py”, line 93, in post_stop_cleanup
ray.get(future, timeout=0)
File “C:\ProgramData\Anaconda3\lib\site-packages\ray_private\client_mode_hook.py”, line 105, in wrapper
return func(*args, **kwargs)
File “C:\ProgramData\Anaconda3\lib\site-packages\ray\worker.py”, line 1811, in get
raise value
File “python\ray_raylet.pyx”, line 797, in ray._raylet.task_execution_handler
File “python\ray_raylet.pyx”, line 616, in ray._raylet.execute_task
File “python\ray_raylet.pyx”, line 760, in ray._raylet.execute_task
ray.exceptions.RayActorError: The actor died because of an error raised in its creation task, ray::DQNTrainer.init() (pid=10264, ip=127.0.0.1, repr=DQNTrainer)
File “C:\ProgramData\Anaconda3\lib\site-packages\ray\util\tracing\tracing_helper.py”, line 462, in _resume_span
return method(self, *_args, **_kwargs)
File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\agents\trainer.py”, line 1035, in _init
raise NotImplementedError
NotImplementedError
During handling of the above exception, another exception occurred:
ray::DQNTrainer.init() (pid=10264, ip=127.0.0.1, repr=DQNTrainer)
File “python\ray_raylet.pyx”, line 656, in ray._raylet.execute_task
File “python\ray_raylet.pyx”, line 697, in ray._raylet.execute_task
File “python\ray_raylet.pyx”, line 663, in ray._raylet.execute_task
File “python\ray_raylet.pyx”, line 667, in ray._raylet.execute_task
File “python\ray_raylet.pyx”, line 614, in ray._raylet.execute_task.function_executor
File “C:\ProgramData\Anaconda3\lib\site-packages\ray_private\function_manager.py”, line 701, in actor_method_executor
return method(__ray_actor, *args, **kwargs)
File “C:\ProgramData\Anaconda3\lib\site-packages\ray\util\tracing\tracing_helper.py”, line 462, in _resume_span
return method(self, *_args, **_kwargs)
File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\agents\trainer.py”, line 830, in init
super().init(
File “C:\ProgramData\Anaconda3\lib\site-packages\ray\tune\trainable.py”, line 149, in init
self.setup(copy.deepcopy(self.config))
File “C:\ProgramData\Anaconda3\lib\site-packages\ray\util\tracing\tracing_helper.py”, line 462, in _resume_span
return method(self, *_args, **_kwargs)
File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\agents\trainer.py”, line 911, in setup
self.workers = WorkerSet(
File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\evaluation\worker_set.py”, line 162, in init
self._local_worker = self._make_worker(
File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\evaluation\worker_set.py”, line 567, in _make_worker
worker = cls(
File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\evaluation\rollout_worker.py”, line 626, in init
self._build_policy_map(
File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\evaluation\rollout_worker.py”, line 1722, in build_policy_map
self.policy_map.create_policy(
File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\policy\policy_map.py”, line 140, in create_policy
self[policy_id] = class(
File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\policy\tf_policy_template.py”, line 256, in init
DynamicTFPolicy.init(
File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\policy\dynamic_tf_policy.py”, line 439, in init
self._initialize_loss_from_dummy_batch(auto_remove_unneeded_view_reqs=True)
File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\policy\dynamic_tf_policy.py”, line 758, in _initialize_loss_from_dummy_batch
losses = self._do_loss_init(train_batch)
File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\policy\dynamic_tf_policy.py”, line 867, in _do_loss_init
losses = self._loss_fn(self, self.model, self.dist_class, train_batch)
File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\agents\dqn\dqn_tf_policy.py”, line 251, in build_q_losses
q_t, q_logits_t, q_dist_t, _ = compute_q_values(
File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\agents\dqn\dqn_tf_policy.py”, line 390, in compute_q_values
model_out, state = model(input_batch, state_batches or , seq_lens)
File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\models\modelv2.py”, line 251, in call
res = self.forward(restored, state or , seq_lens)
File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\examples\models\trajectory_view_utilizing_models.py”, line 63, in forward
obs = tf.cast(input_dict[“prev_n_obs”], tf.float32)
File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\policy\sample_batch.py”, line 744, in getitem
value = dict.getitem(self, key)
KeyError: ‘prev_n_obs’
(DQNTrainer pid=10264) 2022-08-05 10:51:56,333 ERROR worker.py:449 – Exception raised in creation task: The actor died because of an error raised in its creation task, ray::DQNTrainer.init() (pid=10264, ip=127.0.0.1, repr=DQNTrainer)
(DQNTrainer pid=10264) File “C:\ProgramData\Anaconda3\lib\site-packages\ray\util\tracing\tracing_helper.py”, line 462, in _resume_span
(DQNTrainer pid=10264) return method(self, *_args, **_kwargs)
(DQNTrainer pid=10264) File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\agents\trainer.py”, line 1035, in _init
(DQNTrainer pid=10264) raise NotImplementedError
(DQNTrainer pid=10264) NotImplementedError
(DQNTrainer pid=10264)
(DQNTrainer pid=10264) During handling of the above exception, another exception occurred:
(DQNTrainer pid=10264)
(DQNTrainer pid=10264) ray::DQNTrainer.init() (pid=10264, ip=127.0.0.1, repr=DQNTrainer)
(DQNTrainer pid=10264) File “python\ray_raylet.pyx”, line 656, in ray._raylet.execute_task
(DQNTrainer pid=10264) File “python\ray_raylet.pyx”, line 697, in ray._raylet.execute_task
(DQNTrainer pid=10264) File “python\ray_raylet.pyx”, line 663, in ray._raylet.execute_task
(DQNTrainer pid=10264) File “python\ray_raylet.pyx”, line 667, in ray._raylet.execute_task
(DQNTrainer pid=10264) File “python\ray_raylet.pyx”, line 614, in ray._raylet.execute_task.function_executor
(DQNTrainer pid=10264) File “C:\ProgramData\Anaconda3\lib\site-packages\ray_private\function_manager.py”, line 701, in actor_method_executor
(DQNTrainer pid=10264) return method(__ray_actor, *args, **kwargs)
(DQNTrainer pid=10264) File “C:\ProgramData\Anaconda3\lib\site-packages\ray\util\tracing\tracing_helper.py”, line 462, in _resume_span
(DQNTrainer pid=10264) return method(self, *_args, **_kwargs)
(DQNTrainer pid=10264) File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\agents\trainer.py”, line 830, in init
(DQNTrainer pid=10264) super().init(
(DQNTrainer pid=10264) File “C:\ProgramData\Anaconda3\lib\site-packages\ray\tune\trainable.py”, line 149, in init
(DQNTrainer pid=10264) self.setup(copy.deepcopy(self.config))
(DQNTrainer pid=10264) File “C:\ProgramData\Anaconda3\lib\site-packages\ray\util\tracing\tracing_helper.py”, line 462, in _resume_span
(DQNTrainer pid=10264) return method(self, *_args, **_kwargs)
(DQNTrainer pid=10264) File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\agents\trainer.py”, line 911, in setup
(DQNTrainer pid=10264) self.workers = WorkerSet(
(DQNTrainer pid=10264) File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\evaluation\worker_set.py”, line 162, in init
(DQNTrainer pid=10264) self._local_worker = self._make_worker(
(DQNTrainer pid=10264) File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\evaluation\worker_set.py”, line 567, in _make_worker
(DQNTrainer pid=10264) worker = cls(
(DQNTrainer pid=10264) File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\evaluation\rollout_worker.py”, line 626, in init
(DQNTrainer pid=10264) self._build_policy_map(
(DQNTrainer pid=10264) File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\evaluation\rollout_worker.py”, line 1722, in build_policy_map
(DQNTrainer pid=10264) self.policy_map.create_policy(
(DQNTrainer pid=10264) File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\policy\policy_map.py”, line 140, in create_policy
(DQNTrainer pid=10264) self[policy_id] = class(
(DQNTrainer pid=10264) File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\policy\tf_policy_template.py”, line 256, in init
(DQNTrainer pid=10264) DynamicTFPolicy.init(
(DQNTrainer pid=10264) File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\policy\dynamic_tf_policy.py”, line 439, in init
(DQNTrainer pid=10264) self._initialize_loss_from_dummy_batch(auto_remove_unneeded_view_reqs=True)
(DQNTrainer pid=10264) File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\policy\dynamic_tf_policy.py”, line 758, in _initialize_loss_from_dummy_batch
(DQNTrainer pid=10264) losses = self._do_loss_init(train_batch)
(DQNTrainer pid=10264) File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\policy\dynamic_tf_policy.py”, line 867, in _do_loss_init
(DQNTrainer pid=10264) losses = self._loss_fn(self, self.model, self.dist_class, train_batch)
(DQNTrainer pid=10264) File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\agents\dqn\dqn_tf_policy.py”, line 251, in build_q_losses
(DQNTrainer pid=10264) q_t, q_logits_t, q_dist_t, _ = compute_q_values(
(DQNTrainer pid=10264) File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\agents\dqn\dqn_tf_policy.py”, line 390, in compute_q_values
(DQNTrainer pid=10264) model_out, state = model(input_batch, state_batches or , seq_lens)
(DQNTrainer pid=10264) File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\models\modelv2.py”, line 251, in call
(DQNTrainer pid=10264) res = self.forward(restored, state or , seq_lens)
(DQNTrainer pid=10264) File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\examples\models\trajectory_view_utilizing_models.py”, line 63, in forward
(DQNTrainer pid=10264) obs = tf.cast(input_dict[“prev_n_obs”], tf.float32)
(DQNTrainer pid=10264) File “C:\ProgramData\Anaconda3\lib\site-packages\ray\rllib\policy\sample_batch.py”, line 744, in getitem
(DQNTrainer pid=10264) value = dict.getitem(self, key)
(DQNTrainer pid=10264) KeyError: ‘prev_n_obs’
Traceback (most recent call last):
File “C:\ProgramData\Anaconda3\Lib\site-packages\ray\rllib\examples\trajectory_view_api.py”, line 85, in
results = tune.run(
File “C:\ProgramData\Anaconda3\lib\site-packages\ray\tune\tune.py”, line 695, in run
raise TuneError(“Trials did not complete”, incomplete_trials)
ray.tune.error.TuneError: (‘Trials did not complete’, [DQN_StatelessCartPole_8dd05_00000])