# Metrics and charts

Use the Metrics surface to answer "what happened to this metric across the
selected runs?" with careful line charts.

![Metrics dashboard](/docs/assets/images/product/dashboard-metrics.png)

Metrics views are line-chart focused: use them for scalar metric series over
training step or logged time. Use the [Runs workspace](/docs/dashboard/runs-workspace.md)
when you need bar, value histogram, dot plot, scatter, seed/group distribution,
or selected-run logged histogram timeline panels.

## Browse metrics by namespace

The metric browser on the left groups available metric keys by namespace and
shows coverage, point count, goal-aware best value, and selected-run presence.
Type in its search field — or press `/` from anywhere on the page — to filter,
and pin a key to keep its own chart below the main one.

> **Tip:** Use namespaces such as `train/`, `eval/`, `reward/`, and `system/` to keep the browser readable.

## Control the chart

Current chart controls include:

- Selected metric.
- Step or logged-time x-axis.
- A linear or log y-axis.
- A **Chart** / **Summary table** toggle for the same selection.
- Optional smoothing.
- Grouped averages.
- Group by seed, first tag, or the current fixed config grouping options such
  as `algo` and `policy`.
- Range brush zoom.
- Hover readouts with run name, step or logged time, raw value, and smoothed
  value when smoothing is active.
- Chart CSV export for the plotted sample and SVG image export for the visible
  graph.

Unit-bounded metrics such as accuracy, F1, precision, recall, and AUC use a
normalized `0..1` y-axis. Return, reward, and loss metrics auto-scale.

## Read the series table

Below the chart, the series table lists each plotted run with its last, min,
max, best-at-step, and point count. Toggle a run's visibility to focus the
chart on a subset without changing the underlying selection. Pinned metrics
render as their own charts stacked under the primary one.

## Log scalar metrics that chart well

Use scalar metrics when each step has one numeric value. These metrics can feed
line charts, Runs workspace line panels, and loaded-summary panels such as
bar, value histogram, dot plot, scatter, and distribution.

| Metric shape | Good graph types | Examples |
| --- | --- | --- |
| Smooth or noisy time series | Line charts with optional smoothing | `train/loss`, `eval/return_mean`, `optimizer/lr`, `system/gpu_utilization` |
| Latest scalar outcome | Bar, dot plot, value histogram | `eval/accuracy`, `eval/macro_f1`, `eval/return_mean`, `val/loss` |
| Final, best, or latest scalar outcome grouped by variant | Distribution | `eval/return_mean` grouped by `config.variant` with `config.seed` as replicate metadata |
| Hyperparameter or runtime tradeoff | Scatter and Insights parallel coordinates | `config.learning_rate` vs `eval/accuracy`, duration vs score, loss vs F1 |

Do not force arrays, tables, confusion matrices, or per-example predictions
into scalar metrics. Log those as rich objects so the dashboard can fetch them
through bounded object routes instead of bloating the scalar metric hot path.

For per-sample distributions over time, log histogram rich objects with
`im.Histogram.from_values(scores, bins=shared_edges)` under a stable object
key. For binary classifier evidence, use `run.log_classification_eval(...)` so
Run Detail can render PR/ROC, confusion matrix, per-class metrics, and
prediction rows.

## Read dense charts

Metric charts share the same visual system as Runs workspace line panels:

- Stable color assignment keeps the same run visually consistent across chart
  reloads.
- Dashed line styles are added after the palette wraps so larger selected sets
  remain distinguishable.
- Dense charts draw series paths on canvas and keep SVG axes, legends, and
  hover state above the canvas.
- Legends show the first visible run labels and add an overflow chip when the
  selected set is larger than the visible legend budget.

## Export chart evidence

Each chart's three-dot options menu offers **Download data (CSV)** and
**Download image (SVG)**; the Metrics header also has a one-click SVG button.
Use them when you need to move evidence into a notebook, issue, report, or lab
note. CSV export contains the already plotted data, including the visible
sample, grouping labels, series type, source run count for aggregates,
step/time, value, and smoothed value when smoothing is active. SVG image export
renders the visible chart client-side without requesting additional history.

> **Note:** Chart export is intentionally bounded to avoid browser jank. It is disabled when a chart has more than 120 series or more than 20,000 plotted points. Use the API export route when you need raw selected-run data rather than the plotted chart sample.

Metric series are fetched separately from run summaries: charts request bounded
series data by run, metric key, step range, time range, or explicit point limit
instead of loading full history with the run list.

## Follow good metric hygiene

- Keep metric names stable across runs.
- Prefer slash namespaces.
- Use scalar metric keys for numeric values only; use rich objects for arrays,
  tables, media, histograms, and typed eval bundles.
- Put numeric fields such as `learning_rate`, `batch_size`, and `seed` in run
  `config` for scatter and Insights panels. Put categorical fields such as
  `variant`, `dataset`, and `model` in `config` for distribution grouping and
  filtering.
- Log one training-loop dictionary per step instead of many tiny calls.
- Use consistent step semantics inside a project.

## Next steps

- [Runs workspace](/docs/dashboard/runs-workspace.md)
- [Compare runs](/docs/dashboard/compare-runs.md)
- [Metrics and steps in the SDK](/docs/sdk/metrics-steps.md)
- [Rich objects](/docs/sdk/rich-objects.md)
- [Metrics series API](/docs/api/metrics-series.md)

## Agent navigation

- [Docs index](/llms.txt)
- [Full docs bundle](/llms-full.txt)

### Get Started

- [Overview](/docs/index.md)
- [Quickstart](/docs/quickstart.md)
- [Core Concepts](/docs/concepts/core-concepts.md)
- [Pricing](/docs/pricing.md)
- [Benchmarks](/docs/benchmarks.md)
- [Examples](/docs/guides/examples.md)
- [Troubleshooting](/docs/troubleshooting.md)

### SDK

- [Installation Auth](/docs/sdk/installation-auth.md)
- [Logging](/docs/sdk/logging.md)
- [Tracing](/docs/sdk/tracing.md)
- [Metrics Steps](/docs/sdk/metrics-steps.md)
- [Config Tags Notes](/docs/sdk/config-tags-notes.md)
- [Artifacts Checkpoints](/docs/sdk/artifacts-checkpoints.md)
- [Rich Objects](/docs/sdk/rich-objects.md)
- [Distributed Training](/docs/sdk/distributed-training.md)
- [Console System Integrations](/docs/sdk/console-system-integrations.md)
- [Reliability](/docs/sdk/reliability.md)
- [Cli Login](/docs/sdk/cli-login.md)
- [Querying Data](/docs/sdk/querying-data.md)
- [Agent Mcp](/docs/sdk/agent-mcp.md)
- [Examples Patterns](/docs/sdk/examples-patterns.md)

### Integrations

- [Overview](/docs/integrations/overview.md)
- [Pytorch Lightning](/docs/integrations/pytorch-lightning.md)
- [Huggingface Transformers](/docs/integrations/huggingface-transformers.md)
- [Keras](/docs/integrations/keras.md)
- [Wandb](/docs/integrations/wandb.md)

### Dashboard

- [Tour](/docs/dashboard/tour.md)
- [Organizations Workspaces](/docs/dashboard/organizations-workspaces.md)
- [Runs Workspace](/docs/dashboard/runs-workspace.md)
- [Metrics Charts](/docs/dashboard/metrics-charts.md) (current page)
- [Run Detail](/docs/dashboard/run-detail.md)
- [Traces](/docs/dashboard/traces.md)
- [Compare Runs](/docs/dashboard/compare-runs.md)
- [Research Dashboards](/docs/dashboard/research-dashboards.md)
- [Artifacts Files](/docs/dashboard/artifacts-files.md)
- [Run Health](/docs/dashboard/alerts.md)
- [Datasets](/docs/dashboard/datasets.md)
- [Checkpoints](/docs/dashboard/checkpoints.md)
- [Reports](/docs/dashboard/reports.md)
- [Settings Api Keys](/docs/dashboard/settings-api-keys.md)
- [Api Tab](/docs/dashboard/api-tab.md)
- [Onboarding Team Billing](/docs/dashboard/onboarding-team-billing.md)

### Data

- [Imports](/docs/guides/imports.md)
- [W&B alternative](/docs/guides/wandb-alternative.md)
- [InstantML vs MLflow](/docs/guides/instantml-vs-mlflow.md)
- [W&B import guide](/docs/guides/wandb-import-guide.md)
- [W&B and Neptune imports](/docs/guides/wandb-neptune-imports.md)
- [Export Usage Limits](/docs/guides/export-usage-limits.md)
- [Pricing Limits Billing](/docs/guides/pricing-limits-billing.md)
- [Auth Billing Storage](/docs/guides/auth-billing-storage.md)
- [Customer Owned Clickhouse](/docs/guides/customer-owned-clickhouse.md)
- [Observability](/docs/guides/observability.md)

### API

**Practical API guides**

- [Authentication](/docs/api/authentication.md)
- [Errors And Limits](/docs/api/errors-and-limits.md)
- [Health Observability](/docs/api/health-observability.md)
- [Projects Runs](/docs/api/projects-runs.md)
- [Metrics Series](/docs/api/metrics-series.md)
- [Attributes Objects](/docs/api/attributes-objects.md)
- [Artifacts](/docs/api/artifacts.md)
- [Reports](/docs/api/reports.md)
- [Iframe Embeds](/docs/api/iframe-embeds.md)
- [Import Export Usage](/docs/api/import-export-usage.md)
- [Dashboard Control State](/docs/api/dashboard-control-state.md)
**Architecture**

- [System Overview](/docs/architecture/system-overview.md)
- [Service Planes](/docs/architecture/service-planes.md)
- [Storage Model](/docs/architecture/storage-model.md)
- [Google Clickhouse](/docs/architecture/google-clickhouse.md)
- [Auth Tenancy](/docs/architecture/auth-tenancy.md)
- [Schema Reference](/docs/architecture/schema-reference.md)

### API Reference

- [API Reference](/docs/api-reference.md)
