跳到正文

OpSafari

laborix

Autonomous experiment-pipeline orchestrator: versioned research-plan DSL with dependency DAGs, deterministic checkpoint/resumable executor, tamper-evident provenance ledger, UCB1/Thompson schedulers with measured regret against synthetic oracles, ablation bookkeeping, offline report synthesis. NumPy core, CPU-only torch extra.

README 已保存到本站,可直接阅读

Documentation snapshot

README 快照

这篇是英文原文

下面正文是项目自己的英文 README。想读全文就用浏览器自带的整页翻译: Chrome / Edge 点地址栏右侧的翻译图标,或用右键菜单里的「翻译成中文」; 手机浏览器一般在菜单里。

本页保存的是公开项目资料快照,阅读过程不需要连接 GitHub。

laborix

laborix is a fully offline orchestrator for autonomous experiment pipelines, in the spirit of Agent-Laboratory-style research automation. It implements and verifies the mechanics of automated research programs — versioned plan schemas, dependency-safe deterministic execution, tamper-evident provenance ledgers, budget-respecting scheduling under uncertainty, ablation bookkeeping, and report synthesis — rather than the creativity of any particular language model.

At runtime the package depends only on NumPy. PyTorch (CPU-only) is an optional extra powering the trainable surrogate-scheduling demos. Every default test and example runs without network access; “experiment steps” in the demos execute real NumPy computations on synthetic data.

Installation

python -m venv .venv
.venv/bin/pip install -e ".[dev]"          # development env (hatchling, pytest, ruff, mypy)
.venv/bin/pip install -e ".[dev,torch]" \
    --extra-index-url https://download.pytorch.org/whl/cpu   # for surrogate-scheduling demos

Quick start

.venv/bin/laborix demo demo-output

The demo executes a complete synthetic research program offline — plan → schedule → run → ablate → report — and prints measured regret against the oracle, ablation coverage, and the artifact ledger summary (for example {"coverage": {"method": true, "seed": true}, "regret": 4.5, "runs": 24, "synthetic": true}). Everything it produces is reproducible from the printed seeds and config hashes.

CLI

The laborix command-line tool provides one subcommand per lifecycle stage:

SubcommandPurpose
validateStatically validate a research plan: schema version, dependency DAG (cycle detection, dangling refs), typed step inputs/outputs, resource annotations — with precise error messages
planEmit example/templated research plans in the versioned JSON schema
runExecute a plan deterministically: topological step order, bounded parallelism with ordering guarantees, retries with jitter and attempt ceilings, timeouts, cancellation with clean partial-state semantics
resumeResume a crashed or cancelled run from the ledger — completed steps replay from recorded artifacts instead of recomputing; final artifacts are byte-identical to a straight run
scheduleRun the bandit-based experiment scheduler (UCB1 / Thompson sampling) over candidate configurations under budget constraints, reporting cumulative regret vs. the oracle
ablateGenerate and execute an ablation matrix from a factor grid with coverage checks (every factor varied while others are fixed at least once) and missing-cell detection
ledgerInspect and verify the append-only provenance ledger, including the chained-hash tamper-evidence check
verifyRe-verify recorded artifact hashes and ledger integrity for a run directory
reportSynthesize a Markdown/self-contained-HTML research report from ledger + result tables, with paired comparisons, deterministic bootstrap CIs, embedded reproducibility metadata, and a limitations section generated from actual coverage/budget facts
demoThe full offline end-to-end demonstration described above

Exit codes are documented in docs/exit-codes.md.

Common commands

CommandPurpose
make buildBuild a wheel with the local venv (--no-isolation)
make testFast test suite (excludes the slow mark)
make test-allFull suite including slow integration tests
make format / make format-checkruff formatting and its check mode
make lintruff check + format —check
make typecheckmypy static analysis

What is guaranteed (and tested)

The test suite (837 fast tests plus 4 slow integration tests) pins the properties that make an automated pipeline trustworthy:

  • Executor determinism — the same plan and seeds produce byte-identical artifacts across runs and across run directories.
  • Crash recovery — a real subprocess is killed mid-run; resuming from the ledger completes to artifacts byte-identical to an uninterrupted run.
  • Tamper-evident ledger — every step attempt records input hash, code version, config hash, seed, output hash, wall time, and status; the chained hash verification detects any edited or reordered entry.
  • Budget safety — the scheduler never exceeds run/wall-clock budgets, and cumulative regret is sublinear on stationary synthetic surfaces.
  • Schema discipline — plan/artifact schemas round-trip exactly, reject unknown keys and wrong versions, and golden files make any drift deliberate.
  • Ablation completeness — generated grids carry a witness for every factor variation; incomplete coverage is reported honestly instead of silently dropped.

Package layout

ablation · adapters · artifacts · cli · clock · demo · errors · executor · http_adapter · ledger · mappings · metrics · plan · plan_queries · records · report · scheduler · schema · sequences · surrogate (torch extra) · svg · transforms — with py.typed and full type hints throughout.

Examples and documentation

examples/ contains three fully offline, runnable examples, each with its own README and captured output:

  • checkpoint_resume — plan validation, deterministic execution, and a simulated crash followed by resume-to-identical-artifacts.
  • bandit_regret — UCB1/Thompson scheduling against a synthetic oracle with a regret curve emitted as dependency-free SVG.
  • mini_program — a complete miniature research program producing an HTML report from real executed computations.

Documentation lives under docs/: architecture, artifacts and artifact layout, canonical JSON, configuration, adapters, ablation, the API reference, a glossary, and per-command references (demo-command.md, ablate-command.md, exit-codes.md, …).

License

MIT — see LICENSE. Release history is in CHANGELOG.md.

Official distribution

获取与安装

暂未发现可确认的官方软件包地址

当前 README 快照没有出现 npm、PyPI、Crates.io、pub.dev 等官方包页链接。本站不会根据仓库名称猜测下载地址。

本站不托管项目文件;需要安装时,请以项目维护者发布的官方文档为准。

使用前核验

本站保存公开资料用于阅读,不代表安全审计或功能背书。安装前请核对许可证、依赖来源和发布签名,不要直接运行来源不明的二进制文件或高权限脚本。