DreamLake
Browse docs

Write a schema

Start with one source and inspect its auto-layout. Add panels when you know which cameras or signals to compare. These types belong to the existing schema API:

ts
interface VizSchema {
  version: 1;
  sources: Record<string, SourceConfig>;
  timeline?: { source: string };
  panels?: PanelConfig[];
}

type SourceConfig = {
  adapter: string;
  storage?: { driver: string; [key: string]: unknown };
  [parameter: string]: unknown;
};

type FieldRef = string | (string | number)[];

interface PanelConfig {
  view: string;
  source?: string;
  fields?: FieldRef[];
  series?: SeriesCfg[];
  tracks?: TrackCfg[];
  overlays?: OverlayCfg[];
  children?: PanelConfig[];
  [option: string]: unknown;
}

timeline.source selects the source that provides the shared clock; it defaults to the first source. panels is optional. Pass a parsed object to DatasetPreview; parse YAML in the application when using a configuration file.

sources — an adapter + storage

Set adapter for the format, storage for access, and format options such as episode alongside them:

yaml
sources:
  ep:
    adapter: lerobot
    storage: { driver: hf, id: lerobot/aloha_static_coffee }
    episode: 0

See Adapters for format options and Storage for public and application-provided drivers.

panels — views over fields

Bind cameras with fields, styled numeric traces with series, and intervals with tracks:

yaml
panels:
  - view: videoStack
    source: ep
    fields: ["observation.images.*"]
  - view: lineChart
    source: ep
    series:
      - { field: [action, left_waist], label: Command }
      - {
          field: [observation.state, left_waist],
          label: Observation,
          dash: "3 2.4",
        }
  - view: timeline
    source: ep
    tracks: [{ field: task_index, label: Task }]

A dotted string is one complete feature name. Use [feature, dimension] for a named or numbered column; * matches feature or dimension names, as in [observation.effort, "left_*"].

The views reference describes each panel's layout and presentation options.

End-to-end: a folder of clips → one videoStack

A filesystem source discovers clips through storage listing. With the HTTP driver, provide an index.json in the folder:

yaml
version: 1
sources:
  clips:
    adapter: filesystem
    storage: { driver: http, basePath: /viz-samples/episode_365/ }
panels:
  - { view: videoStack, source: clips, fields: ["*"], columns: 2 }
Loading fields…
Code FilesystemFolderSpec.tsx

This source has no dataset timeline. The video stack uses the longest discovered clip duration for scrubbing.

End-to-end: a LeRobot episode → multi-panel

Here the episode supplies a shared timeline. The camera grid, task intervals and joint comparison all use that time.

yaml
version: 1
sources:
  ep:
    adapter: lerobot
    storage: { driver: hf, id: lerobot/aloha_static_coffee }
    episode: 0
panels:
  - {
      view: videoStack,
      source: ep,
      fields: ["observation.images.*"],
      columns: 2,
    }
  - { view: timeline, source: ep, tracks: [{ field: task_index, label: Task }] }
  - view: gridLayout
    columns: 2
    children:
      - view: lineChart
        source: ep
        title: Left waist
        series:
          - { field: [action, left_waist], label: Command }
          - {
              field: [observation.state, left_waist],
              label: Observation,
              dash: "3 2.4",
            }
Loading fields…
Loading fields…
Loading fields…
Loading fields…
Code LerobotEpisodeSpec.tsx

End-to-end: hand skeletons via overlays

An overlay references an annotation file in the same source. Its format describes how to read that file. This example uses hand detections over video and subtask intervals in both the video and timeline.

yaml
version: 1
sources:
  ego:
    adapter: filesystem
    storage: { driver: http, basePath: /viz-samples/hand_joints/ }
panels:
  - view: videoStack
    source: ego
    fields: ["*"]
    columns: 1
    overlays:
      - { field: "*Ceramics.json", format: handJoints }
      - { field: "ours_subtasks_713488.json", format: subtasks }
  - view: timeline
    source: ego
    tracks:
      - {
          field: "ours_subtasks_713488.json",
          format: subtasks,
          label: Subtasks,
        }
Loading fields…
Loading fields…
Code HandOverlaySchemaSpec.tsx

handJoints expects the documented hand-detection shape, subtasks expects labeled subtask intervals, and raw expects MediaOverlay JSON. See the overlay data formats. Set on to a video field reference to target a tile; omit it to apply the layer across tiles.

Omit panels → auto-layout

Omit panels to inspect an unfamiliar source before choosing bindings:

yaml
version: 1
sources:
  ep:
    adapter: lerobot
    storage: { driver: hf, id: lerobot/aloha_static_coffee }
    episode: 0
Auto-laying out…
Code AutoLayoutSpec.tsx

Auto-layout groups fields by kind. The layout rules describe camera stacks, frame sequences, timelines and charts.