class_docstr: An internal YOLO model wrapper that tracks metrics, and logs models to Weights & Biases.
  
  Usage:
  ```python
  from wandb.integration.yolov8.yolov8 import WandbCallback
  
  model = YOLO("yolov8n.pt")
  wandb_logger = WandbCallback(
      model,
  )
  for event, callback_fn in wandb_logger.callbacks.items():
      model.add_callback(event, callback_fn)
  ```
class_docstr_tok: ["An","internal","YOLO","model","wrapper","that","tracks","metrics",",","and","logs","models","to","Weights","&","Biases",".","Usage",":","``","`","python","from","wandb.integration.yolov8.yolov8","import","WandbCallback","model","=","YOLO","(","``","yolov8n.pt","''",")","wandb_logger","=","WandbCallback","(","model",",",")","for","event",",","callback_fn","in","wandb_logger.callbacks.items","(",")",":","model.add_callback","(","event",",","callback_fn",")","``","`"]
docstr: On fit epoch end we log all the best metrics and model detail to Weights & Biases run summary.
docstr_tok: ["On","fit","epoch","end","we","log","all","the","best","metrics","and","model","detail","to","Weights","&","Biases","run","summary","."]
code: def on_fit_epoch_end(self, trainer: BaseTrainer) -> None:
      """On fit epoch end we log all the best metrics and model detail to Weights & Biases run summary."""
      assert self.run is not None
      if trainer.epoch == 0:
          speeds = [
              trainer.validator.speed.get(
                  key,
              )
              for key in (1, "inference")
          ]
          speed = speeds[0] if speeds[0] else speeds[1]
          if speed:
              self.run.summary.update(
                  {
                      "model/speed(ms/img)": round(speed, 3),
                  }
              )
      if trainer.best_fitness == trainer.fitness:
          self.run.summary.update(
              {
                  "best/epoch": trainer.epoch + 1,
                  **{
                      f"best/{key}": val
                      for key, val in trainer.metrics.items()
                  },
              }
          )
  
file_path: wandb/wandb/integration/yolov8/yolov8.py
imports: from typing import Any, Callable, Dict, List, Optional
  from ultralytics.yolo.engine.model import YOLO
  from ultralytics.yolo.engine.trainer import BaseTrainer
  from ultralytics.yolo.v8.classify.train import ClassificationTrainer
  import wandb
  from wandb.sdk.lib import telemetry
label_desc: Use image node_id 6 for calling the WandbCallback obj's underlying member method code with example usage: obj.on_fit_epoch_end(trainer) without return types