Repository navigation
test: fix the strict XPASS on the FMPE shifted-data test - #1992
Conversation
`posterior_flow_nn(z_score_theta=None)` does not disable z-scoring any more. The config layer drops `None` fields as "unset", and #1921 changed the `build_vector_field_estimator` default from `None` to "independent". The parametrization thus trained a z-scored network, and the strict xfail became an XPASS on all Python versions. "none" disables z-scoring, so the case again tests what its id says. The xfail stays valid: FMPE without z-scoring gives C2ST 0.61 on the shifted data.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan includes up to 3 reviews per rolling hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe FMPE shifted-data test now uses ChangesFMPE test configuration
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This is a localized test-only update that explicitly selects the no-z-score case and adjusts its test identifier; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1992 +/- ##
==========================================
+ Coverage 88.20% 89.15% +0.95%
==========================================
Files 140 140
Lines 14120 14120
==========================================
+ Hits 12454 12589 +135
+ Misses 1666 1531 -135
Flags with carried forward coverage won't be shown. Click here to find out more. |
Problem
CD is red on all four Python versions since #1921:
Cause
The case does not test "no z-scoring" any more.
Nonefields, becauseNoneis its "unset" sentinel.build_vector_field_estimatordefaults forz_score_xandz_score_yfromNoneto"independent". That change is correct. Without it, adefault
VectorFieldEstimatorBuilder()builds FMPE and NPSE with z-scoring off.posterior_flow_nn(z_score_theta=None)forwards nothing, and the newdefault applies.
Nonenow means"independent".The case thus trains a fully z-scored FMPE, and it passes.
Fix
The case uses
"none", which still disables z-scoring. The xfail stays valid: FMPE without z-scoring gives C2ST 0.61 on the shifted data, against 0.54 with z-scoring. The test id changes from[None-False]to[no_zscore].No source change. The behavior of
Noneis a separate decision, below.For the per-model config work (GSoC PR 7.5 and PR 9)
No action in this PR.
Noneneeds a defined meaning before the conversion lands.Nonemeans"independent"on all factories. The density factories behave this way since 0.26. For the vector-field factories it starts with Add VectorFieldEstimatorBuilder for FMPE / NPSE trainers #1921, which is not released.Literalcheck makesNoneraise. That gives three different behaviors in three releases.My preference is that
Nonekeeps the meaning of"none"while the factories live, becausez_score_parseralways read the two values the same way. We can then dropOptionalfrom those signatures at 1.0.One test pins the decision either way: an explicitly disabled z-scoring must stay disabled after the build. That is the counterpart of the default-z-scoring test from July. The builder-versus-factory comparison in
vf_builder_integration_test.pycannot see this class of change, because both paths moved together, and it goes away with the factory in PR 8.Analysis done with Claude Code.