Skip to main content

Module path

A bridge is a function (sometimes plus dataclass output types). Adapters call the bridge from their run.py; the manifest writer picks up the result.

Pattern

LIBERO is the cleanest example.
The bridge starts the adapter’s WebSocket policy server, waits for it to be ready, runs the LIBERO benchmark client per suite, and returns one LIBEROEvalSummary per suite. If output_dir is set, it also writes a JSON artifact with the same content.

What ships

Some bridges run a local adapter and return dataclasses; others import raw external results into the audit-input schema. The manifest writer or audit flow then owns the final JSON surface. Import bridges do not upload artifacts or decide whether a claim is publishable.

Wiring an adapter

A curated adapter’s run.py typically does three things:
  1. Start the adapter’s policy server (or call its inference function directly).
  2. Call the bridge with the right task argument.
  3. Hand the bridge’s return value to the manifest writer.

Adding a bridge

1

Write the function

Add src/worldflux/eval_bridges/<suite>.py. Keep it function-first; only add a class if state genuinely needs to live across episodes.
2

Define the output dataclass

A frozen @dataclass with the fields the dashboard will need to render. Avoid optionals where you can; mean_* should always be a float, even if it’s 0.0.
3

Write the JSON artifact

If the suite produces per-episode detail, write a JSON file under output_dir and reference it from the dataclass. The dashboard’s run detail panel previews JSON inline.
4

Snapshot test

tests/eval_bridges/test_<suite>.py plus a snapshot or fixture for the smallest deterministic path. Use dry-run or raw-import fixtures for GPU-only suites; do not label smoke data as Grade A benchmark evidence.

When you do not need a bridge

If the suite already returns JSON in roughly the shape the manifest expects, the adapter can write straight into manifest.metrics and skip the bridge layer. Bridges exist for suites whose native output (per-episode logs, per-task success matrices, vector embeddings) does not map onto the manifest 1:1.