experiment-tracking
Skill4 starsChanged 8 months agoMITArchived repositoryView on GitHub
Load when working with: MLflow experiments, run logging, model registry, artifact management, experiment comparison, cross-validation with tracking. Always use context manager — never log outside a run: Use autolog for quick iteration — disable before production for explicit control: Log CV results as metrics with step index: Loading a registered model: Request format:
- Sends data out
6 other projects use a version of this.
Adopted by
Most recently taken up by
- SkillMedev/data-science-mltheir own version, first seen Oct 5, 2026
- param087/agent-ml-skillstheir own version, first seen Jun 6, 2026
- jayll1303/AIEKittheir own version, first seen May 28, 2026
- kienbui1995/magic-powerstheir own version, first seen Apr 10, 2026
- JunMA98/Computer-science-claude-skillstheir own version, first seen Mar 11, 2026
- Hollis36/claude-skilltheir own version, first seen Jan 23, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- jayll1303/AIEKit★ 18same name
- param087/agent-ml-skills★ 11same name
- JunMA98/Computer-science-claude-skills★ 3same name
- Hollis36/claude-skill★ 1same name
- SkillMedev/data-science-ml★ 1same name
- kienbui1995/magic-powers★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository23 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- claude-api-patternsSkill
- critical-analysisSkill
- database-migration-safetySkill
- data-validationSkill
- design-doc-creatorSkill
- fastapi-patternsSkill
- github-actionsSkill
- htmx-frontendSkill
- infra-yandex-cloudSkill
- langgraph-patternsSkill
- ml-data-handlingSkill
- multimodal-routerSkill
- nlp-slm-patternsSkill
- predictive-analyticsSkill
- prompt-engineeringSkill
- python-project-standardsSkill
- rag-vector-dbSkill
- skill-developerSkill
- supply-chain-auditorSkill
- test-first-patternsSkill
- windows-developerSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Always use context manager — never log outside a run:
- Distinctive: line 44
Use autolog for quick iteration — disable before production for explicit control:
- Very specific: line 153
Always use with mlflow.start_run(): — orphan runs (logged outside context) pollute the experiment registry and are hard to clean up
- Very specific: line 154
Never call mlflow.end_run() manually — the context manager handles it.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Experiment Tracking
When to Load This Skill
Load when working with: MLflow experiments, run logging, model registry, artifact management, experiment comparison, cross-validation with tracking.
Core Concepts
| Concept | Purpose |
| Run | Single training execution — logs params, metrics, artifacts |
| Experiment | Named collection of runs — logical grouping by model type or task |
| Model Registry | Versioned model store — stages: None → Staging → Production |
| Artifact | Any file output — model weights, plots, feature importance |
Run Lifecycle Pattern
Always use context manager — never log outside a run:
import mlflow
import mlflow.sklearn
mlflow.set_experiment("my-experiment")
with mlflow.start_run(run_name="baseline-rf") as run:
mlflow.log_params({
"n_estimators": 100,
"max_depth": 5,
"random_state": 42,
})
model.fit(X_train, y_train)
score = model.score(X_val, y_val)
mlflow.log_metric("val_accuracy", score)
mlflow.sklearn.log_model(model, "model")
run_id = run.info.run_idAutolog Pattern
Use autolog for quick iteration — disable before production for explicit control:
mlflow.sklearn.autolog(
log_input_examples=True,
log_model_signatures=True,
log_models=True,
silent=True,
)
with mlflow.start_run():
model.fit(X_train, y_train)Cross-Validation with MLflow
Log CV results as metrics with step index:
from sklearn.model_selection import cross_val_score
import numpy as np
with mlflow.start_run():
mlflow.log_params({"cv_folds": 5, "model": "RandomForest"})
scores = cross_val_score(model, X, y, cv=5, scoring="f1_macro")
for i, score in enumerate(scores):
mlflow.log_metric("cv_f1", score, step=i)
mlflow.log_metric("cv_f1_mean", scores.mean())
mlflow.log_metric("cv_f1_std", scores.std())Model Registry
model_uri = f"runs:/{run_id}/model"
registered = mlflow.register_model(model_uri, "my-classifier")
client = mlflow.tracking.MlflowClient()
client.transition_model_version_stage(
name="my-classifier",
version=registered.version,
stage="Staging",
)Loading a registered model:
model = mlflow.sklearn.load_model("models:/my-classifier/Staging")Experiment Comparison
client = mlflow.tracking.MlflowClient()
runs = client.search_runs(
experiment_ids=["1"],
order_by=["metrics.val_f1 DESC"],
max_results=10,
)
for run in runs:
print(run.info.run_id, run.data.metrics.get("val_f1"))Serving via MLflow
mlflow models serve -m "models:/my-classifier/Production" --port 5001 --no-condaRequest format:
curl -X POST http://localhost:5001/invocations \
-H "Content-Type: application/json" \
-d '{"dataframe_records": [{"feature1": 1.0, "feature2": 2.0}]}'Artifact Logging
with mlflow.start_run():
fig.savefig("confusion_matrix.png")
mlflow.log_artifact("confusion_matrix.png", artifact_path="plots")
mlflow.log_dict(feature_importance_dict, "feature_importance.json")
mlflow.log_text(classification_report_str, "classification_report.txt")Project Structure for Tracking
src/{project_name}/
├── training/
│ ├── train.py # entry point — sets experiment, calls fit
│ ├── evaluate.py # eval loop — logs metrics per epoch/fold
│ └── register.py # promotes best run to Model Registry
├── mlruns/ # local tracking store (gitignore this)
└── mlflow.db # local SQLite backend (gitignore this)Known Pitfalls
- Always use
with mlflow.start_run():— orphan runs (logged outside context) pollute the experiment registry and are hard to clean up - Never call
mlflow.end_run()manually — the context manager handles it; manual calls can corrupt the run state - Set
MLFLOW_TRACKING_URIenv var in CI — default is./mlruns(relative), which breaks across working directories mlflow.autolog()must be called BEFOREmodel.fit()— calling it after has no effect
Resources
- MLflow docs: https://mlflow.org/docs/latest/
- Model Registry concepts: https://mlflow.org/docs/latest/model-registry.html
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

