Skip to main content

xpm-mlboard

Lightweight experimaestro services to monitor ML learning curves during experiments. It launches a visualization backend and aggregates the run directories produced by your tasks so you can watch training live.

It is intentionally torch-free: the package only depends on experimaestro, with the heavier visualization tools pulled in as optional extras.

Backends

  • TensorBoard (xpm_mlboard.TensorboardService) — runs tensorboard as an isolated subprocess on a free port and symlinks each task's tagged run directory into a single runs/ folder.
  • Weights & Biases — in development. See Weights & Biases.
  • Table viewer (xpm_mlboard.TableViewerService) — browses the tables (results, metrics, ...) written by the experiment's tasks in a Perspective viewer. See Table viewer.

The xpm_mlboard.MonitoringService / xpm_mlboard.SymlinkMonitoringService base classes make it straightforward to add other backends (e.g. Weights & Biases). Alongside the symlink aggregate, SymlinkMonitoringService records each run's experimaestro tags in a <tagspath>.tags.json sidecar (recoverable with xpm_mlboard.service.read_run_tags), so backend-agnostic exporters can attach the right tags to each run.

Installation

As a project dependency (with the TensorBoard backend):

uv add "xpm-mlboard[tensorboard]"

Adding the plugin to experimaestro installed as a uv tool

If you run experimaestro as a uv tool, inject this plugin into the tool's environment with --with (re-run the install to add the plugin to the existing tool):

uv tool install experimaestro --with "xpm-mlboard[tensorboard]"

Usage

Add the service to your experiment and register each task's run directory:

from xpm_mlboard import TensorboardService

# `xp` is the experimaestro experiment
# Relative paths are resolved against xp.resultspath (default: "runs");
# in dry-run mode, the service is inactive
service = xp.add_service(TensorboardService())

# When you submit a task, register its run directory so it shows up:
task = MyLearningTask(...).submit()
service.add(task, task.logpath)

Wiring the service into an experiment is typically done through a project-specific experiment helper (for instance xpm_torch.experiments.LearningExperimentHelper, which exposes helper.monitoring_service).

Custom backends

Subclass SymlinkMonitoringService (filesystem-based backends) or MonitoringService (anything else) and implement the backend-specific bits:

from xpm_mlboard import SymlinkMonitoringService
from experimaestro.scheduler.services import ProcessWebService


class MyBackendService(SymlinkMonitoringService, ProcessWebService):
    id = "mybackend"

    def description(self):
        return "My backend service"

    def _build_command(self):
        ...

    def _wait_for_ready(self):
        ...

Weights & Biases

Status: available both as a library (xpm_mlboard.exporters.wandb.sync) and as a service sub-service of the TensorBoard backend (tensorboard/wandb), startable from the CLI. Starting it from the experimaestro TUI / Web UI is still in development, and the export is currently one-shot (no live streaming). Starting the sub-service requires experimaestro >= 2.5.3. The wandb configuration below is standard.

How it works

Each experimaestro experiment maps to a W&B project, and every task becomes a run named after its tags, with the task's experimaestro tags attached as the run's W&B config/tags. Because compute nodes are frequently offline, tasks never talk to W&B themselves — they only write TensorBoard event files. The driver-side exporter reads those event files together with the <tagspath>.tags.json sidecars written by the monitoring service and pushes them to W&B. Each run gets a deterministic id derived from its tags, so re-running the export (or syncing an offline run later) updates the same run instead of creating duplicates. The same shared task can therefore be exported into several experiments, each carrying that experiment's own tags.

Running the export

Install the extra and call sync() on a monitoring aggregate directory (the service's runs/ folder):

uv add "xpm-mlboard[wandb]"
from xpm_mlboard.exporters.wandb import sync

# Export every run under <results>/runs into the "my-experiment" W&B project.
sync(runs_dir, project="my-experiment")

# Also remove W&B runs whose task is no longer part of the experiment:
sync(runs_dir, project="my-experiment", reconcile=True)

Or — without writing any code — start the wandb sub-service of the monitoring service. It exports the experiment's aggregate and stops when done:

# list services and sub-services (shows `tensorboard` and `tensorboard/wandb`)
experimaestro experiments services list

# export the (current) experiment's runs to W&B
experimaestro experiments services start tensorboard/wandb

The W&B project defaults to the experiment name (one project per experiment).

sync() also accepts mode (online / offline / disabled; otherwise taken from WANDB_MODE) and entity. Make sure W&B access is configured first (see below).

Configuring access

W&B authenticates with an API key. Either log in once (stored in ~/.netrc):

wandb login                     # prompts for your API key

or provide it via the environment (handy on CI / headless driver hosts):

export WANDB_API_KEY=...

Using a self-hosted W&B server

Point the client at your own W&B Server ("Local") instead of wandb.ai:

wandb login --host https://wandb.your-domain.example      # interactive
# or non-interactively:
export WANDB_BASE_URL=https://wandb.your-domain.example
export WANDB_API_KEY=...

Offline / air-gapped hosts

When the host running the export has no network at sync time (e.g. a SLURM login node), write run data locally and upload it later from a connected machine:

export WANDB_MODE=offline        # record locally instead of streaming
# ... later, from a host that can reach the server:
wandb sync <run-dir>

Common environment variables: WANDB_API_KEY, WANDB_BASE_URL (self-hosted server URL), WANDB_MODE (online / offline / disabled), WANDB_ENTITY (team or user), WANDB_PROJECT. See the W&B docs for the complete reference.

Table viewer

TableViewerService (service id tables) shows the tables produced by an experiment — evaluation results, metrics, logs — in a Perspective viewer: sort, filter, pivot (group / split by any column) and chart them in the browser.

uv add "xpm-mlboard[tables]"

Register each file with a logical table name; every file registered under the same name is concatenated into one table, with a run column (the task's tags path) and one column per experimaestro tag, so results can be grouped by hyper-parameter directly:

from xpm_mlboard import TableViewerService

tables = xp.add_service(TableViewerService(xp.resultspath / "tables"))

for lr in [1e-3, 1e-4]:
    task = Evaluate(model=..., lr=tag(lr)).submit()
    # The file does not need to exist yet: it is shown once written
    tables.add(task, task.results_path, name="eval")

# A table that is not tied to a task
tables.add_table("summary", xp.resultspath / "summary.csv")
  • Formats: Parquet, CSV, TSV, JSON lines, JSON records and Arrow IPC, detected from the extension (or format="csv", ...).
  • Live: files are re-read when they change (a rewritten file replaces the rows of its run); new tables, runs and columns show up without restarting.
  • Saved views: the viewer configuration of each table (columns, pivots, chart, ...) is saved under <path>/views/ and kept across experiment runs.
  • Tasks with the same tags cannot be told apart: only the first one registered for a table is shown (a warning is logged), as for TensorBoard runs.

The viewer runs as a separate process on a free port; it uses the FastAPI/uvicorn stack experimaestro already depends on, and serves the Perspective viewer bundled with perspective-python (no CDN needed).

To try it on made-up data (the data keeps changing while it runs, to show the live updates):

uv run --extra tables python -m xpm_mlboard.tables.demo   # http://localhost:8765/

License

GPL-3

Metadata

Release files for xpm-mlboard 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xpm-mlboard 0.4.1
File Size Uploaded Provenance Actions
xpm_mlboard-0.4.1.tar.gz 152.7 kB With provenance Details for xpm_mlboard-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for xpm-mlboard 0.4.1
File Interpreter ABI Platform Actions
xpm_mlboard-0.4.1-py3-none-any.whl Python 3 none any Details for xpm_mlboard-0.4.1-py3-none-any.whl

Total release size: 183.2 kB

Release files / xpm_mlboard-0.4.1.tar.gz

Download URL xpm_mlboard-0.4.1.tar.gz
Size 152.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1e2689ac0fd7e6f09bc5af5c37ce1704d745709230edfae5c0a8c4f2f34ff408
BLAKE2b-256 checksum
How to use checksums
85ef4c8e90412ff32ebe6db89b7c6f02bb5a7d82d85fc2073ee50d72ac8098b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / xpm_mlboard-0.4.1-py3-none-any.whl

Download URL xpm_mlboard-0.4.1-py3-none-any.whl
Size 30.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
098b58718ae998c2d48277f70f3d91f374c383665c9cf1d28064ad8cc3d1baf2
BLAKE2b-256 checksum
How to use checksums
a65bd12764157ce330c6745c5dea011cac54ca19ce0f8d17b6dfc05200d9a2cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Security for xpm-mlboard 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for xpm_mlboard-0.4.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page