Customize log axes
2 minute read
Use define_metric
to set a custom x axis.Custom x-axes are useful in contexts where you need to log to different time steps in the past during training, asynchronously. For example, this can be useful in RL where you may track the per-episode reward and a per-step reward.
Try define_metric
live in Google Colab →
Customize axes
By default, all metrics are logged against the same x-axis, which is the W&B internal step
. Sometimes, you might want to log to a previous step, or use a different x-axis.
Here’s an example of setting a custom x-axis metric, instead of the default step.
The x-axis can be set using globs as well. Currently, only globs that have string prefixes are available. The following example will plot all logged metrics with the prefix "train/"
to the x-axis "train/step"
:
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.