querying-mlflow-metrics
Fetches aggregated trace metrics (token usage, latency, trace counts, quality evaluations) from MLflow tracking servers. Triggers on requests to show metrics, analyze token usage, view LLM costs, check usage trends, or query trace statistics.
By mlflow · 650 installs
npx skills add mlflow/skills --skill querying-mlflow-metrics
Source repository · Upstream listing
MLflow Metrics
Run scripts/fetch metrics.py to query metrics from an MLflow tracking server.
Examples
Token usage summary:
Output: AVG: 223.91 SUM: 7613
Hourly token trend (last 24h):
Output: Time bucketed token sums per hour
Latency percentiles by trace:
Error rate by status:
Quality scores by evaluator (assessments):
Output: Average and median scores for each evaluator (e.g., correctness, relevance)
Assessment count by name:
JSON output: Add o json to any command.
Arguments
Arg Required Description
s, server Yes MLflow server URL
x, experiment ids Yes Experiment IDs (comma separated)
m, metric Yes trace count , latency , input tokens , output tokens , total tokens
a, aggregations Yes COUNT , SUM , AVG , MIN , MAX , P50 , P95 , P99
d, dimensions No Group by: trace name , trace status
t, time interval No Bucket size in seconds (3600=hourly, 86400=daily)
start time No 24h , 7d , now , ISO 8601, or epoch ms
end time No Same formats as start time
o, output No table (default) or json
For SPANS metrics ( span count , latency ), add v SPANS .
For ASSESSMENTS metrics, add v ASSESSMENTS .
See [references/api reference.md](references/api reference.md) for filter syntax and full API details.