Hi, I am encountering this issue recently which is really annoying because everything seems correct but I get this error! I already checked the previous related discussion here and on the GitHub and followed the instructions, but it did not work out. Would you please let me know how I can resolve it?
Ray version: '2.0.0.dev0'
framework: TF
2
In another venv in which I have pytorch
I run the same code without any error (with the same ray version). But I need my TF
venv as well.
Many thanks!
2021-09-03 22:15:37,838 INFO services.py:1263 -- View the Ray dashboard at http://127.0.0.1:8265
2021-09-03 22:15:47,851 WARNING worker.py:500 -- `ray.get_gpu_ids()` will always return the empty list when called from the driver. This is because Ray does not manage GPU allocations to the driver process.
2021-09-03 22:15:47,961 INFO trainer.py:720 -- Tip: set framework=tfe or the --eager flag to enable TensorFlow eager execution
2021-09-03 22:15:47,961 INFO trainer.py:732 -- Current log_level is WARN. For more information, set 'log_level': 'INFO' / 'DEBUG' or use the -v and -vv flags.
:task_name:bundle_reservation_check_func
:actor_name:DQN
:actor_name:RolloutWorker
WARNING:tensorflow:OMP_NUM_THREADS is no longer used by the default Keras config. To configure the number of threads, use tf.config.threading APIs.
2021-09-03 22:15:50,244 ERROR actor.py:739 -- Exception raised in creation task: The actor died because of an error raised in its creation task, ray::DQN.__init__() (pid=20056, ip=192.168.93.146)
File "python\ray\_raylet.pyx", line 568, in ray._raylet.execute_task
File "python\ray\_raylet.pyx", line 572, in ray._raylet.execute_task
File "python\ray\_raylet.pyx", line 522, in ray._raylet.execute_task.function_executor
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\_private\function_manager.py", line 579, in actor_method_executor
return method(__ray_actor, *args, **kwargs)
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\util\tracing\tracing_helper.py", line 446, in _resume_span
return method(self, *_args, **_kwargs)
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\rllib\agents\trainer_template.py", line 137, in __init__
Trainer.__init__(self, config, env, logger_creator)
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\rllib\agents\trainer.py", line 598, in __init__
super().__init__(config, logger_creator)
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\tune\trainable.py", line 105, in __init__
self.setup(copy.deepcopy(self.config))
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\util\tracing\tracing_helper.py", line 446, in _resume_span
return method(self, *_args, **_kwargs)
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\rllib\agents\trainer_template.py", line 147, in setup
super().setup(config)
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\rllib\agents\trainer.py", line 745, in setup
self._init(self.config, self.env_creator)
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\util\tracing\tracing_helper.py", line 446, in _resume_span
return method(self, *_args, **_kwargs)
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\rllib\agents\trainer_template.py", line 171, in _init
self.workers = self._make_workers(
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\util\tracing\tracing_helper.py", line 446, in _resume_span
return method(self, *_args, **_kwargs)
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\rllib\agents\trainer.py", line 827, in _make_workers
return WorkerSet(
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\rllib\evaluation\worker_set.py", line 103, in __init__
self._local_worker = self._make_worker(
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\rllib\evaluation\worker_set.py", line 399, in _make_worker
worker = cls(
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\rllib\evaluation\rollout_worker.py", line 569, in __init__
self._build_policy_map(
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\rllib\evaluation\rollout_worker.py", line 1367, in _build_policy_map
self.policy_map.create_policy(name, orig_cls, obs_space, act_space,
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\rllib\policy\policy_map.py", line 136, in create_policy
self[policy_id] = class_(observation_space, action_space,
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\rllib\policy\tf_policy_template.py", line 237, in __init__
DynamicTFPolicy.__init__(
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\rllib\policy\dynamic_tf_policy.py", line 254, in __init__
self.exploration = self._create_exploration()
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\rllib\policy\policy.py", line 669, in _create_exploration
exploration = from_config(
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\rllib\utils\from_config.py", line 182, in from_config
object_ = constructor(*ctor_args, **ctor_kwargs)
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\rllib\utils\exploration\epsilon_greedy.py", line 62, in __init__
self.last_timestep = get_variable(
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\rllib\utils\framework.py", line 240, in get_variable
return tf.compat.v1.get_variable(
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\ops\variable_scope.py", line 1579, in get_variable
return get_variable_scope().get_variable(
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\ops\variable_scope.py", line 1322, in get_variable
return var_store.get_variable(
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\ops\variable_scope.py", line 578, in get_variable
return _true_getter(
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\ops\variable_scope.py", line 531, in _true_getter
return self._get_single_variable(
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\ops\variable_scope.py", line 887, in _get_single_variable
raise ValueError(err_msg)
ValueError: Variable timestep already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope?
2021-09-03 22:15:50,806 ERROR syncer.py:73 -- Log sync requires rsync to be installed.
2021-09-03 22:15:50,811 ERROR trial_runner.py:844 -- Trial DQN_sp_env-v0_b9e32_00000: Error processing event.
Traceback (most recent call last):
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\tune\trial_runner.py", line 810, in _process_trial
results = self.trial_executor.fetch_result(trial)
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\tune\ray_trial_executor.py", line 759, in fetch_result
result = ray.get(trial_future[0], timeout=DEFAULT_GET_TIMEOUT)
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\_private\client_mode_hook.py", line 89, in wrapper
return func(*args, **kwargs)
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\worker.py", line 1621, in get
raise value.as_instanceof_cause()
ray.exceptions.RayTaskError(AttributeError): ray::DQN.train()::Exiting (pid=20056, ip=192.168.93.146, repr=DQN)
File "python\ray\_raylet.pyx", line 568, in ray._raylet.execute_task
File "python\ray\_raylet.pyx", line 572, in ray._raylet.execute_task
File "python\ray\_raylet.pyx", line 522, in ray._raylet.execute_task.function_executor
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\_private\function_manager.py", line 579, in actor_method_executor
return method(__ray_actor, *args, **kwargs)
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\util\tracing\tracing_helper.py", line 446, in _resume_span
return method(self, *_args, **_kwargs)
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\rllib\agents\trainer.py", line 657, in train
raise e
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\rllib\agents\trainer.py", line 643, in train
result = Trainable.train(self)
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\tune\trainable.py", line 239, in train
result = self.step()
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\util\tracing\tracing_helper.py", line 446, in _resume_span
return method(self, *_args, **_kwargs)
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\rllib\agents\trainer_template.py", line 206, in step
res = next(self.train_exec_impl)
AttributeError: 'DQN' object has no attribute 'train_exec_impl'
<IPython.core.display.HTML object>
Result for DQN_sp_env-v0_b9e32_00000:
{}
<IPython.core.display.HTML object>
Traceback (most recent call last):
File "C:\Users\Reza\AppData\Local\Temp/ipykernel_20056/1797616614.py", line 1, in <module>
runfile('D:/ETHZ/thesis/housing_design/agents_floorplan/rllib_agents.py', wdir='D:/ETHZ/thesis/housing_design/agents_floorplan')
File "C:\Users\Reza\Anaconda3\envs\rllib\lib\site-packages\debugpy\_vendored\pydevd\_pydev_bundle\pydev_umd.py", line 167, in runfile
execfile(filename, namespace)
File "C:\Users\Reza\Anaconda3\envs\rllib\lib\site-packages\debugpy\_vendored\pydevd\_pydev_imps\_pydev_execfile.py", line 25, in execfile
exec(compile(contents + "\n", file, 'exec'), glob, loc)
File "D:/ETHZ/thesis/housing_design/agents_floorplan/rllib_agents.py", line 314, in <module>
tuner_analysis = self.tuner()
File "D:/ETHZ/thesis/housing_design/agents_floorplan/rllib_agents.py", line 154, in tuner
tuner_analysis = ray.tune.run(
File "C:\Users\Reza\AppData\Roaming\Python\Python38\site-packages\ray\tune\tune.py", line 608, in run
raise TuneError("Trials did not complete", incomplete_trials)
TuneError: ('Trials did not complete', [DQN_sp_env-v0_b9e32_00000])