clearml
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "clearml":https://skillpi.com/zh/skills/deepskill-a164436070f472898b0dd8a8691d3191db4c3b1bed89c3cbf66ee73a14715137。安装前核对上游来源和版本:https://github.com/TerminalSkills/skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
为 ClearML 提供专家级指导——一个开源 MLOps 平台,用于实验跟踪、流水线编排、数据管理和模型部署。帮助开发者以最少代码设置机器学习实验跟踪、构建可复现的流水线,并管理从训练到部署的完整模型生命周期。
介绍来源: third_party · TerminalSkills · 1.0.0 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: clearml
description: Expert guidance for ClearML, the open-source MLOps platform for experiment tracking, pipeline orchestration, data management, and model deployment. Helps developers set up ML experiment tracking with minimal code, build reproducible pipelines, and manage the full ML lifecycle from training to serving.
license: Apache-2.0
compatibility: No special requirements
metadata:
author: terminal-skills
version: 1.0.0
category: data-ai
tags:
- ml-ops
- experiment-tracking
- pipeline
- orchestration
- data-managementClearML — Open-Source ML Operations
Overview
ClearML, the open-source MLOps platform for experiment tracking, pipeline orchestration, data management, and model deployment. Helps developers set up ML experiment tracking with minimal code, build reproducible pipelines, and manage the full ML lifecycle from training to serving.
Instructions
Experiment Tracking (Two Lines of Code)
# train.py — Automatic experiment tracking
from clearml import Task
# Just these two lines auto-capture everything:
# - Git repo, branch, and diff
# - All installed packages
# - CLI arguments
# - stdout/stderr
# - Framework metrics (PyTorch, TensorFlow, scikit-learn)
task = Task.init(project_name="NLP", task_name="sentiment-classifier-v2")
# All print statements, matplotlib plots, and framework metrics
# are automatically captured — zero additional code needed
import torch
from transformers import AutoModelForSequenceClassification, Trainer, TrainingArguments
model = AutoModelForSequenceClassification.from_pretrained("distilbert-base-uncased", num_labels=3)
training_args = TrainingArguments(
output_dir="./results",
num_train_epochs=3,
per_device_train_batch_size=32,
learning_rate=2e-5,
evaluation_strategy="epoch",
logging_steps=50,
# ClearML auto-captures all these parameters
)
trainer = Trainer(
model=model,
args=training_args,
train_dataset=train_dataset,
eval_dataset=eval_dataset,
)
# Training metrics automatically logged to ClearML dashboard
trainer.train()
# Explicitly log additional data
task.get_logger().report_scalar("custom", "metric", value=0.95, iteration=100)
task.upload_artifact("model_weights", artifact_object="./results/pytorch_model.bin")
Pipeline Orchestration
# pipeline.py — ML pipeline with ClearML
from clearml import PipelineController
pipe = PipelineController(
name="Training Pipeline",
project="NLP",
version="1.0",
)
# Step 1: Data preprocessing
pipe.add_step(
name="preprocess",
base_task_project="NLP",
base_task_name="data-preprocess", # Reference an existing task template
parameter_override={
"General/dataset_version": "v2.1",
"General/max_samples": 50000,
},
)
# Step 2: Training (depends on preprocessing)
pipe.add_step(
name="train",
parents=["preprocess"],
base_task_project="NLP",
base_task_name="train-model",
parameter_override={
"General/epochs": 5,
"General/learning_rate": "${preprocess.learning_rate}", # Reference parent output
},
)
# Step 3: Evaluation
pipe.add_step(
name="evaluate",
parents=["train"],
base_task_project="NLP",
base_task_name="evaluate-model",
)
# Step 4: Deploy if metrics meet threshold
pipe.add_step(
name="deploy",
parents=["evaluate"],
base_task_project="NLP",
base_task_name="deploy-model",
pre_execute_callback=lambda pipeline, node, params: {
# Only deploy if accuracy > 0.9
pipeline.get_step("evaluate").get_metric("accuracy") > 0.9
},
)
# Run the pipeline
pipe.start()
Data Management
# data_versioning.py — Version and manage datasets
from clearml import Dataset
# Create a versioned dataset
dataset = Dataset.create(
dataset_name="customer-reviews-v2",
dataset_project="NLP",
description="Customer reviews with sentiment labels, cleaned and deduplicated",
)
# Add files
dataset.add_files(path="./data/reviews.parquet")
dataset.add_files(path="./data/labels.csv")
# Upload and finalize (creates immutable version)
dataset.upload()
dataset.finalize()
print(f"Dataset ID: {dataset.id}")
# Use the dataset in training
dataset = Dataset.get(
dataset_name="customer-reviews-v2",
dataset_project="NLP",
)
local_path = dataset.get_local_copy() # Downloads and caches locally
# local_path now points to a directory with reviews.parquet and labels.csv
# Create a new version (inherits from parent)
new_version = Dataset.create(
dataset_name="customer-reviews-v3",
dataset_project="NLP",
parent_datasets=[dataset.id], # Inherits files from v2
)
new_version.add_files("./data/new_reviews.parquet") # Add new data
new_version.remove_files("data/old_labels.csv") # Remove outdated files
new_version.upload()
new_version.finalize()
Remote Execution (ClearML Agent)
# Run any task on remote machines with ClearML Agent
from clearml import Task
task = Task.init(project_name="NLP", task_name="train-large-model")
# This task was created locally, but we can clone and run it remotely
task.execute_remotely(queue_name="gpu-queue")
# Everything after this line runs on the remote machine
# ClearML Agent handles:
# - Setting up the environment (pip install, git clone)
# - Downloading datasets
# - Running the code
# - Uploading results and artifacts
# Start a ClearML Agent on a GPU machine
clearml-agent daemon --queue gpu-queue --gpus 0
# Or with Docker isolation
clearml-agent daemon --queue gpu-queue --docker --gpus all
Hyperparameter Optimization
# hpo.py — Automated hyperparameter search
from clearml import Task
from clearml.automation import HyperParameterOptimizer, UniformParameterRange, DiscreteParameterRange
optimizer = HyperParameterOptimizer(
base_task_id="<template-task-id>", # Task to optimize
hyper_parameters=[
UniformParameterRange("General/learning_rate", min_value=1e-5, max_value=1e-3),
UniformParameterRange("General/weight_decay", min_value=0, max_value=0.1),
DiscreteParameterRange("General/batch_size", values=[16, 32, 64]),
DiscreteParameterRange("General/epochs", values=[3, 5, 10]),
],
objective_metric_title="eval",
objective_metric_series="f1",
objective_metric_sign="max", # Maximize F1 score
max_number_of_concurrent_tasks=4,
optimizer_class="OptimizerBOHB", # Bayesian optimization
execution_queue="gpu-queue",
total_max_jobs=50,
)
optimizer.start()
optimizer.wait()
# Get the best configuration
best = optimizer.get_top_experiments(top_k=1)[0]
print(f"Best F1: {best.get_metric('eval', 'f1')}")
print(f"Best params: {best.get_parameters()}")
Installation
# Python SDK
pip install clearml
# Configure (interactive — sets API credentials)
clearml-init
# Self-hosted server (Docker Compose)
docker compose -f docker-compose.yml up -d
# Dashboard at http://localhost:8080
# Or use ClearML Cloud (free tier available)
# https://app.clear.ml
Examples
Example 1: Setting up an evaluation pipeline for a RAG application
User request:
I have a RAG chatbot that answers questions from our docs. Set up Clearml to evaluate answer quality.
The agent creates an evaluation suite with appropriate metrics (faithfulness, relevance, answer correctness), configures test datasets from real user questions, runs baseline evaluations, and sets up CI integration so evaluations run on every prompt or retrieval change.
Example 2: Comparing model performance across prompts
User request:
We're testing GPT-4o vs Claude on our customer support prompts. Set up a comparison with Clearml.
The agent creates a structured experiment with the existing prompt set, configures both model providers, defines scoring criteria specific to customer support (accuracy, tone, completeness), runs the comparison, and generates a summary report with statistical significance indicators.
Guidelines
- Two lines to start —
Task.init()auto-captures everything; add explicit logging only for custom metrics - Use dataset versioning — Version your training data alongside code; reproducibility requires both
- Remote execution for GPU work — Develop locally, run on GPU machines with
execute_remotely(); no SSH needed - Pipeline for reproducibility — Define training pipelines as code; each run is fully reproducible with tracked inputs/outputs
- Queue-based execution — Use queues to route tasks to appropriate hardware (CPU queue, GPU queue, high-memory queue)
- HPO with Bayesian optimization — Use BOHB optimizer for efficient hyperparameter search; better than grid/random search
- Self-host for privacy — Run the ClearML server on your own infrastructure; all data stays in your network
- Compare experiments in dashboard — Use the web UI to overlay training curves, compare hyperparameters, and identify winners
当前收录版本
1.0.0
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供实验跟踪、流水线编排、数据管理和模型部署等核心 MLOps 功能
- 详细代码示例覆盖从训练到部署的完整机器学习生命周期
- 解决机器学习开发者在实验管理和可复现性方面的明确痛点
亮点
- 触发词精准完整,覆盖实验跟踪、流水线编排、数据管理、模型部署等多种场景
- 提供具体用户请求示例,触发条件清晰明确
亮点
- 结构清晰,分为 Overview、Instructions、Installation、Examples、Guidelines 等部分
- 每个部分都有详细的代码示例和说明,frontmatter 完整
亮点
- 工具来源明确,参数使用正确,覆盖主要使用场景和异常处理
- 提供完整的安装和使用指南,确保执行可靠性
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
-
安装或获取外部依赖
使用官方来源并锁定版本,在隔离环境检查安装脚本。当前文档检查不覆盖后续下载的代码。
主文档提及 · 第 190, 241 行 -
账号、密钥或授权
使用专用、最小权限账号,不把密钥粘贴到公开内容或命令日志;核对接收数据的服务与租户。
主文档提及 · 第 243 行
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- app.clear.ml
- localhost
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。