ClearML Experiment Tracking and MLOps Setup

We design and deploy artificial intelligence systems: from prototype to production-ready solutions. Our team combines expertise in machine learning, data engineering and MLOps to make AI work not in the lab, but in real business.
Showing 1 of 1 servicesAll 1566 services
ClearML Experiment Tracking and MLOps Setup
Medium
~2-3 business days
FAQ
AI Development Areas
AI Solution Development Stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1243
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1170
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    873
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1086
  • image_logo-advance_0.png
    B2B Advance company logo design
    563
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    830

Setting up ClearML for experiment tracking

ClearML (formerly Trains) is a full-fledged open-source MLOps platform: tracking, task orchestration, data versioning, and model serving. Its advantage over MLflow is its built-in task queue and automatic experiment playback.

Installing a self-hosted server

# Docker Compose для self-hosted
git clone https://github.com/allegroai/clearml-server
cd clearml-server
docker compose -f docker-compose.yml up -d

# Веб-интерфейс: http://localhost:8080

Basic usage

from clearml import Task, Logger

# Инициализация — автоматически захватывает git status, pip packages, конфигурацию
task = Task.init(
    project_name="Fraud Detection",
    task_name="LGBM Baseline",
    task_type=Task.TaskTypes.training,
)

# Параметры
task.connect({
    "learning_rate": 0.05,
    "n_estimators": 500,
    "dataset_version": "v2.3"
})

# Логирование метрик
logger = task.get_logger()
for epoch in range(100):
    logger.report_scalar("Loss", "train", iteration=epoch, value=train_loss)
    logger.report_scalar("Loss", "val", iteration=epoch, value=val_loss)
    logger.report_scalar("F1", "val", iteration=epoch, value=val_f1)

# Таблицы и изображения
logger.report_table("Test Predictions", "Confusion Matrix", iteration=0, table_plot=cm_df)
logger.report_matplotlib_figure("ROC Curve", "ROC", iteration=0, figure=fig)

ClearML Agent for playback

Unique feature: automatic playback of any experiment:

# Запуск агента (на другой машине, включая GPU)
clearml-agent daemon --queue default --detached

# Клонирование и повторный запуск эксперимента
clearml-agent execute --id <task_id>

Hyperparameter Optimization

from clearml.automation import HyperParameterOptimizer, RandomSearch

optimizer = HyperParameterOptimizer(
    base_task_id=task.id,
    hyper_parameters=[
        UniformParameterRange("learning_rate", min_value=0.001, max_value=0.1),
        DiscreteParameterRange("n_estimators", values=[100, 200, 500]),
    ],
    objective_metric_title="F1",
    objective_metric_series="val",
    objective_metric_sign="max",
    max_number_of_concurrent_tasks=4,
    optimizer_class=RandomSearch,
    total_max_jobs=50,
)
optimizer.start()

ClearML is well-suited for teams with limited budgets for SaaS tools—it's a full-fledged, self-hosted MLOps solution without enterprise licenses.