Example code uses RLlib's DefaultCallbacks, but tune.run expects tune.Callback

How severe does this issue affect your experience of using Ray?

  • Medium: It contributes to significant difficulty to complete my task, but I can work around it.

I am trying to figure out callbacks using tune.run with a custom RLlib environment. I’ve referred to this example (using the branch corresponding to the most recent release on PyPI):

This example uses a custom Callbacks object subclassed from RLlib’s DefaultCallbacks class, but when I use it in tune.run, I get an error because it’s trying to call it’s setup method, but it doesn’t have a setup method. tune.Callback however, does have a setup method, and doesn’t produce errors.

Is there a way to use a subclass of RLlib’s DefaultCallbacks in tune.run rather than a subclass of tune.Callback, as shown in the custom_metrics_and_callbacks.py example?

I would also appreciate if someone could explain what exactly happens each step in the tuning loop, and how I can modify what’s written to tensorboard by the default logger.

Hi @Devin,

Welcome to the forum.

Does this post help at all?