How to use WandB mixin in custom call backs

Hello,

I would like to use WandB mixin in Custom Callbacks.
My goal would be to log and send histograms for example.

Please do you have code examples on how to do that?

I keep getting this error.

  File "/home/ubuntu/.local/lib/python3.7/site-packages/ray/tune/integration/wandb.py", line 521, in __init__
    "Wandb mixin specified but no configuration has been passed. "
ValueError: Wandb mixin specified but no configuration has been passed. Make sure to include a `wandb` key in your `config` dict containing at least a `project` specification.

when using the mixin decorator around the on_episode_end method in the callbacks.

Thank you ! :slight_smile:

Hey @Selim_Amrouni , thanks for the question. Could someone from the Ray Tune team help here? @kai @rliaw ? Thx! :slight_smile:

Hi @Selim_Amrouni, the mixin can only be used for trainables, not for callbacks.

Within the trainable you can then use the regular wandb API to communicate with Weights & Biases.

You will also need to pass a configuration dict to tune.

See the documentation here: External library integrations (tune.integration) — Ray v1.6.0

Hello Kai,

Thank you for your answer. So if I want to retrieve data computed in callbacks, what would you advise to do?