class_docstr: Callback for saving model topology, losses & metrics.
  
  Optionally logs weights, gradients, sample predictions and best trained model.
  
  Arguments:
      learn (fastai.basic_train.Learner): the fast.ai learner to hook.
      log (str): "gradients", "parameters", "all", or None. Losses & metrics are always logged.
      save_model (bool): save model at the end of each epoch. It will also load best model at the end of training.
      monitor (str): metric to monitor for saving best model. None uses default TrackerCallback monitor value.
      mode (str): "auto", "min" or "max" to compare "monitor" values and define best model.
      input_type (str): "images" or None. Used to display sample predictions.
      validation_data (list): data used for sample predictions if input_type is set.
      predictions (int): number of predictions to make if input_type is set and validation_data is None.
      seed (int): initialize random generator for sample predictions if input_type is set and validation_data is None.
docstr: Call watch method to log model topology, gradients & weights.
docstr_tok: ["Call","watch","method","to","log","model","topology",",","gradients","&","weights","."]
code: def on_train_begin(self, **kwargs: Any) -> None:
      """Call watch method to log model topology, gradients & weights."""
      # Set self.best, method inherited from "TrackerCallback" by "SaveModelCallback"
      super().on_train_begin()
  
      # Ensure we don't call "watch" multiple times
      if not WandbCallback._watch_called:
          WandbCallback._watch_called = True
  
          # Logs model topology and optionally gradients and weights
          wandb.watch(self.learn.model, log=self.log)
  
file_path: wandb/wandb/integration/fastai/__init__.py
imports: import random
  import sys
  from pathlib import Path
  from typing import Any, Optional
  import fastai
  from fastai.callbacks import TrackerCallback
  import wandb
label_desc: Use image node_id 2 for calling the WandbCallback obj's underlying member method code with example usage: obj.on_train_begin() without return types