Skip to main content
YOLOX is an anchor-free version of YOLO for object detection. You can use the YOLOX Weights & Biases integration to turn on logging of metrics related to training, validation, and the system, and to interactively validate predictions with a single command-line argument. This guide shows you how to authenticate with Weights & Biases, install the integration, and enable Weights & Biases logging when you train a YOLOX object detection model so you can track metrics and inspect predictions in the W&B UI.

Sign up and create an API key

An API key authenticates your machine to Weights & Biases. You can generate an API key from your user profile.
For a more streamlined approach, go to User settings and create an API key. Copy the API key immediately and save it in a secure location such as a password manager.
  1. Click the account selector in the upper-right corner.
  2. Select User settings, then scroll to the API keys section.

Install the wandb library and log in

To install the wandb library locally and log in:
  1. Set the WANDB_API_KEY environment variable to your API key. Replace values enclosed in <> with your own:
  2. Install the wandb library and log in.

Log metrics

With the wandb library installed and your machine authenticated, you can enable Weights & Biases logging from the YOLOX training script. Use the --logger wandb command-line argument to turn on logging with wandb. Optionally, you can also pass all of the arguments that wandb.init() expects. Prepend each argument with wandb-. num_eval_imges controls the number of validation set images and predictions that Weights & Biases logs to tables for model evaluation. Replace the following placeholders before you run the command:
  • <project-name>: The name of your Weights & Biases project.
  • <entity>: Your Forge team name.
  • <run-name>: A name for this training run.
  • <run-id>: A unique identifier for this run.
  • <save-dir>: The directory where YOLOX saves checkpoints and logs.
  • <num-images>: The number of validation images to log.
  • <bool>: Whether to log checkpoints (true or false).

Example

After your training run starts, YOLOX streams training, validation, and system metrics to your Weights & Biases project, where you can compare runs and inspect predictions. See the following example for what a populated dashboard looks like. See the example dashboard with YOLOX training and validation metrics.
YOLOX training dashboard
If you have questions or issues about this Weights & Biases integration, open an issue in the YOLOX repository.
Last modified on October 23, 2026