Skip to content
Back to skills

Mlflow

ASecurity

Track machine-learning experiments, parameters, metrics, artifacts, and model-registry changes with MLflow.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 22, 2026
ai-agentspythongobashsqlgitbackend

Works with

  • cursor
  • cli

Security analysis

A100/100

Scanned October 22, 2026

npx -y skills add alivirgo/Major-AI-Skills --skill mlflow --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mlflow?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Mlflow
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alivirgo-mlflow/badge)](https://www.skillsdirectory.com/skills/alivirgo-mlflow)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: mlflow
description: "Track machine-learning experiments, parameters, metrics, artifacts, and model-registry changes with MLflow."
category: scientific
risk: safe
source: self
source_type: self
date_added: "2026-08-26"
tags: ["mlflow", "experiment-tracking", "model-registry", "mlops", "python", "claude"]
tools: ["claude", "cursor", "gemini", "codex"]
---

# MLflow Experiment Tracking AI Skill Guide

## Overview & Engine Architecture

MLflow records experiments as runs with parameters, metrics, tags, and artifacts. A tracking server (or local `mlruns/`) stores metadata; the Model Registry promotes versions through stages/aliases. Agents log enough to reproduce a run (code version, data URI, params), avoid silent metric overwrites, and register only evaluated candidates.

```
Training code
   -> mlflow.start_run
   -> log_param / log_metric / log_artifact
   -> log_model -> Registry (aliases/stages)
```

## When to use this skill

- Comparing hyperparameters and model families
- Attaching plots, confusion matrices, and conda/pip envs to runs
- Promoting models for batch/online inference with audit trail

## Operational directives

1. Set `experiment_name` explicitly; do not dump everything into `Default`.
2. Log data version / query / path as params or tags.
3. Use nested runs for sweeps when parent/child clarity helps.
4. Prefer `log_model` with signature/input example for serving readiness.
5. Gate registry promotion on held-out metrics, not training loss alone.

## Tracking example

```python
import mlflow
import mlflow.sklearn
from mlflow.models import infer_signature

mlflow.set_tracking_uri("http://127.0.0.1:5000")
mlflow.set_experiment("churn-models")

with mlflow.start_run(run_name="hgb-v3") as run:
    mlflow.log_params({"max_depth": 6, "learning_rate": 0.08})
    # ... train sklearn pipeline `clf` ...
    mlflow.log_metrics({"roc_auc": 0.91, "f1": 0.74})
    sig = infer_signature(X_train, clf.predict(X_train))
    mlflow.sklearn.log_model(clf, artifact_path="model", signature=sig)
    mlflow.set_tags({"data": "s3://bucket/churn_v4.parquet", "git_sha": "abc123"})
```

## CLI

```bash
mlflow ui --backend-store-uri sqlite:///mlflow.db --port 5000
mlflow runs list --experiment-name churn-models
```

## Common failures

| Symptom | Cause | Fix |
| --- | --- | --- |
| Empty UI | wrong tracking URI | align train + UI URIs |
| Cannot compare | inconsistent metric names | standardize naming |
| Huge artifacts | logging full datasets | log hashes/paths instead |
| Registry clutter | auto-register every run | register only candidates |

## Best practices

- One primary metric per experiment for sorting.
- Log environment (`mlflow.sklearn.autolog` carefully - still review).
- Immutable training data snapshots or lake table versions.
- Pair with `@scikit-learn` / `@pytorch` / `@huggingface-transformers`.

## Limitations

- Auth, multi-tenant servers, and artifact stores need ops setup.
- Autolog can miss custom loops - log manually when needed.
- Model serving deployment is separate from tracking.

## Related skills

- `@scikit-learn` / `@pytorch` - training frameworks
- `@airflow` / `@prefect` - schedule training jobs that log to MLflow
- `@jupyter` - exploratory runs still should log when kept

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.