How to provide fold information in WandbCallback?

How to provide fold information in multi-fold training?

I am trying to do something like this:

for fold in range(5):
model.fit()

So it actually creates a single graph where steps are continued from the last executed step of previous epoch.
For ref see below:

I am thinking about this as well. I am about to give each fold a run name in wandb but not sure it is a good practice.

Not sure if I fully understand the question, you’d like to train on different folds, but continue training the model, as opposed to training a fresh model on each fold?

If you’re resuming the run you could update a fold config variable at the beginning of each for loop, so you would know the latest fold the model is training on?

for fold in range(5):
    wandb.config.update({'fold':fold})
    model.fit()

What other fold information were you hoping to log?

I’d love to help more here if you could clarify what you’re hoping would happen.

You can customise your x-axis using x-axis expressions if that’s all you want to do:

Here you can see I’m redefining the x-axis to be step - (fold*num_steps) where config:num_steps is the number of steps in each fold (100 in this case), fold is the current fold, and _step is the internal step logged by wandb.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.