Skip to content

Add the shared harness of the state_prep_certification experiments - #914

Merged
perlinm merged 1 commit into
mainfrom
ft-state-prep-harness
Nov 16, 2026
Merged

perlinm merged 1 commit into
mainfrom
ft-state-prep-harness

Conversation

@perlinm

@perlinm perlinm commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This pull request adds experiments/state_prep_certification/, a harness for running timed qLDPC experiments in bulk, on a workstation or offline on a Linux node. An experiment plugs in by defining its tasks, the call that each task measures, and its acceptance tests; the harness does the rest.

Changes

  • common/runner.py and common/run_task.py run each task in a child process with a time limit, memory cap, and start-up cap, kill the run's whole process group when it ends, and write one JSONL row per run.
  • common/store.py reads and appends those rows, recovering from a partial last line.
  • common/tasks.py writes the task lists for GNU parallel, pins each job slot to a physical core, and refuses to start unless an approved number of CPU-hours covers the worst case.
  • common/manifest.py labels each run by the hash of its pinned versions, its inputs, and the commit, and records the machine and packages.
  • common/plugin.py defines the plug-in interface.
  • run_node.py runs one experiment from its acceptance tests to an archive of the results, and can resume, report status, and clean up after a hard kill.
  • bundle.py, pins.json, and node.sh build one offline bundle on a workstation (wheels, CPython, and GNU parallel, all hashed) and install and run it on the node.

experiments/state_prep_certification/README.md describes the workflow.

Validation

common/selftest.py tests each part with a stand-in plug-in, including timeouts that leave grandchildren, memouts, interrupted runs and their resume, and cleanup when a process id has been reused. On Linux, run_node.py reruns these tests with process groups and real CPU pinning before each experiment. These tests do not run in CI, as for the code-annealing experiment.

Add a harness that runs timed qLDPC experiments in bulk, on a
workstation or offline on a Linux node, under
experiments/state_prep_certification/:

- common/: the task runner, which times the measured call in a child
  process with its limit, memory cap, start-up cap, and post-processing
  window, kills the run's process group, and writes one JSONL row per
  run; the result store, with recovery of a partial last line; task
  lists for GNU parallel with job slots pinned to physical cores and a
  ceiling of CPU-hours that needs an approval; the label and manifest;
  and the plug-in interface, with self-tests;
- run_node.py: one experiment for its label, from the acceptance tests
  to the archive, with resume, status, and cleanup;
- node.sh: the node's preflight, offline install, and entry point;
- bundle.py and pins.json: the offline bundle, with hashed wheels for
  the pinned CPython and Linux platform, and GNU parallel.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@perlinm
perlinm force-pushed the ft-state-prep-harness branch from f3b2167 to 8777f84 Compare November 16, 2026 21:59
@perlinm perlinm changed the title Add the shared harness of the ft_state_prep experiments Add the shared harness of the state_prep_certification experiments Nov 16, 2026
@perlinm
perlinm merged commit 51d278f into main Nov 16, 2026
8 checks passed
@perlinm
perlinm deleted the ft-state-prep-harness branch November 16, 2026 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant