Step vs Global step in wandb watch

Hi,

I’m new to using WandB (enjoying it so far :)). Could someone point me to a resource where I can read up the difference between Trainer global step and step?
Specifically, I’m trying to view my model gradients using wandb.watch() implemented with Pytorch Lightning and it is currently not displaying. A working example would be a huge help.

Thanks!
Dipti

2 Likes

Hi @insane_gupta ! Really happy that you’re enjoying WandB!
So the pytorch lightning trainer mantains track of how many steps have been taken during the training process and the wandb sdk also has an internal step counter which follows a different rule for increments.
Hence, both the global step and step variables are updated at different times due to the update conditions being different. Therefore, you must be seeing that both variables don’t have the same values. Hope this helps!

3 Likes

But what is the logic of the wandb sdk step counter? For me it does not seem to correspond to any interval in my code, so I have no idea what it means (and it tends to be the default x-axis in the wandb panels!).

2 Likes