Skip to content

Live Data, Streaming and Recordings

This pillar covers how a running script's tensors reach a viewer, over shared memory or a network stream, through the hub and into notebooks. It also covers the wire protocol and how a session will be recorded and replayed.

The roadmap graph shows how these features depend on features in other pillars. Ideas for this pillar that are not in the registry are on its candidates page.

Shipped

  • STR-01 Caliper LIB. Caliper LIB is the Python package whose view calls, show, points, series and histogram, send snapshots of a script's tensors to a viewer without making the training loop wait.
  • STR-02 Wire Protocol v3. Wire protocol v3 defines the binary frames of a live stream over a WebSocket, including the session handshake, view subscriptions, snapshots, series deltas and data views.
  • STR-03 Protocol 3.1 Controls. The controls of protocol 3.1 let a viewer pause, resume and step a training loop, change registered parameters, run registered actions and share a selection between views.
  • STR-04 Live Streaming. Snapshots of a script's tensors are copied on the device into shared memory, and a viewer process on the same machine samples them at its own pace, so the script never waits for the display.
  • STR-05 Network Streaming. caliper.serve sends a script's live views over a WebSocket to a notebook widget or a browser tab, reducing each snapshot on the device and letting the latest snapshot win.
  • STR-06 Hub. The hub is a separate process that holds the live sessions of several scripts, lets viewers choose one, keeps an ended session's last data and forwards controls when allowed.
  • STR-07 Notebooks. A notebook widget shows a training run's live views inside Jupyter or VS Code, with a controls panel to pause, step and change parameters while the cell runs.
  • STR-08 Data Views. A data view tells the producer which part of a large tensor to send, such as a slice, a reduction or a downsample, so the reduction runs on the device and only the result travels.
  • STR-09 Wire Protocol 3.2. Wire protocol 3.2 adds the scene, text and bar view kinds, timelines and stamps, the scene messages for points, lines, arrows, boxes, meshes, images, cameras, transforms, class tables and clears, and the recording and cursor messages, in the C++, Python and TypeScript codecs.
  • STR-10 caliper.scene. caliper.scene builds 3-D and 2-D scenes of points, lines, meshes, arrows, boxes, images and cameras, with entity transforms, a class table, clears and a starting camera, checked on the device and sent by both senders with the state a late viewer needs.
  • STR-41 Feed Service. caliper.feed.v1 gives applets telemetry channels of the machine from ring buffers that the host owns, read without blocking and with every lost sample counted.
  • STR-42 PulseScope. PulseScope draws one strip chart per telemetry channel of the machine from the feed service, with the current value, a stale marker and a count of lost samples.
  • STR-43 Attaching from the App. The app lists the live sessions and streams on the machine, attaches to one from the landing screen or with --url, and shows it on the live page.
  • STR-44 caliper-viewer. caliper-viewer is the standalone viewer in Caliper LIB's wheel that lists live sessions and attaches to one without the Caliper app.
  • STR-45 caliper.watch. caliper.watch hooks a torch module so that the outputs and, if asked, the gradients of chosen modules show as live views at a chosen interval.
  • STR-46 Own Window and Offscreen Canvas. caliper.window and caliper.offscreen open a window in the script's own process or a synchronous offscreen canvas as a route for the view calls.
  • STR-53 Producer Runtime. The producer runtime in the training script compiles a program through the sandbox, imports each model tensor on the GPU in place and read-only, and runs the program after a step with no copy of the tensor.
  • STR-54 Program Cadence. A program runs every N steps, and the script sets N from the overhead that it measures in the wall clock of the run, so that the passes take at most 4 percent of the training time.
  • STR-55 Run Control Under Watch. caliper.watch(model, optimizer) makes optimizer.step() the checkpoint of the run, where parameters apply, actions run and a pause waits, and it announces programs and interventions to a viewer.

Built

  • STR-11 Loss Landscape Demo. Demo 0 is a notebook that streams the loss surface around a model's current weights as a mesh, with the optimizer's path across it, recomputed on the device while the model trains. Sprint 4.
  • STR-56 Resource Parts. The senders split a resource version into bounded parts, and receivers assemble the complete version before a draw uses it.
  • STR-57 Scene Piece Form. Scene batches carry piece instances and typed resources through links with scene_pieces, and the hub preserves each batch for late viewers.

In Progress

  • STR-12 Recordings on MCAP. Recordings are MCAP files written and read by Caliper's own C++ recorder and reader, with a timeline and keyframe index, commit points, recovery, tailing, segments, thinning and caliper.record, so that a session can be replayed. Sprint 4.
  • STR-13 Scrubber. The scrubber moves a cursor over a recording's timelines in the app, over its live buffer and over opened files, with every view showing its state at the cursor. Sprint 4.
  • STR-23 Timelines in Caliper LIB. Caliper LIB stamps what it sends on step, time and the script's own timelines, on both senders, and the hub forwards stamps only to viewers that announced timelines. Sprint 4.

Planned

  • STR-14 Record Button. A Record button in the app's session toolbar starts and stops writing the attached session to a recording file kept in the workspace. Sprint 4.
  • STR-15 Recordings Through the Hub. caliper serve records each producer session it relays and serves recording files and folders as ended sessions, each viewer with its own cursor. Sprint 5.
  • STR-16 WebTransport. WebTransport becomes a second transport for the stream beside the WebSocket.
  • STR-17 Security Review. This step is a dedicated review of the stream's security, which must finish before any session leaves the local machine.
  • STR-18 Several Viewers per Session. A live session over shared memory is read by one viewer today, and this work lets several viewers read the same session by giving each reader its own claims.
  • STR-19 f16 and bf16. This work adds zero-copy kernels for half-precision and bfloat16 tensors, so that snapshots of such tensors are taken on the device without a conversion on the host.
  • STR-20 Shared Memory on Windows. Named shared memory through CreateFileMapping carries the local live session on Windows, with CUDA tensors copied on the device without blocking training.
  • STR-21 Shared Memory on Linux. This work carries the local live session over POSIX shared memory on Linux arm64.
  • STR-22 ROS 2 Import. ROS 2 recordings in MCAP open in Caliper, with transforms, point clouds, images and markers decoded into scene entities and named frames translated into the entity tree. Sprint 6.
  • STR-24 Scenes Through Shared Memory. The shared-memory session gains a scene layout, so that a script attached to the app on the same machine sends its scenes with in-place import from the slots. Sprint 4.
  • STR-25 Scene Data Views. A scene data view reduces a scene on the producer's device, beyond the default view, so that only the part a viewer needs travels. Sprint 4.
  • STR-26 Recording Reader in the Browser. A reader written in TypeScript opens a recording file in the browser viewer, through a page address with ?recording=, with no server behind it. Sprint 4.
  • STR-27 Scrubber in the Browser. The browser viewer scrubs a recording opened from a file, with the same cursor and timelines as the scrubber in the app. Sprint 4.
  • STR-28 Recording Export to Parquet. caliper export --to parquet writes a recording's series and tables as Parquet files for analysis in other tools. Sprint 4.
  • STR-29 Recordings in the Workspace. Recordings made in the app are written into the workspace, listed in its tables and offered in the catalog as sources of the kind recording. Sprint 4.
  • STR-30 Training Run Demo. A demo records a training run with its class table, item space and lasso selection and scrubs it, as the acceptance of timelines and recordings. Sprint 4.
  • STR-31 Applet Scenes in Recordings and the Hub. Scenes that applets draw through the scene service are recorded with a session and travel through the hub like a script's scenes. Sprint 5.
  • STR-32 Events over Shared Memory. A small ring buffer carries events from the app back to a script attached through shared memory, as the network route already does. Sprint 6.
  • STR-33 Robot Run Demo. A demo opens a recorded robot run and shows where along it a model's prediction drifts. Sprint 6.
  • STR-34 Data Views of Tables. A data view for a table tells the producer which rows to send, as data views of tensors already do for slices and reductions.
  • STR-35 Zoom as a Data View. A zoom or a selection that needs more detail than a snapshot holds becomes a request for another data view, which the producer computes.
  • STR-36 Arrays from JAX and CuPy. Arrays from frameworks other than torch, such as JAX and CuPy, reach the views through DLPack.
  • STR-48 Framework Adapter Interface. One small adapter per tensor framework supplies stream synchronization and module hooks, while memory crosses through DLPack and derivations run as Caliper's own GPU compute, so PyTorch becomes the first adapter rather than a dependency of the core.
  • STR-49 MLX Adapter. Caliper LIB takes MLX arrays through DLPack on Metal, with MLX's stream synchronization and module hooks, so a script written in MLX streams views and scenes as a PyTorch script does.
  • STR-50 JAX Adapter. Caliper LIB takes JAX arrays through DLPack on CUDA and on the CPU, with JAX's synchronization, so a script written in JAX streams views and scenes as a PyTorch script does.
  • STR-51 CuPy and NumPy Arrays. Caliper LIB takes any array that implements DLPack, such as a CuPy array on CUDA or a NumPy array on the CPU, through the same adapter interface.

Ideas

  • STR-37 Smaller Caliper LIB Wheel. A build of Caliper LIB without the metrics and artifacts stores could make the wheel smaller.
  • STR-38 Foxglove Bridge Source. Caliper could read a live source that speaks the Foxglove bridge protocol, so that robotics tools that serve it stream into the views.
  • STR-39 Recordings in Generic MCAP Viewers. A decoder for Caliper's additions to MCAP could let generic MCAP viewers open Caliper recordings.
  • STR-40 Distributed Training in One View. The streams of a training run spread over several GPUs and machines could combine into one view.
  • STR-47 Clock Exchange. The wire protocol could gain a clock exchange, so that a viewer can show a stream's absolute latency.
  • STR-52 TensorFlow Adapter. Caliper LIB could take TensorFlow tensors through DLPack, with TensorFlow's synchronization, through the same adapter interface.