Saving gym render video to tensorboard

I am trying to visualize the progress of my rllib model using ray.tune in tensorboard. I am not sure how to best approach this, I have a custom environment with an rgb output that should be compatable.

I have been trying to run the programme using cartpole-v0 with config['render_env] = True I get thje following error message:

`Traceback (most recent call last):
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/tune/trial_runner.py”, line 718, in _process_trial
results = self.trial_executor.fetch_result(trial)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/tune/ray_trial_executor.py”, line 688, in fetch_result
result = ray.get(trial_future[0], timeout=DEFAULT_GET_TIMEOUT)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/_private/client_mode_hook.py”, line 62, in wrapper
return func(*args, **kwargs)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/worker.py”, line 1495, in get
raise value.as_instanceof_cause()
ray.exceptions.RayTaskError(NoSuchDisplayException): ray::PPO.train_buffered() (pid=46360, ip=192.168.50.7)
File “python/ray/_raylet.pyx”, line 501, in ray._raylet.execute_task
File “python/ray/_raylet.pyx”, line 451, in ray._raylet.execute_task.function_executor
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/_private/function_manager.py”, line 563, in actor_method_executor
return method(__ray_actor, *args, **kwargs)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/tune/trainable.py”, line 173, in train_buffered
result = self.train()
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/rllib/agents/trainer.py”, line 605, in train
raise e
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/rllib/agents/trainer.py”, line 594, in train
result = Trainable.train(self)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/tune/trainable.py”, line 232, in train
result = self.step()
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/rllib/agents/trainer_template.py”, line 173, in step
res = next(self.train_exec_impl)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/util/iter.py”, line 756, in next
return next(self.built_iterator)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/util/iter.py”, line 783, in apply_foreach
for item in it:
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/util/iter.py”, line 783, in apply_foreach
for item in it:
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/util/iter.py”, line 843, in apply_filter
for item in it:
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/util/iter.py”, line 843, in apply_filter
for item in it:
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/util/iter.py”, line 783, in apply_foreach
for item in it:
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/util/iter.py”, line 783, in apply_foreach
for item in it:
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/util/iter.py”, line 783, in apply_foreach
for item in it:
[Previous line repeated 1 more time]
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/util/iter.py”, line 876, in apply_flatten
for item in it:
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/util/iter.py”, line 828, in add_wait_hooks
item = next(it)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/util/iter.py”, line 783, in apply_foreach
for item in it:
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/util/iter.py”, line 783, in apply_foreach
for item in it:
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/util/iter.py”, line 783, in apply_foreach
for item in it:
[Previous line repeated 1 more time]
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/util/iter.py”, line 471, in base_iterator
yield ray.get(futures, timeout=timeout)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/_private/client_mode_hook.py”, line 62, in wrapper
return func(*args, **kwargs)
ray.exceptions.RayTaskError(NoSuchDisplayException): ray::RolloutWorker.par_iter_next() (pid=46287, ip=192.168.50.7)
File “python/ray/_raylet.pyx”, line 501, in ray._raylet.execute_task
File “python/ray/_raylet.pyx”, line 451, in ray._raylet.execute_task.function_executor
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/_private/function_manager.py”, line 563, in actor_method_executor
return method(__ray_actor, *args, **kwargs)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/util/iter.py”, line 1151, in par_iter_next
return next(self.local_it)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/rllib/evaluation/rollout_worker.py”, line 333, in gen_rollouts
yield self.sample()
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/rllib/evaluation/rollout_worker.py”, line 726, in sample
batches = [self.input_reader.next()]
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/rllib/evaluation/sampler.py”, line 99, in next
batches = [self.get_data()]
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/rllib/evaluation/sampler.py”, line 226, in get_data
item = next(self.rollout_provider)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/rllib/evaluation/sampler.py”, line 659, in _env_runner
rendered = base_env.try_render()
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/rllib/env/base_env.py”, line 377, in try_render
return self.vector_env.try_render_at(env_id)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/rllib/env/vector_env.py”, line 189, in try_render_at
return self.envs[index].render()
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/gym/core.py”, line 240, in render
return self.env.render(mode, **kwargs)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/gym/envs/classic_control/cartpole.py”, line 174, in render
from gym.envs.classic_control import rendering
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/gym/envs/classic_control/rendering.py”, line 25, in
from pyglet.gl import *
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/pyglet/gl/init.py”, line 232, in
import pyglet.window
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/pyglet/window/init.py”, line 1899, in
gl._create_shadow_window()
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/pyglet/gl/init.py”, line 206, in _create_shadow_window
_shadow_window = Window(width=1, height=1, visible=False)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/pyglet/window/xlib/init.py”, line 173, in init
super(XlibWindow, self).init(*args, **kwargs)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/pyglet/window/init.py”, line 585, in init
display = pyglet.canvas.get_display()
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/pyglet/canvas/init.py”, line 94, in get_display
return Display()
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/pyglet/canvas/xlib.py”, line 123, in init
raise NoSuchDisplayException(‘Cannot connect to “%s”’ % name)
pyglet.canvas.xlib.NoSuchDisplayException: Cannot connect to “None”
Result for PPO_CartPole-v1_e125b_00000:
{}

== Status ==
Memory usage on this node: 12.6/125.7 GiB
Using FIFO scheduling algorithm.
Resources requested: 0/64 CPUs, 0/1 GPUs, 0.0/76.12 GiB heap, 0.0/36.61 GiB objects (0.0/1.0 accelerator_type:RTX)
Result logdir: /home/quessy/Dev/flyer/flyer/ray_checkpoints/PPO
Number of trials: 1/1 (1 ERROR)`

Then when trying to run env_rendering_and_recording.py from github ray master (cant link due to user limit)

I get the same following error:

python render_example.py
2021-07-21 13:14:15,299 INFO services.py:1272 – View the Ray dashboard at
== Status ==
Memory usage on this node: 5.3/125.7 GiB
Using FIFO scheduling algorithm.
Resources requested: 0/4 CPUs, 0/1 GPUs, 0.0/76.14 GiB heap, 0.0/36.62 GiB objects (0.0/1.0 accelerator_type:RTX)
Result logdir: /home/quessy/ray_results/PPO
Number of trials: 1/1 (1 PENDING)
±----------------------------------±---------±------+
| Trial name | status | loc |
|-----------------------------------±---------±------|
| PPO_CustomRenderedEnv_2b622_00000 | PENDING | |
±----------------------------------±---------±------+

(pid=45750) 2021-07-21 13:14:18,481 INFO trainer.py:671 – Tip: set framework=tfe or the --eager flag to enable TensorFlow eager execution
(pid=45750) 2021-07-21 13:14:18,482 INFO trainer.py:696 – Current log_level is WARN. For more information, set ‘log_level’: ‘INFO’ / ‘DEBUG’ or use the -v and -vv flags.
(pid=45750) 2021-07-21 13:14:21,784 WARNING deprecation.py:33 – DeprecationWarning: simple_optimizer has been deprecated. This will raise an error in the future!
(pid=45749) /home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/gym/logger.py:30: UserWarning: WARN: Trying to monitor an environment which has no ‘spec’ set. This usually means you
did not create it via ‘gym.make’, and is recommended only for advanced users.
(pid=45749) warnings.warn(colorize(’%s: %s’%(‘WARN’, msg % args), ‘yellow’))
(pid=45749) Setting the path for recording to /home/quessy/ray_results/PPO/PPO_CustomRenderedEnv_2b622_00000_0_2021-07-21_13-14-16/videos
(pid=45749) Setting the path for recording to /home/quessy/ray_results/PPO/PPO_CustomRenderedEnv_2b622_00000_0_2021-07-21_13-14-16/videos
2021-07-21 13:14:27,849 ERROR trial_runner.py:748 – Trial PPO_CustomRenderedEnv_2b622_00000: Error processing event.
Traceback (most recent call last):
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/tune/trial_runner.py”, line 718, in _process_trial
results = self.trial_executor.fetch_result(trial)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/tune/ray_trial_executor.py”, line 688, in fetch_result
result = ray.get(trial_future[0], timeout=DEFAULT_GET_TIMEOUT)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/_private/client_mode_hook.py”, line 62, in wrapper
return func(*args, **kwargs)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/worker.py”, line 1495, in get
raise value.as_instanceof_cause()
ray.exceptions.RayTaskError(NoSuchDisplayException): ray::PPO.train_buffered() (pid=45750, ip=192.168.50.7)
File “python/ray/_raylet.pyx”, line 501, in ray._raylet.execute_task
File “python/ray/_raylet.pyx”, line 451, in ray._raylet.execute_task.function_executor
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/_private/function_manager.py”, line 563, in actor_method_executor
return method(__ray_actor, *args, **kwargs)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/tune/trainable.py”, line 173, in train_buffered
result = self.train()
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/rllib/agents/trainer.py”, line 605, in train
raise e
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/rllib/agents/trainer.py”, line 594, in train
result = Trainable.train(self)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/tune/trainable.py”, line 232, in train
result = self.step()
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/rllib/agents/trainer_template.py”, line 186, in step
evaluation_metrics = eval_future.result()
File “/usr/lib/python3.8/concurrent/futures/_base.py”, line 444, in result
return self.__get_result()
File “/usr/lib/python3.8/concurrent/futures/_base.py”, line 389, in __get_result
raise self._exception
File “/usr/lib/python3.8/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/rllib/agents/trainer.py”, line 877, in evaluate
ray.get([
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/_private/client_mode_hook.py”, line 62, in wrapper
return func(*args, **kwargs)
ray.exceptions.RayTaskError(NoSuchDisplayException): ray::RolloutWorker.sample() (pid=45749, ip=192.168.50.7)
File “python/ray/_raylet.pyx”, line 501, in ray._raylet.execute_task
File “python/ray/_raylet.pyx”, line 451, in ray._raylet.execute_task.function_executor
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/_private/function_manager.py”, line 563, in actor_method_executor
return method(__ray_actor, *args, **kwargs)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/rllib/evaluation/rollout_worker.py”, line 726, in sample
batches = [self.input_reader.next()]
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/rllib/evaluation/sampler.py”, line 99, in next
batches = [self.get_data()]
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/rllib/evaluation/sampler.py”, line 226, in get_data
item = next(self.rollout_provider)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/rllib/evaluation/sampler.py”, line 665, in _env_runner
from gym.envs.classic_control.rendering import
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/gym/envs/classic_control/rendering.py”, line 25, in
from pyglet.gl import *
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/pyglet/gl/init.py”, line 232, in
import pyglet.window
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/pyglet/window/init.py”, line 1899, in
gl._create_shadow_window()
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/pyglet/gl/init.py”, line 206, in _create_shadow_window
_shadow_window = Window(width=1, height=1, visible=False)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/pyglet/window/xlib/init.py”, line 173, in init
super(XlibWindow, self).init(*args, **kwargs)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/pyglet/window/init.py”, line 585, in init
display = pyglet.canvas.get_display()
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/pyglet/canvas/init.py”, line 94, in get_display
return Display()
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/pyglet/canvas/xlib.py”, line 123, in init
raise NoSuchDisplayException(‘Cannot connect to “%s”’ % name)
pyglet.canvas.xlib.NoSuchDisplayException: Cannot connect to “None”
Result for PPO_CustomRenderedEnv_2b622_00000:
{}

== Status ==
Memory usage on this node: 6.7/125.7 GiB
Using FIFO scheduling algorithm.
Resources requested: 0/4 CPUs, 0/1 GPUs, 0.0/76.14 GiB heap, 0.0/36.62 GiB objects (0.0/1.0 accelerator_type:RTX)
Result logdir: /home/quessy/ray_results/PPO
Number of trials: 1/1 (1 ERROR)
±----------------------------------±---------±------+
| Trial name | status | loc |
|-----------------------------------±---------±------|
| PPO_CustomRenderedEnv_2b622_00000 | ERROR | |
±----------------------------------±---------±------+
Number of errored trials: 1
±----------------------------------±-------------±-----------------------------------------------------------------------------------------------+
| Trial name | # failures | error file |
|-----------------------------------±-------------±-----------------------------------------------------------------------------------------------|
| PPO_CustomRenderedEnv_2b622_00000 | 1 | /home/quessy/ray_results/PPO/PPO_CustomRenderedEnv_2b622_00000_0_2021-07-21_13-14-16/error.txt |
±----------------------------------±-------------±-----------------------------------------------------------------------------------------------+

== Status ==
Memory usage on this node: 6.7/125.7 GiB
Using FIFO scheduling algorithm.
Resources requested: 0/4 CPUs, 0/1 GPUs, 0.0/76.14 GiB heap, 0.0/36.62 GiB objects (0.0/1.0 accelerator_type:RTX)
Result logdir: /home/quessy/ray_results/PPO
Number of trials: 1/1 (1 ERROR)
±----------------------------------±---------±------+
| Trial name | status | loc |
|-----------------------------------±---------±------|
| PPO_CustomRenderedEnv_2b622_00000 | ERROR | |
±----------------------------------±---------±------+
Number of errored trials: 1
±----------------------------------±-------------±-----------------------------------------------------------------------------------------------+
| Trial name | # failures | error file |
|-----------------------------------±-------------±-----------------------------------------------------------------------------------------------|
| PPO_CustomRenderedEnv_2b622_00000 | 1 | /home/quessy/ray_results/PPO/PPO_CustomRenderedEnv_2b622_00000_0_2021-07-21_13-14-16/error.txt |
±----------------------------------±-------------±-----------------------------------------------------------------------------------------------+

Traceback (most recent call last):
File “render_example.py”, line 131, in
results = tune.run(“PPO”, config=config, stop=stop)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/tune/tune.py”, line 543, in run
raise TuneError(“Trials did not complete”, incomplete_trials)
ray.tune.error.TuneError: (‘Trials did not complete’, [PPO_CustomRenderedEnv_2b622_00000])

I have read [RLlib] Visualise custom environment - #15 by Lauritowal but thought merge [RLlib] Fix env rendering and recording options (for non-local mode; >0 workers; +evaluation-workers). by sven1977 · Pull Request #14796 · ray-project/ray · GitHub solved this problem.

I was also looking at #1607 in RLlib forum but couldn’t work out how to use the callback, I tried using the VideoCallback(DefaultCallbacks) class as described in the config class but returned an error as follows:

2021-07-21 13:29:29,565 INFO services.py:1272 – View the Ray dashboard at
== Status ==
Memory usage on this node: 7.6/125.7 GiB
Using FIFO scheduling algorithm.
Resources requested: 0/64 CPUs, 0/1 GPUs, 0.0/76.07 GiB heap, 0.0/36.59 GiB objects (0.0/1.0 accelerator_type:RTX)
Result logdir: /home/quessy/Dev/flyer/flyer/ray_checkpoints/PPO
Number of trials: 1/1 (1 PENDING)
±----------------------------±---------±------+
| Trial name | status | loc |
|-----------------------------±---------±------|
| PPO_CartPole-v1_4c786_00000 | PENDING | |
±----------------------------±---------±------+

2021-07-21 13:29:33,020 ERROR trial_runner.py:748 – Trial PPO_CartPole-v1_4c786_00000: Error processing event.
Traceback (most recent call last):
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/tune/trial_runner.py”, line 718, in _process_trial
results = self.trial_executor.fetch_result(trial)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/tune/ray_trial_executor.py”, line 688, in fetch_result
result = ray.get(trial_future[0], timeout=DEFAULT_GET_TIMEOUT)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/_private/client_mode_hook.py”, line 62, in wrapper
return func(*args, **kwargs)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/worker.py”, line 1497, in get
raise value
ray.exceptions.RayActorError: The actor died because of an error raised in its creation task, ray::PPO.init() (pid=56327, ip=192.168.50.7)
File “python/ray/_raylet.pyx”, line 501, in ray._raylet.execute_task
File “python/ray/_raylet.pyx”, line 451, in ray._raylet.execute_task.function_executor
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/_private/function_manager.py”, line 563, in actor_method_executor
return method(__ray_actor, *args, **kwargs)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/rllib/agents/trainer_template.py”, line 123, in init
Trainer.init(self, config, env, logger_creator)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/rllib/agents/trainer.py”, line 548, in init
super().init(config, logger_creator)
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/tune/trainable.py”, line 98, in init
self.setup(copy.deepcopy(self.config))
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/rllib/agents/trainer.py”, line 689, in setup
raise ValueError(
ValueError: callbacks must be a callable method that returns a subclass of DefaultCallbacks, got [<main.VideoCallback object at 0x7f8007357c70>]
Result for PPO_CartPole-v1_4c786_00000:
{}

== Status ==
Memory usage on this node: 8.0/125.7 GiB
Using FIFO scheduling algorithm.
Resources requested: 0/64 CPUs, 0/1 GPUs, 0.0/76.07 GiB heap, 0.0/36.59 GiB objects (0.0/1.0 accelerator_type:RTX)
Result logdir: /home/quessy/Dev/flyer/flyer/ray_checkpoints/PPO
Number of trials: 1/1 (1 ERROR)
±----------------------------±---------±------+
| Trial name | status | loc |
|-----------------------------±---------±------|
| PPO_CartPole-v1_4c786_00000 | ERROR | |
±----------------------------±---------±------+
Number of errored trials: 1
±----------------------------±-------------±-------------------------------------------------------------------------------------------------------------+
| Trial name | # failures | error file |
|-----------------------------±-------------±-------------------------------------------------------------------------------------------------------------|
| PPO_CartPole-v1_4c786_00000 | 1 | /home/quessy/Dev/flyer/flyer/ray_checkpoints/PPO/PPO_CartPole-v1_4c786_00000_0_2021-07-21_13-29-31/error.txt |
±----------------------------±-------------±-------------------------------------------------------------------------------------------------------------+

(pid=56327) 2021-07-21 13:29:33,016 ERROR worker.py:418 – Exception raised in creation task: The actor died because of an error raised in its creation task, ray::PPO.init() (pid=56327, ip=192.168.50.7)
(pid=56327) File “python/ray/_raylet.pyx”, line 501, in ray._raylet.execute_task
(pid=56327) File “python/ray/_raylet.pyx”, line 451, in ray._raylet.execute_task.function_executor
(pid=56327) File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/_private/function_manager.py”, line 563, in actor_method_executor
(pid=56327) return method(__ray_actor, *args, **kwargs)
(pid=56327) File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/rllib/agents/trainer_template.py”, line 123, in init
(pid=56327) Trainer.init(self, config, env, logger_creator)
(pid=56327) File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/rllib/agents/trainer.py”, line 548, in init
(pid=56327) super().init(config, logger_creator)
(pid=56327) File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/tune/trainable.py”, line 98, in init
(pid=56327) self.setup(copy.deepcopy(self.config))
(pid=56327) File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/rllib/agents/trainer.py”, line 689, in setup
(pid=56327) raise ValueError(
(pid=56327) ValueError: callbacks must be a callable method that returns a subclass of DefaultCallbacks, got [<main.VideoCallback object at 0x7f8007357c70>]
Traceback (most recent call last):
File “ray_rllib.py”, line 166, in
drl.train()
File “ray_rllib.py”, line 67, in train
analysis = tune.run(
File “/home/quessy/Dev/flyer/flyervenv/lib/python3.8/site-packages/ray/tune/tune.py”, line 543, in run
raise TuneError(“Trials did not complete”, incomplete_trials)
ray.tune.error.TuneError: (‘Trials did not complete’, [PPO_CartPole-v1_4c786_00000])

Thanks for any help :grinning: