ML-Dash

.dashrc Reference

A .dashrc file is a YAML configuration file that controls how experiments and comparisons are displayed in the Dashboard. Its behavior depends on where it is placed.

File Placement

LocationTypeControls
Inside an experiment folderExperiment .dashrcCharts for that single experiment
Inside any other folderCompare .dashrcCross-experiment comparison charts

Experiment .dashrc vs Compare .dashrc

FeatureExperimentCompare
metrics section✓ Used✗ Ignored
ctype: line✓ Used✓ Used
ctype: image✓ Used✗ Ignored
ctype: video✓ Used✗ Ignored
series array✗ Ignored✓ Used

Complete Field Reference

Top-Level Fields

yaml
metrics:       # Experiment .dashrc only
  fields:
    - "*"

charts:
  - ...
FieldTypeDescription
metricsobjectControls which metrics appear in the experiment header. Experiment .dashrc only.
metrics.fieldsstring[]Glob patterns for metric names. "*" matches all. Supports prefixes like "train*".
chartsChartConfig[]Ordered list of charts to display.

ChartConfig — Common Fields

All chart types share these fields:

FieldTypeRequiredDescription
ctype"line" | "image" | "video"YesChart type
titlestringNoTitle displayed above the chart

ChartConfig — Line Chart Fields

yaml
- ctype: line
  title: My Chart
  xKey: step
  yKey: train.loss         # or yKeys: [...]
  xLabel: Steps
  yLabel: Loss
  bins: 500
  xFormat: null
  yFormat: null
  xTicks: 10
  yTicks: 5
FieldTypeDefaultDescription
xKeystring—X-axis metric name (required). See xKey values below.
yKeystring—Single y-axis metric. Mutually exclusive with yKeys.
yKeysstring[]—Multiple y-axis metrics on the same chart. Mutually exclusive with yKey.
seriesSeriesConfig[]—Per-series config. Compare .dashrc only. Mutually exclusive with yKey and yKeys. Each series issues one API request.
xLabelstringxKey nameX-axis label
yLabelstringmetric nameY-axis label
binsnumber1000Downsample target point count. Higher = more detail, slower render.
xFormatstring | nullnullFormat specifier for x-axis ticks.
yFormatstring | nullnullFormat specifier for y-axis ticks.
xTicksnumberautoNumber of x-axis grid lines.
yTicksnumberautoNumber of y-axis grid lines.

yKey, yKeys and series are mutually exclusive — use exactly one. (series is available in compare .dashrc only.)


SeriesConfig — Per-Series Fields

Used inside series arrays in compare .dashrc files only.

FieldTypeDescription
prefixstringExperiment path prefix.
experimentIdsstring[]Explicit list of experiment IDs to include in this series.
experimentIdstringSingle experiment ID. Shorthand for experimentIds: [id].
labelstringLegend label for this series.
colorstringLine color as a hex string (e.g. "#5470c6"). Explicit colors are always preserved.
dashstringSVG stroke-dasharray string. Omit for a solid line.
xKeystringOverrides the chart-level xKey for this series only.
yKeystringOverrides the chart-level yKey for this series only.

ChartConfig — Image Chart Fields

yaml
- ctype: image
  title: Frames
  glob: "frames/**/*.png"
  nCols: 4
  nRows: 2
  sort: date
FieldTypeDefaultDescription
globstring"**/*.{png,jpg,jpeg,gif,webp}"Glob pattern to match files within the experiment folder.
nColsnumber3Number of grid columns.
nRowsnumber2Number of grid rows. The grid shows at most nCols × nRows files.
sort"name" | "date" | "size""name"File sort order.

ChartConfig — Video Chart Fields

yaml
- ctype: video
  title: Rollouts
  glob: "videos/**/*.mp4"
  nCols: 2
  nRows: 2
  sort: name
FieldTypeDefaultDescription
globstring"**/*.{mp4,webm,mov}"Glob pattern to match files within the experiment folder.
nColsnumber3Number of grid columns.
nRowsnumber2Number of grid rows. The grid shows at most nCols × nRows files.
sort"name" | "date" | "size""name"File sort order.

xKey Values

The xKey field specifies which metric is used as the x-axis.

ValueBehavior
"default"The server picks step, then epoch, from the metric's own fields. Falls back to the data index if it has neither.
"step"Uses the step field logged alongside each metric.
"epoch"Uses the epoch field logged alongside each metric.
"timestamp"Uses the Unix timestamp recorded automatically by ML-Dash.
Any other stringUses that metric name as the x-axis value.

Series Colors and Dash Patterns

When color is not specified, series are assigned colors automatically from a fixed palette.

Default Color Palette

IndexSwatchColorHex
0Blue#5470c6
1Green#91cc75
2Yellow#fac858
3Red#ee6666
4Sky#73c0de
5Teal#3ba272
6Orange#fc8452
7Purple#9a60b4
8Pink#ea7ccc

For more than 9 series, colors cycle with a +40° hue rotation per round, combined with cycling dash patterns.

Dash Pattern Examples

ValuePreviewAppearance
(omitted)Solid line
2 4Dotted
4 4Short dashes
8 4Long dashes
8 4 2 4Dash-dot

Validation

.dashrc files are validated in two stages:

  1. Frontend — YAML syntax is checked immediately (300ms debounce). Parse errors are shown inline in the editor.
  2. Backend — Field values are validated when data is fetched. Errors are returned in the API response and displayed below the affected chart.

Quick Reference

yaml
# Experiment .dashrc — full template
metrics:
  fields:
    - "*"

charts:
  - ctype: line
    title: Chart title
    xKey: default        # or: step, epoch, timestamp, any metric name
    yKey: train.loss     # single metric  ──┐
    # yKeys:             # multiple metrics │-pick one
    #   - train.loss     #                  │
    #   - eval.loss      #                 ─┘
    xLabel: Steps
    yLabel: Loss
    bins: 500
    xTicks: 10
    yTicks: 5

  - ctype: image
    glob: "**/*.png"
    nCols: 4
    nRows: 2
    sort: date

  - ctype: video
    glob: "**/*.mp4"
    nCols: 2
    nRows: 2

# Compare .dashrc — series example
charts:
  - ctype: line
    xKey: default
    yKey: train.loss
    series:
      - prefix: alice/project/run-a
        label: Run A
        color: "#5470c6"
      - prefix: alice/project/run-b
        label: Run B
        color: "#ee6666"
        dash: 4 4
      - experimentIds:
          - exp_abc123
          - exp_def456
        label: Seed Group
        color: "#91cc75"