Search code examples
wandb

is there any way to scale axis of plots in wandb?


I am working with weight and bias(wandb).
However, it logs by step. And that makes plot disturbing when comparing runs.
For example, I have a run A and run B(assume that they run with same dataset).
run A: 30epochs, 4 batch, 200step/epoch
run B: 30epochs, 8 batch, 100step/epoch

then, the plot of run A gets longer(double, in this case) in axis x when it shows with run B.

How can I scale x axis depend to runs AFTER training?


Solution

  • You can change the x-axis used via the chart settings by clicking on the pencil icon and then selecting a different x-axis. E.g. in your case you could select "epoch" instead of "steps". Just make sure to log "epoch" to your charts, something like:

    steps_per_epoch = n_samples / batch_size
    epoch = current_step / steps_per_epoch
    wandb.log({"epoch":epoch, ...})