I run wandb.watch before my training script starts but that doesn’t seem to track the histograms of weights and gradients. The script I have is nothing too complicated - just generating random data and fitting it after applying a quadratic:
There are two things you might be running into here – can’t confirm because your code relies on the ultimate-utils package.
wandb.watch will only start working once you call wandb.logafter a backwards pass that touches the watched Module (docs).
The frequency with which gradients/params are logged is controlled by the log_freq argument. If the number of logging calls is less than the value of log_freq, then no information will be logged. Here’s a short colab reproducing this behavior.
Also, if you want params and gradients, you need to set the log kwarg to "all". By default, we log only gradients.