feat(reproduce): velocity reproduce — re-run an archived sweep#80
Merged
Conversation
The inverse of `velocity archive`, closing the reproducibility loop. read_archive recovers the per-run RunSpecs (and original comparison.json) straight from the crate zip; reproduce_archive re-runs them via the existing run_sweep (DRY). `velocity reproduce <archive.zip> [--out] [--check] [--tolerance]`. --check compares each run's reproduced final loss against the archived value within a relative tolerance and exits non-zero on a real mismatch. Tolerance-based, not bit-exact (ML/float aggregation isn't bitwise reproducible across runs/hardware) and nan-safe (pydantic serializes an in-memory nan loss to JSON null, so a present run with null loss is read as nan and doesn't false-mismatch a reproduced nan). Documented in docs/cli.md (roster guard). TDD throughout; full suite 379 passed. research(2026-06): ACM/NISO "reproduced" = same config+code re-executed; numerical non-determinism in ML -> tolerance not equality.
Contributor
Merging this PR will not alter performance
Comparing Footnotes
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
velocity reproduce <archive.zip> [--out] [--check] [--tolerance]— the inverse ofvelocity archive(#79), closing the reproducibility loop.read_archiverecovers the per-runRunSpecs + originalcomparison.jsonstraight from the crate zip (no extraction needed).reproduce_archivere-runs them via the existingrun_sweep(DRY).--checkcompares each run's reproduced final loss against the archived value within--toleranceand exits non-zero on a real mismatch.Research-grounded decisions (2026-06)
reproduce.--checkuses a relative tolerance (math.isclose), not equality — bit-exact would emit false failures. nan-safe: pydantic serializes an in-memory nan loss to JSONnull, so a present run with null loss is read as nan and doesn't false-mismatch a reproduced nan; an absent run is a real mismatch. (This asymmetry was caught by round-trip testing, not assumed.)Testing
SweepResult), CLI happy-path +--check.docs/cli.md— satisfying the roster guard (the lesson from feat(archive): velocity archive — RO-Crate reproducibility bundle #79).make lint(ruff + ty) green; full suite 379 passed, 9 skipped; end-to-end CLI smoke (sweep → archive → reproduce --check) exits 0.YAGNI: scoped to the archive↔reproduce loop; replication (new data) and DOI/Zenodo automation are deliberately out of scope.