Training YOLO26 with ClearML: Streamlining Your MLOps Workflow
MLOps bridges the gap between creating and deploying machine learning models in real-world settings. It focuses on efficient deployment, scalability, and ongoing management to ensure models perform well in practical applications.
Ultralytics YOLO26 integrates with ClearML to track and manage the training of your object detection models. This guide will walk you through the integration process, detailing how to set up ClearML, manage experiments, automate model management, and collaborate effectively.
ClearML#
ClearML is an open-source MLOps platform designed to automate, monitor, and orchestrate machine learning workflows. Its key features include automated logging of training and inference data for experiment reproducibility, a web UI for data visualization and analysis, hyperparameter optimization algorithms, and model management for deployment across platforms.
YOLO26 Training with ClearML#
Integrating YOLO26 with ClearML automates experiment logging and makes training runs easier to reproduce and compare.
Installation#
To install the required packages, run:
# Install the required packages for YOLO26 and ClearML
pip install ultralytics clearmlFor detailed instructions and best practices related to the installation process, be sure to check our YOLO26 Installation guide. While installing the required packages for YOLO26, if you encounter any difficulties, consult our Common Issues guide for solutions and tips.
Configuring ClearML#
Once you have installed the necessary packages, the next step is to initialize and configure your ClearML SDK. This involves setting up your ClearML account and obtaining the credentials that connect your development environment to the ClearML server.
Begin by initializing the ClearML SDK in your environment. The clearml-init command starts the setup process and prompts you for the necessary credentials.
# Initialize your ClearML SDK setup process
clearml-initAfter executing this command, visit the ClearML Settings page. Navigate to the top right corner and select "Settings." Go to the "Workspace" section and click on "Create new credentials." Use the credentials provided in the "Create Credentials" pop-up to complete the setup as instructed, depending on whether you are configuring ClearML in a Jupyter Notebook or a local Python environment.
Usage#
from ultralytics import YOLO
# The callback creates and connects the ClearML task automatically
model = YOLO("yolo26n.pt")
results = model.train(
data="coco8.yaml",
epochs=16,
project="my_project",
name="my_yolo26_task",
)Understanding the Code#
Once ClearML is installed and configured, its callback is enabled by default. It creates a task when training starts, uses the YOLO project and name arguments for the ClearML project and task names, and connects the training arguments automatically. Run yolo settings clearml=False to disable the integration. For training options and best practices, see the YOLO26 Model Training guide.
Understanding the Output#
Upon running the usage code snippet above, you can expect the following output:
- A confirmation message indicating the creation of a new ClearML task, along with its unique ID.
- An informational message about the script code being stored, indicating that the code execution is being tracked by ClearML.
- A URL link to the ClearML results page where you can monitor the training progress and view detailed logs.
- Download progress for the YOLO26 model and the specified dataset, followed by a summary of the model architecture and training configuration.
- Initialization messages for various training components like Automatic Mixed Precision (AMP) and dataset preparation.
- Finally, the training process starts, with progress updates as the model trains on the specified dataset. For an in-depth understanding of the performance metrics used during training, read our guide on performance metrics.
Viewing the ClearML Results Page#
By clicking on the URL link to the ClearML results page in the output of the usage code snippet, you can access a comprehensive view of your model's training process.
Key Features of the ClearML Results Page#
-
Real-Time Metrics Tracking
- Track critical metrics like loss, accuracy, and validation scores as they occur.
- Provides immediate feedback for timely model performance adjustments.
-
Experiment Comparison
- Compare different training runs side-by-side.
- Essential for hyperparameter tuning and identifying the most effective models.
-
Detailed Logs and Outputs
- Access comprehensive logs, graphical representations of metrics, and console outputs.
- Gain a deeper understanding of model behavior and issue resolution.
-
Resource Utilization Monitoring
- Monitor the utilization of computational resources, including CPU, GPU, and memory.
- Key to optimizing training efficiency and costs.
-
Model Artifacts Management
- View, download, and share model artifacts like trained models and checkpoints.
- Enhances collaboration and streamlines model deployment and sharing.
For a visual walkthrough of what the ClearML Results Page looks like, watch the video below:
Watch: YOLO26 MLOps Integration using ClearML
Advanced Features in ClearML#
ClearML offers several advanced features to enhance your MLOps experience.
Remote Execution#
ClearML's remote execution feature facilitates the reproduction and manipulation of experiments on different machines. It logs essential details like installed packages and uncommitted changes. When a task is enqueued, the ClearML Agent pulls it, recreates the environment, and runs the experiment, reporting back with detailed results.
Deploying a ClearML Agent is straightforward and can be done on various machines using the following command:
clearml-agent daemon --queue QUEUES_TO_LISTEN_TO [--docker]This setup is applicable to cloud VMs, local GPUs, or laptops. ClearML Autoscalers help manage cloud workloads on platforms like AWS, GCP, and Azure, automating the deployment of agents and adjusting resources based on your resource budget.
Cloning, Editing, and Enqueuing#
ClearML's user-friendly interface allows easy cloning, editing, and enqueuing of tasks. Users can clone an existing experiment, adjust parameters or other details through the UI, and enqueue the task for execution. This streamlined process ensures that the ClearML Agent executing the task uses updated configurations, making it ideal for iterative experimentation and model fine-tuning.
Dataset Version Management#
ClearML also offers dataset version management that works with YOLO26 training workflows. This feature allows you to:
- Version your datasets separately from your code
- Track which dataset version was used for each experiment
- Easily access and download the latest dataset version
To prepare your dataset for ClearML, follow these steps:
-
Organize your dataset with the standard YOLO structure (images, labels, etc.)
-
Copy the corresponding YAML file to the root of your dataset folder
-
Upload your dataset using the ClearML Data tool:
cd your_dataset_folder clearml-data sync --project YOLO26 --name your_dataset_name --folder .
This command will create a versioned dataset in ClearML that can be referenced in your training scripts, ensuring reproducibility and easy access to your data.
Summary#
This guide has led you through the process of integrating ClearML with Ultralytics' YOLO26. Covering everything from initial setup to advanced model management, you've seen how to use ClearML for efficient training, experiment tracking, and workflow optimization in your machine learning projects.
For further details on usage, visit ClearML's official YOLOv8 integration guide, which also applies to YOLO26 workflows.
FAQ#
Integrating Ultralytics YOLO26 with ClearML involves a series of steps to streamline your MLOps workflow. First, install the necessary packages:
pip install ultralytics clearmlNext, initialize the ClearML SDK in your environment using:
clearml-initYou then configure ClearML with your credentials from the ClearML Settings page. Detailed instructions on the entire setup process, including model selection and training configurations, can be found in our YOLO26 Model Training guide.
Using ClearML with Ultralytics YOLO26 enhances your machine learning projects by automating experiment tracking, streamlining workflows, and enabling robust model management. ClearML offers real-time metrics tracking, resource utilization monitoring, and a user-friendly interface for comparing experiments. These features help optimize your model's performance and make the development process more efficient. Learn more about the benefits and procedures in our YOLO26 Model Training guide.
If you encounter issues during the integration of YOLO26 with ClearML, consult our Common Issues guide for solutions and tips. Typical problems might involve package installation errors, credential setup, or configuration issues. This guide provides step-by-step troubleshooting instructions to resolve these common issues efficiently.
After
clearml-init, start training normally. The callback creates the ClearML task and connects the training arguments automatically:from ultralytics import YOLO model = YOLO("yolo26n.pt") results = model.train(data="coco8.yaml", epochs=16, project="my_project", name="my_yolo26_task")The YOLO
projectandnamearguments become the ClearML project and task names. See the Usage guide for details.After running your YOLO26 training script with ClearML, you can view the results on the ClearML results page. The output will include a URL link to the ClearML dashboard, where you can track metrics, compare experiments, and monitor resource usage. For more details on how to view and interpret the results, check our section on Viewing the ClearML Results Page.
Comments
Ask a question, share your results, or help someone else.