A reference artifact lives in your repository (via git-LFS or a cloud bucket). Every PR re-records the same experiment and asserts a fingerprint match. When the two disagree, the job fails with a structured diff — never a mystery.
Goal
Fail the PR when a change to the model, the training script, or the pinned dependencies would silently alter recorded activations.
The workflow
.github/workflows/neuronscope.yml··yaml
name: neuronscope-gateon: [pull_request]jobs: gate: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: lfs: true - uses: actions/setup-python@v5 with: python-version: '3.12' - run: pip install "neuronscope[torch]==0.9.2" -r requirements.txt - run: python scripts/record_reference.py --out current.nsz - run: ns compare tests/fixtures/reference.nsz current.nsz --strictAssertions
ns compare --strictexits non-zero on any diff above the metric's noise floor.- For per-layer thresholds, use
ns compare --report compare.mdand post the file as a PR comment. - To assert exactly-equal artifacts (bit-identical bytes on the same CPU/GPU), pass
--bit-exact.