Blinding groups and full-name parameter matching#144
Merged
Conversation
0d65cf6 to
9d67c28
Compare
--blindingGroup: regex-defined groups of parameters that share a single deterministic blinding offset, seeded from the group regex string itself. This keeps relative pulls / differences between matched parameters meaningful while still blinding their absolute values (e.g. --blindingGroup '^alphaS_y\d+$' applies one common offset to all alphaS rapidity-bin parameters). Parameters not matching any group keep per-name blinding. A parameter matching both --unblind and --blindingGroup is a configuration error and aborts the fit, to avoid silently picking one interpretation. match_regexp_params now matches each expression against the FULL parameter name (re.fullmatch) and returns the union of exact and regex matches (de-duplicated, order-preserving) instead of short-circuiting on the first exact match. Full anchoring means an expression naming one parameter exactly can no longer also match parameters whose names merely extend it (a prefix match could silently unblind more than intended); match a family with an explicit pattern, e.g. 'alphaS.*'. The parameters an --unblind expression resolves to are now logged at INFO. Used by --unblind, --freezeParameters and --blindingGroup; help texts updated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
9d67c28 to
835ecaa
Compare
test_global_asym_impacts.py wrote to a fixed /tmp/test_global_asym_impacts path, so two CI runs touching it at the same time (e.g. several open PRs) clobbered each other's intermediate fit results -> spurious FileNotFound. Derive OUTDIR from the per-run RABBIT_OUTDIR (a unique uuid dir in CI), falling back to a fresh tempfile.mkdtemp() locally. It is the only test with a hardcoded shared output path; the fit CI jobs already use RABBIT_OUTDIR. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Removed comments about output directory handling in CI.
lucalavezzo
added a commit
to lucalavezzo/rabbit
that referenced
this pull request
Jun 23, 2026
Integrates the merged sibling PRs into the priors/unification branch: WMass#140 fit-ops (minimizer flags, externalPostfit), WMass#142 scalePoiScan, WMass#143 CompositeParamModel layout fix, WMass#144 blinding groups. Conflicts (both trivial): - fitter.py: blinding_group=options.blindingGroup (main's direct form; the SimpleNamespace test fixtures already carry blindingGroup=[]). - helpers.py: kept main's cleaned-up version (dropped the explanatory comment removed on main). Also dropped tests/test_composite_param_model.py, which the merge re-introduced from this branch but was deliberately removed on main. Validated: lint clean; pytest (15) + the five CI script-tests pass; the ParamModel-prior closure is unchanged (gaussian sig_prior 1.105769e-02, asym (-1.097e-2,+1.114e-2)); parsing.py is identical to main so all of WMass#140/WMass#142/WMass#144's CLAs are present. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Split out of #139 as a standalone feature (no dependency on the priors work).
--blindingGroupRegex-defined groups of parameters that share a single deterministic blinding offset, seeded from the group regex string itself. This keeps relative pulls / differences between matched parameters meaningful while still blinding their absolute values, e.g.
--blindingGroup '^alphaS_y\d+$'applies one common offset to all αS rapidity-bin parameters. Parameters not matching any group keep per-name blinding. A parameter matching both--unblindand--blindingGroupis a configuration error and aborts the fit, to avoid silently picking one interpretation.Full-name parameter matching
match_regexp_paramsnow matches each expression against the full parameter name (re.fullmatch) and returns the union of exact and regex matches (de-duplicated, order-preserving) instead of short-circuiting on the first exact match.Behavior change: full anchoring means an expression that names one parameter exactly can no longer also match parameters whose names merely extend it — a prefix match could silently unblind more than intended. Match a family with an explicit pattern, e.g.
'alphaS.*'. The parameters an--unblindexpression resolves to are now logged at INFO. Used by--unblind,--freezeParameters, and--blindingGroup; help texts updated.Tests
Existing suite passes (15). Verified by hand on the test tensor: group members share one offset; an
--unblind/--blindingGroupoverlap aborts with a clear error.🤖 Generated with Claude Code