/major-ai-skills:mlflowfrom major-ai-skills
Track ML experiments and promote models with MLflow 3 patterns: runs/params/metrics/artifacts, proxied artifact stores, and Model Registry aliases (champion) instead of deprecated stages.
Ships in major-ai-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
MLflow Tracking records experiments → runs with parameters, metrics, tags, and artifacts. A tracking server (or local mlruns/) holds metadata; an artifact store (local, S3/MinIO, or server-proxied) holds files. The Model Registry versions models and (since stages are deprecated) uses aliases (champion, challenger) and tags for deployment intent. Agents log enough to reproduce a run, align client/server tracking URIs, and promote only evaluated candidates via aliases—not every train job.
┌─────────────────────────────────────────────────────────────┐
│ MLflow tracking + registry │
│ │
│ Training process │
│ ├── set_tracking_uri / set_experiment │
│ ├── start_run → log_params / log_metrics / log_artifact │
│ ├── log_model (+ signature / input example) │
│ └── optional nested runs (sweeps) │
│ │
│ Tracking server │
│ ├── backend store (sqlite / postgres / …) │
│ └── artifacts: --artifacts-destination (proxied) or S3 │
│ │
│ Model Registry │
│ ├── registered model → versions │
│ ├── aliases: models:/name@champion (prefer over stages) │
│ └── tags: validation_status, task, env │
└─────────────────────────────────────────────────────────────┘
Use when
Do not use when
mlflow.set_experiment)—never dump prod work into Default.MLFLOW_TRACKING_URI or set_tracking_uri).log_model with infer_signature + input example for serving readiness.champion / challenger) and tags; treat stages (Production/Staging) as legacy.--artifacts-destination (proxied) so clients do not write server-local paths; artifact config changes often apply to new experiments only.champion every run.Server (dev/team):
mlflow server \
--host 0.0.0.0 \
--port 5000 \
--backend-store-uri sqlite:///mlflow.db \
--artifacts-destination ./mlartifacts
Training + registry (aliases, not stages):
from __future__ import annotations
import os
import mlflow
import mlflow.sklearn
from mlflow import MlflowClient
from mlflow.models import infer_signature
from sklearn.datasets import load_breast_cancer
from sklearn.ensemble import HistGradientBoostingClassifier
from sklearn.metrics import roc_auc_score
from sklearn.model_selection import train_test_split
mlflow.set_tracking_uri(os.environ.get("MLFLOW_TRACKING_URI", "http://127.0.0.1:5000"))
mlflow.set_experiment("churn-models")
X, y = load_breast_cancer(return_X_y=True, as_frame=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
with mlflow.start_run(run_name="hgb-v3") as run:
params = {"max_depth": 6, "learning_rate": 0.08}
mlflow.log_params(params)
clf = HistGradientBoostingClassifier(**params).fit(X_train, y_train)
proba = clf.predict_proba(X_test)[:, 1]
auc = roc_auc_score(y_test, proba)
mlflow.log_metrics({"roc_auc": auc})
mlflow.set_tags({
"data": "sklearn.breast_cancer",
"git_sha": os.environ.get("GIT_SHA", "local"),
"validation_status": "pending",
})
sig = infer_signature(X_train, clf.predict(X_train))
model_info = mlflow.sklearn.log_model(
sk_model=clf,
artifact_path="model",
signature=sig,
input_example=X_train.head(3),
registered_model_name="breast-cancer-hgb", # or register in a later gated step
)
client = MlflowClient()
# Resolve version from registration; pin explicitly in real pipelines
versions = client.search_model_versions("name='breast-cancer-hgb'")
latest = max(versions, key=lambda v: int(v.version))
if auc >= 0.90:
client.set_registered_model_alias("breast-cancer-hgb", "champion", latest.version)
client.set_model_version_tag("breast-cancer-hgb", latest.version, "validation_status", "passed")
# Load by alias for serving / batch jobs
import mlflow.pyfunc
model = mlflow.pyfunc.load_model("models:/breast-cancer-hgb@champion")
| Signature | Likely cause | Fix path |
|---|---|---|
| Empty / wrong runs in UI | Trainer URI ≠ UI/server URI | Unify MLFLOW_TRACKING_URI; confirm experiment name |
| Unable to list artifacts / permission denied | Client writing server filesystem; missing boto3/creds; bad MinIO endpoint | --artifacts-destination proxy; install boto3 on server; fix MLFLOW_S3_ENDPOINT_URL (http endpoint, not s3://) |
| Artifact fix “does nothing” | Config applies to new experiments | Create a new experiment after server artifact changes |
| Cannot compare runs | Inconsistent metric names | Standardize roc_auc vs auc; one primary metric |
| Registry clutter | Auto-register every run | Register only candidates; alias only after eval |
| Stage-based URI failures | Legacy models:/name/Production | Migrate to models:/name@champion |
| Autolog misses custom loop | Unsupported ops | Manual log_metric / log_params |
| Huge artifact store | Logging full datasets | Log hashes/paths/queries instead |
team, env, dataset_version, git_sha on every meaningful run.@scikit-learn / @pytorch / @huggingface-transformers training code.@airflow / @prefect with tracking URI injected as config—not hardcoded secrets.@vllm for LLMs).@scikit-learn / @pytorch / @huggingface-transformers — training frameworks that log here@airflow / @prefect — scheduled training jobs@jupyter — exploratory runs that should still set experiment + tags@docker — packaging tracking server + artifact proxyMANDATORY: Set experiment and tracking URI explicitly. Log data version + git SHA + signature on models. Prefer registry aliases over deprecated stages. Configure proxied artifacts for remote trainers. Never commit cloud credentials into URIs or notebooks.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub alivirgo/major-ai-skills --plugin major-ai-skills412 skills in this plugin
/3d-slicerAutomate 3D Slicer research workflows with MRML, VTK/ITK, DICOM data, and Segment Editor. Use for software workflows, not clinical interpretation./abbreviated-git-statusInspect Git branch, staging, and working-tree changes with short or porcelain status output when a compact repository check is needed./ableton-liveAutomate Ableton Live sessions with Python MIDI Remote Scripts, Max for Live, AbletonOSC, and Link synchronization./act-as-a-personal-tutorExplain a subject step by step, assess prior knowledge, and use short exercises to check understanding before advancing.Other plugins' skills for the same job