Skip to content

Fix emulator covariance batching and group cache collisions - #8

Draft
botjean wants to merge 1 commit into
JETSCAPE:mainfrom
botjean:agent/fix-emulator-correctness
Draft

Fix emulator covariance batching and group cache collisions#8
botjean wants to merge 1 commit into
JETSCAPE:mainfrom
botjean:agent/fix-emulator-correctness

Conversation

@botjean

@botjean botjean commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Apply PCA-truncation covariance once per predicted parameter point, independent of prediction batch size.
  • Give implicit names to multi-group emulator pickles so groups cannot overwrite or read each other's models.
  • Preserve the legacy emulator.pkl filename for a single unnamed group.
  • Reject duplicate explicit names before training or inference.
  • Correct the PCA covariance documentation and test its absolute normalization against the residual sample covariance.

Root causes

predict() divided an already normalized PCA residual covariance by the number of parameter points in the current prediction call. The same physical point therefore received different emulator covariance when evaluated alone versus in a batch.

Separately, all emulator groups defaulted to emulator.pkl, so multi-emulator configurations could silently overwrite one group with another. This change uses group names only when more than one group is configured, retaining single-group cache compatibility.

Validation

  • Focused emulator tests: 6 passed
  • Full clean-branch suite: 22 passed
  • Independent agent re-review: no remaining findings
  • Combined with the dependent methodology branch: 31 passed
  • git diff --check: clean

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.

1 participant