Files
OBLITERATUS/obliteratus/experiments/__init__.py
Joseph MaglyandClaude Opus 5.5 29eab4ac37 feat(experiments): baseline observation runner with resumable run records
Add a shared observation spec, runner, run store and comparison so one
baseline observation can be specified once, run from the CLI or Python,
resumed after interruption and compared across runs.

- Spec: versioned JSON with a single schema file as authority. It
  references a pack, dataset revision and role (locked test only with
  acknowledgement), model id/revision/dtype, greedy decoding, registered
  scorer tasks, optional activation capture and profiling, and a seed.
  The canonical digest of the defaulted spec is the run identity.
- Runner: baseline only. It refuses models with forward/backward hooks,
  global module hooks, an interrupted-surgery marker or active adapters
  before any generation, then scores generation per task (single-arm,
  descriptive scorecards with Wilson intervals) and optionally captures
  activations and profile counters.
- Store: one directory per run identity, append-only attempt events,
  pending/running/complete/failed/cancelled transitions under a lock.
  Abandoned attempts are recorded as failed. A new attempt reuses a step
  only when it is complete, identity-matched and its files still verify.
- Compare: exact equality for identities, counts and per-example
  outcomes; explicit tolerances for rates and activations, reported per
  field.
- CLI: `obliteratus experiments run|compare|history`, sharing one
  Python code path a UI can call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 12:26:40 -05:00

14 lines
699 B
Python

"""Baseline observation specs, runner, local run store and result comparison."""
from obliteratus.experiments.compare import compare_results
from obliteratus.experiments.inputs import InterventionStateRefused, require_unmodified
from obliteratus.experiments.runner import ObservationCancelled, load_result, run_observation
from obliteratus.experiments.spec import SpecError, load_spec, spec_digest
from obliteratus.experiments.store import ObservationStore, StoreError
__all__ = [
"InterventionStateRefused", "ObservationCancelled", "ObservationStore", "SpecError",
"StoreError", "compare_results", "load_result", "load_spec", "require_unmodified",
"run_observation", "spec_digest",
]