Closed fhabermacher closed 4 years ago
Update: Sorry, I think this behaviour just appeared as for some reason I had added tf.compat.v1.enable_v2_behavior()
before the ray.init
statement; removing the additional statement again lets the example run as intended.
Did it mean Ray does'nt work with tf.compat.v1.enable_v2_behavior()
?
Running running the rllib exercise rllib_exercises/rllib_exercise02_ppo.ipynb. yields an Attribute Error 'list' object has no attribute 'keys' for line
self.assignment_nodes[name] for name in new_weights.keys()
in ray/experimental/tf_utils.py:2020-03-11 20:02:48,636 ERROR worker.py:998 -- Possible unhandled error from worker: ray::RolloutWorker.set_weights() (pid=6035, ip=192.168.178.71) File "python/ray/_raylet.pyx", line 452, in ray._raylet.execute_task File "python/ray/_raylet.pyx", line 430, in ray._raylet.execute_task.function_executor File "/home/florian/BB/rlliblearn/py/venv/lib/python3.6/site-packages/ray/rllib/evaluation/rollout_worker.py", line 550, in set_weights self.policy_map[pid].set_weights(w) File "/home/florian/BB/rlliblearn/py/venv/lib/python3.6/site-packages/ray/rllib/policy/tf_policy.py", line 290, in set_weights return self._variables.set_weights(weights) File "/home/florian/BB/rlliblearn/py/venv/lib/python3.6/site-packages/ray/experimental/tf_utils.py", line 182, in set_weights self.assignment_nodes[name] for name in new_weights.keys() AttributeError: 'list' object has no attribute 'keys'
Ray version and other system information (Python version, TensorFlow version, OS): ray == 0.8.2 tensorflow == 2.1.0 Python 3.6.10 OS: Ubuntu 16.04
See also https://github.com/ray-project/ray/issues/7318