pythonmachine-learningwandb

Is there a way to scale the x axis in wandb in the website?


I'm working with weight and bias(wandb). My data is already logged but I would like to scale the plot, as my data was logged every 5 epochs I would like to at least change the numbers in the scale so they stay true to their nature. For example, my plot shows it ran till 500 epochs when in reality it was 2500.

How can I scale x axis AFTER uploading?

I tried using the X-Axis Expression in the Expressions tab but the x-axis stays the same.


Solution

  • You can use ${_step}*100 in the expression editor to scale the x-axis.

    Other ways:

    If you logged the step that you'd like to use, you can use that as the X-axis enter image description here

    If you're happy to use process time, you can use that for your x-axis.

    Here's how you can programmatically choose which step metric to use for a given logged metric:

    run = wandb.init()
    run.define_metric("epoch", hidden=True) # don't create a plot for "epoch"
    run.define_metric("training/loss", step_metric="epoch")
    run.log({"training/loss": 0.01, "epoch": 5})