class_docstr: Stateful callback for logging to W&B.
  
  In particular, it will log model checkpoints, predictions, and
  ground-truth annotations with interactive overlays for bounding boxes
  to Weights & Biases Tables during training, validation and prediction
  for a `ultratytics` workflow.
  
  **Usage:**
  
  ```python
  from ultralytics.yolo.engine.model import YOLO
  from wandb.yolov8 import add_wandb_callback
  
  # initialize YOLO model
  model = YOLO("yolov8n.pt")
  
  # add wandb callback
  add_wandb_callback(model, max_validation_batches=2, enable_model_checkpointing=True)
  
  # train
  model.train(data="coco128.yaml", epochs=5, imgsz=640)
  
  # validate
  model.val()
  
  # perform inference
  model(["img1.jpeg", "img2.jpeg"])
  ```
  
  Args:
      model: YOLO Model of type `:class:ultralytics.yolo.engine.model.YOLO`.
      max_validation_batches: maximum number of validation batches to log to
          a table per epoch.
      enable_model_checkpointing: enable logging model checkpoints as
          artifacts at the end of eveny epoch if set to `True`.
      visualize_skeleton: visualize pose skeleton by drawing lines connecting
          keypoints for human pose.
class_docstr_tok: ["Stateful","callback","for","logging","to","W","&","B",".","In","particular",",","it","will","log","model","checkpoints",",","predictions",",","and","ground-truth","annotations","with","interactive","overlays","for","bounding","boxes","to","Weights","&","Biases","Tables","during","training",",","validation","and","prediction","for","a","`","ultratytics","`","workflow",".","*","*","Usage",":","*","*","``","`","python","from","ultralytics.yolo.engine.model","import","YOLO","from","wandb.yolov8","import","add_wandb_callback","#","initialize","YOLO","model","model","=","YOLO","(","``","yolov8n.pt","''",")","#","add","wandb","callback","add_wandb_callback","(","model",",","max_validation_batches=2",",","enable_model_checkpointing=True",")","#","train","model.train","(","data=","''","coco128.yaml","''",",","epochs=5",",","imgsz=640",")","#","validate","model.val","(",")","#","perform","inference","model","(","[","``","img1.jpeg","''",",","``","img2.jpeg","''","]",")","``","`","Args",":","model",":","YOLO","Model","of","type","`",":","class",":","ultralytics.yolo.engine.model.YOLO","`",".","max_validation_batches",":","maximum","number","of","validation","batches","to","log","to","a","table","per","epoch",".","enable_model_checkpointing",":","enable","logging","model","checkpoints","as","artifacts","at","the","end","of","eveny","epoch","if","set","to","`","True","`",".","visualize_skeleton",":","visualize","pose","skeleton","by","drawing","lines","connecting","keypoints","for","human","pose","."]
code: def on_train_start(self, trainer: TRAINER_TYPE):
      with telemetry.context(run=wandb.run) as tel:
          tel.feature.ultralytics_yolov8 = True
      wandb.config.train = vars(trainer.args)
  
file_path: wandb/wandb/integration/ultralytics/callback.py
imports: import copy
  from datetime import datetime
  from typing import Callable, Dict, Optional, Union
  from packaging import version
  import wandb
  from wandb.sdk.lib import telemetry
label_desc: Use image node_id 5 for calling the WandBUltralyticsCallback obj's underlying member method code with example usage: obj.on_train_start(trainer) without return types