Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
terrylica avatar

Mlflow Python

  • 130 installs
  • 62 repo stars
  • Updated August 3, 2026
  • terrylica/cc-skills

Use mlflow-python for development tasks

About

mlflow-python: A skill for development. This provides functionality for development workflows.

  • mlflow-python

Mlflow Python by the numbers

  • 130 all-time installs (skills.sh)
  • +1 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #2,738 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/terrylica/cc-skills --skill mlflow-python

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs130
repo stars62
Last updatedAugust 3, 2026
Repositoryterrylica/cc-skills

What it does

Use mlflow-python for development tasks

Files

SKILL.mdMarkdownGitHub ↗

MLflow Python Skill

Unified read/write MLflow operations via Python API with QuantStats integration for comprehensive trading metrics.

ADR: 2025-12-12-mlflow-python-skill

Note: This skill uses Pandas (MLflow API requires it). The mlflow-python path is auto-skipped by the Polars preference hook.
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.

When to Use This Skill

CAN Do:

  • Log backtest metrics (Sharpe, max_drawdown, total_return, etc.)
  • Log experiment parameters (strategy config, timeframes)
  • Create and manage experiments
  • Query runs with SQL-like filtering
  • Calculate 70+ trading metrics via QuantStats
  • Retrieve metric history (time-series data)

CANNOT Do:

  • Direct database access to MLflow backend
  • Artifact storage management (S3/GCS configuration)
  • MLflow server administration

Prerequisites

Authentication Setup

MLflow uses separate environment variables for credentials (NOT embedded in URI):

# Option 1: mise + .env.local (recommended)
# Create .env.local in skill directory with:
MLFLOW_TRACKING_URI=http://mlflow.eonlabs.com:5000
MLFLOW_TRACKING_USERNAME=eonlabs
MLFLOW_TRACKING_PASSWORD=<password>

# Option 2: Direct environment variables
export MLFLOW_TRACKING_URI="http://mlflow.eonlabs.com:5000"
export MLFLOW_TRACKING_USERNAME="eonlabs"
export MLFLOW_TRACKING_PASSWORD="<password>"

Verify Connection

/usr/bin/env bash << 'SKILL_SCRIPT_EOF'
cd ${CLAUDE_PLUGIN_ROOT}/skills/mlflow-python
uv run scripts/query_experiments.py experiments
SKILL_SCRIPT_EOF

Quick Start Workflows

A. Log Backtest Results (Primary Use Case)

/usr/bin/env bash << 'SKILL_SCRIPT_EOF_2'
cd ${CLAUDE_PLUGIN_ROOT}/skills/mlflow-python
uv run scripts/log_backtest.py \
  --experiment "crypto-backtests" \
  --run-name "btc_momentum_v2" \
  --returns path/to/returns.csv \
  --params '{"strategy": "momentum", "timeframe": "1h"}'
SKILL_SCRIPT_EOF_2

B. Search Experiments

uv run scripts/query_experiments.py experiments

C. Query Runs with Filter

uv run scripts/query_experiments.py runs \
  --experiment "crypto-backtests" \
  --filter "metrics.sharpe_ratio > 1.5" \
  --order-by "metrics.sharpe_ratio DESC"

D. Create New Experiment

uv run scripts/create_experiment.py \
  --name "crypto-backtests-2025" \
  --description "Q1 2025 cryptocurrency trading strategy backtests"

E. Get Metric History

uv run scripts/get_metric_history.py \
  --run-id abc123 \
  --metrics sharpe_ratio,cumulative_return

QuantStats Metrics Available

The log_backtest.py script calculates 70+ metrics via QuantStats, including:

CategoryMetrics
Ratiossharpe, sortino, calmar, omega, treynor
Returnscagr, total_return, avg_return, best, worst
Drawdownmax_drawdown, avg_drawdown, drawdown_days
Tradewin_rate, profit_factor, payoff_ratio, consecutive_wins/losses
Riskvolatility, var, cvar, ulcer_index, serenity_index
Advancedkelly_criterion, recovery_factor, risk_of_ruin, information_ratio

See quantstats-metrics.md for full list.

Bundled Scripts

ScriptPurpose
log_backtest.pyLog backtest returns with QuantStats metrics
query_experiments.pySearch experiments and runs (replaces CLI)
create_experiment.pyCreate new experiment with metadata
get_metric_history.pyRetrieve metric time-series data

Configuration

The skill uses mise [env] pattern for configuration. See .mise.toml for defaults.

Create .env.local (gitignored) for credentials:

MLFLOW_TRACKING_URI=http://mlflow.eonlabs.com:5000
MLFLOW_TRACKING_USERNAME=eonlabs
MLFLOW_TRACKING_PASSWORD=<password>

Reference Documentation

  • Authentication Patterns - Idiomatic MLflow auth
  • QuantStats Metrics - Full list of 70+ metrics
  • Query Patterns - DataFrame operations
  • Migration from CLI - CLI to Python API mapping

Migration from mlflow-query

This skill replaces the CLI-based mlflow-query skill. Key differences:

Featuremlflow-query (old)mlflow-python (new)
Log metricsNot supportedmlflow.log_metrics()
Log paramsNot supportedmlflow.log_params()
Query runsCLI text parsingDataFrame output
Metric historyWorkaround onlyNative support
Auth patternEmbedded in URISeparate env vars

See migration-from-cli.md for detailed mapping.

---

Troubleshooting

IssueCauseSolution
Connection refusedMLflow server not runningVerify MLFLOW_TRACKING_URI and server status
Authentication failedWrong credentialsCheck MLFLOW_TRACKING_USERNAME and PASSWORD in .env
Experiment not foundExperiment name typoRun query_experiments.py experiments to list all
QuantStats import errorMissing dependencyuv add quantstats in skill directory
Pandas import warningExpected for this skillIgnore - MLflow requires Pandas (hook-excluded)
Run creation failsExperiment doesn't existUse create_experiment.py to create first
Metric history emptyWrong run_id or metric nameVerify run_id with query_experiments.py runs
Returns CSV parse errorWrong date format or columnsCheck CSV has date index and returns column

Post-Execution Reflection

After this skill completes, check before closing:

1. Did the command succeed? — If not, fix the instruction or error table that caused the failure. 2. Did parameters or output change? — If the underlying tool's interface drifted, update Usage examples and Parameters table to match. 3. Was a workaround needed? — If you had to improvise (different flags, extra steps), update this SKILL.md so the next invocation doesn't need the same workaround.

Only update if the issue is real and reproducible — not speculative.

Related skills

Backend & APIsbackendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.