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

Querying Mlflow Metrics

  • 520 installs
  • 66 repo stars
  • Updated July 30, 2026
  • mlflow/skills

querying-mlflow-metrics is a Claude Code skill that runs fetch_metrics.py against MLflow tracking servers so developers who operate traced LLM apps can aggregate token usage, latency, and assessment metrics over time.

About

querying-mlflow-metrics is an MLflow skills workflow centered on scripts/fetch_metrics.py for querying aggregated trace metrics from an MLflow tracking server. It supports five core metrics—trace_count, latency, input_tokens, output_tokens, and total_tokens—with eight aggregations including COUNT, SUM, AVG, MIN, MAX, P50, P95, and P99, plus optional grouping by trace_name or trace_status and hourly or daily buckets via --time-interval. Developers can query SPANS or ASSESSMENTS views for span_count or assessment_value trends, filter windows with --start-time values like -24h or -7d, and emit table or JSON output with -o json. Reach for querying-mlflow-metrics when reviewing LLM cost spikes, P95 latency regressions, error-rate breakdowns by trace_status, or average assessment scores by evaluator name during ML ops reviews. The bundled references/api_reference.md documents filter syntax when you extend queries beyond the default table output examples in the skill README.

  • MLflow run and metric queries
  • Experiment comparison workflows
  • Model performance trend inspection
  • Ops-friendly tracking server access
  • Supports iterative model evaluation loops

Querying Mlflow Metrics by the numbers

  • 520 all-time installs (skills.sh)
  • +40 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #441 of 2,064 Data Science & ML skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/mlflow/skills --skill querying-mlflow-metrics

Add your badge

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

Listed on Skillselion
Installs520
repo stars66
Last updatedJuly 30, 2026
Repositorymlflow/skills

How do you query MLflow LLM token usage trends?

Query MLflow runs, compare experiment metrics, and surface model performance trends during ML ops and experiment review.

Who is it for?

Developers operating MLflow-traced LLM applications who need CLI-friendly cost and latency aggregates without building a custom metrics dashboard first.

Skip if: Developers debugging a single failed chat turn who need full span trees rather than aggregated trace metrics across experiments.

When should I use this skill?

The user asks for MLflow token usage trends, latency percentiles, trace counts, or assessment score aggregates over a time range.

What you get

Aggregated metric tables or JSON with SUM, AVG, P95, COUNT breakdowns by time bucket, trace_name, trace_status, or assessment_name.

  • aggregated metrics table
  • JSON metrics export
  • dimensional breakdown reports

By the numbers

  • fetch_metrics.py supports 5 trace metrics including total_tokens and latency
  • Exposes 8 aggregation functions: COUNT, SUM, AVG, MIN, MAX, P50, P95, P99
  • Hourly bucketing uses --time-interval 3600 with relative windows like -24h

Files

SKILL.mdMarkdownGitHub ↗

MLflow Metrics

Run scripts/fetch_metrics.py to query metrics from an MLflow tracking server.

Examples

Token usage summary:

python scripts/fetch_metrics.py -s http://localhost:5000 -x 1 -m total_tokens -a SUM,AVG

Output: AVG: 223.91 SUM: 7613

Hourly token trend (last 24h):

python scripts/fetch_metrics.py -s http://localhost:5000 -x 1 -m total_tokens -a SUM \
    -t 3600 --start-time="-24h" --end-time=now

Output: Time-bucketed token sums per hour

Latency percentiles by trace:

python scripts/fetch_metrics.py -s http://localhost:5000 -x 1 -m latency -a AVG,P95 -d trace_name

Error rate by status:

python scripts/fetch_metrics.py -s http://localhost:5000 -x 1 -m trace_count -a COUNT -d trace_status

Quality scores by evaluator (assessments):

python scripts/fetch_metrics.py -s http://localhost:5000 -x 1 -v ASSESSMENTS \
    -m assessment_value -a AVG,P50 -d assessment_name

Output: Average and median scores for each evaluator (e.g., correctness, relevance)

Assessment count by name:

python scripts/fetch_metrics.py -s http://localhost:5000 -x 1 -v ASSESSMENTS \
    -m assessment_count -a COUNT -d assessment_name

JSON output: Add -o json to any command.

Arguments

ArgRequiredDescription
-s, --serverYesMLflow server URL
-x, --experiment-idsYesExperiment IDs (comma-separated)
-m, --metricYestrace_count, latency, input_tokens, output_tokens, total_tokens
-a, --aggregationsYesCOUNT, SUM, AVG, MIN, MAX, P50, P95, P99
-d, --dimensionsNoGroup by: trace_name, trace_status
-t, --time-intervalNoBucket size in seconds (3600=hourly, 86400=daily)
--start-timeNo-24h, -7d, now, ISO 8601, or epoch ms
--end-timeNoSame formats as start-time
-o, --outputNotable (default) or json

For SPANS metrics (span_count, latency), add -v SPANS. For ASSESSMENTS metrics, add -v ASSESSMENTS.

See references/api_reference.md for filter syntax and full API details.

Related skills

How it compares

Use querying-mlflow-metrics for aggregated cost and latency trends; use trace session skills when you need turn-by-turn conversation debugging.

FAQ

Which metrics does querying-mlflow-metrics support?

querying-mlflow-metrics covers trace_count, latency, input_tokens, output_tokens, and total_tokens. Add -v SPANS for span_count or -v ASSESSMENTS for assessment_value and assessment_count queries.

How does querying-mlflow-metrics bucket time series?

querying-mlflow-metrics passes --time-interval in seconds to fetch_metrics.py, for example 3600 for hourly buckets. Combine it with --start-time -24h and --end-time now for rolling windows.

What script powers querying-mlflow-metrics?

querying-mlflow-metrics runs scripts/fetch_metrics.py with required --server and --experiment-ids flags plus --metric and --aggregations selections, optionally emitting JSON via -o json.

Data Science & MLanalyticspipelines

This week in AI coding

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

unsubscribe anytime.