# ClearML

> Open-source MLOps suite that auto-logs your experiments, data, and pipelines

- Category: Training & Fine-Tuning / Experiment Tracking
- Language: Python
- Repository: https://github.com/clearml/clearml
- Website: https://clear.ml
- Canonical page: https://ai-tldr.dev/tools/clearml/

## In short

ClearML is an open-source suite for machine-learning development and production. Its core is the Experiment Manager, which automatically logs your runs, hyper-parameters, metrics, console output, and model artifacts once you add a couple of lines to your training script. It sits in the Experiment Tracking category of the Training & Fine-Tuning tools and is open-source, written in Python.

## Overview

ClearML is an open-source suite for machine-learning development and production. Its core is the Experiment Manager, which automatically logs your runs, hyper-parameters, metrics, console output, and model artifacts once you add a couple of lines to your training script. Around that sit modules for data management, orchestration and pipelines, and model serving, all backed by a ClearML server you can self-host or use through the free hosted tier.

It is aimed at ML and deep-learning engineers and teams who want experiment tracking without rewriting their code. ClearML hooks into common frameworks such as PyTorch, TensorFlow, Keras, scikit-learn, XGBoost, and LightGBM, and captures Tensorboard scalars, Matplotlib figures, and resource usage automatically.

In the experiment-tracking category, ClearML stands out by bundling tracking with the rest of an MLOps stack: the same platform that records a run can also version the dataset behind it, queue the job on a remote agent, and serve the resulting model.

## What it does

- Automatic experiment logging from two lines of code: source control state, installed packages, hyper-parameters, and initial model weights
- Captures stdout/stderr, CPU/GPU resource monitoring, model snapshots, and artifacts, with optional upload to S3, Google Storage, Azure, or a shared folder
- Logs Tensorboard/TensorboardX scalars, metrics, histograms, images, audio, and video, plus Matplotlib and Seaborn figures
- Hyper-parameter capture for argparse, Click, Python Fire, Hydra, and TensorFlow defines
- Built-in integrations for PyTorch (incl. Ignite and Lightning), TensorFlow, Keras, FastAI, XGBoost, LightGBM, and scikit-learn
- Wider MLOps modules: data versioning, orchestration and pipelines, model serving, and reports, all on a self-hostable ClearML server

## Getting started

Install the Python package, connect it to a ClearML server (the free hosted tier or your own), and add a Task to your training script.

1. Install the package

   Install ClearML from PyPI.

```bash
pip install clearml
```

2. Connect to a ClearML server

   Run the init wizard and paste the credentials from your ClearML workspace (the free hosted app or a self-hosted server) when prompted.

```bash
clearml-init
```

3. Add tracking to your script

   Create a Task at the start of your code. From there ClearML auto-logs the run, its environment, hyper-parameters, metrics, and artifacts.

```python
from clearml import Task

task = Task.init(project_name="my project", task_name="my experiment")
```

## When to use it

- Track and compare deep-learning training runs without changing your existing PyTorch or TensorFlow code
- Give a team a shared, searchable history of experiments, metrics, and model snapshots
- Version datasets and tie each run back to the exact data it used
- Queue and orchestrate training jobs on remote agents across cloud, Kubernetes, or bare-metal machines
