Skip to content

Fix resume mixing evaluator versions in PAIBench motion smoothness (evaluator identity fingerprint) - #374

Closed
JIN-strong wants to merge 5 commits into
NVIDIA:mainfrom
JIN-strong:worktree-paibench-eval-identity
Closed

JIN-strong wants to merge 5 commits into
NVIDIA:mainfrom
JIN-strong:worktree-paibench-eval-identity

Conversation

@JIN-strong

@JIN-strong JIN-strong commented Oct 14, 2026 •

Copy link
Copy Markdown

What

The PAIBench-G motion-smoothness runner (run_motion_smoothness_sharded.py) recorded only evaluator_root (a path) in its resume manifest. After the scorer checkout, its compatibility patches, or the scoring environment change, resuming silently mixed scores computed by different evaluator versions into one aggregated result.

This PR fingerprints the effective evaluator into the resume manifest and hard-fails resume when it changes:

  • build_evaluator_identity() computes an identity from the scorer git HEAD + git status --porcelain hash (captures in-place edits and untracked files), content hashes of the checked-in compatibility patches, and the scorer_environment.freeze.txt hash.
  • The manifest gains an evaluator_identity key and RUNNER_VERSION bumps 2 → 3.
  • prepare_manifest() hard-fails with an actionable message when the previous identity differs. Legacy (pre-evaluator_identity) manifests get a dedicated message pointing to a new output directory.
  • Soft degradation: a non-git scorer records status: "unavailable" with a warning, and a missing freeze or patches directory records status: "missing", so resume protection degrades to the previous path+mtime baseline instead of crashing.

Why

Resuming a sharded run after a scorer upgrade could merge scores from the old and new evaluator versions without any signal, producing results that no single evaluator version had actually computed.

Fixes #361.

@JIN-strong
JIN-strong force-pushed the worktree-paibench-eval-identity branch from a2d7279 to cba8e56 Compare October 14, 2026 01:24
Part of #361. Adds pure helpers to fingerprint the effective
scorer source (git HEAD + worktree state), checked-in patches, and the
environment freeze, with soft degradation when git or freeze are absent.
Resume now hard-fails when the effective scorer (git source, applied
patches, environment freeze) differs from the manifest, so merged scores
can no longer mix evaluator versions. Fixes #361.
Verifies evaluator identity reports unavailable/missing and resume still
works under the degraded baseline, and skips git-dependent tests where git
is absent.
- legacy RUNNER_VERSION=2 manifests now raise a dedicated message
  ('legacy manifest without evaluator identity') instead of a misleading
  'restore the previous evaluator' error, since no identity was recorded
  and the evaluator itself may be unchanged; the evaluator-identity
  mismatch path is preserved for when the key exists but differs.
- hash_patches now folds filename and length into the digest so different
  patch sets cannot collide (e.g. {a:AB,b:C} vs {a:A,b:BC}).
- add a legacy-manifest rejection test and a collision-regression test.
- README: add git status diagnostic hint for unexpected resume failures.
@JIN-strong
JIN-strong force-pushed the worktree-paibench-eval-identity branch from cba8e56 to 2a13710 Compare October 14, 2026 01:26
@JIN-strong JIN-strong closed this Oct 14, 2026
@JIN-strong JIN-strong reopened this Oct 14, 2026
@JIN-strong JIN-strong closed this Oct 14, 2026
@JIN-strong
JIN-strong deleted the worktree-paibench-eval-identity branch October 14, 2026 01:27
@JIN-strong
JIN-strong restored the worktree-paibench-eval-identity branch October 14, 2026 01:31
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.

PAIBench resume can mix scores from different evaluator versions

1 participant