class_docstr: Saves model topology, losses & metrics
class_docstr_tok: ["Saves","model","topology",",","losses","&","metrics"]
code: def after_fit(self):
      if self.log_preds and not self.log_preds_every_epoch:
          self.log_predictions()
      if self.log_model:
          if self.save_model.last_saved_path is None:
              print(
                  "WandbCallback could not retrieve a model to upload"
              )
          else:
              metadata = {
                  n: s
                  for n, s in zip(
                      self.recorder.metric_names, self.recorder.log
                  )
                  if n not in ["train_loss", "epoch", "time"]
              }
              log_model(
                  self.save_model.last_saved_path,
                  name=self.save_model.fname,
                  metadata=metadata,
              )
      self.run = True
      if self.log_preds:
          self.remove_cb(FetchPredsCallback)
  
      wandb.log({})  # ensure sync of last step
      self._wandb_step += 1
  
imports: from __future__ import annotations
  from ..basics import *
  from .progress import *
  from ..text.data import TensorText
  from ..tabular.all import TabularDataLoaders, Tabular
  from .hook import total_params
  from .tracker import SaveModelCallback
  import wandb
label_desc: Use image node_id 8 for calling the WandbCallback obj's underlying member method code with example usage: obj.after_fit() without return types