fix: repository-wide correctness and contract hardening - #79
Merged
Conversation
- _formula.py: _formula_predict() returns X as-is for non-formula (array) input, instead of np.asarray(X) which fails on CuPy/Torch. Caller (PooledOLS.predict) already does xp_asarray() downstream. - run_accuracy.py: revert time_index workaround, clean fit_kwargs.
…ce guard - run_accuracy.py: _require_finite_results accepts non_identifiable_fields; rank-deficient PooledOLS marks _bse/_tvalues/_pvalues/_conf_int as not_comparable instead of raising FloatingPointError. - _cox.py: re-add self.compute_inference to entry+robust guard (reverted by merge from other agent).
…f BSE in validator - Add 8 missing PR79 test files to git (were only local) - Add aggregate_results.py and expected_accuracy_manifest.json - Validator: skip _finite_array(stored BSE) for rank-deficient models where _rank_deficient=True flag is set by the accuracy runner
…uard - emit_final_report.py: full renderer with ReportValidationError, load_json_strict, validate_aggregated_report, render_markdown, emit_report, argparse CLI (--config/--validated/--output-json/ --output-markdown); SHA cross-check against embedded provenance - numerical.py: guard all covariance/BSE branches with not rank_deficient in validate_least_squares_final_state - CoxPHCV guard: add compute_inference check to entry+robust rejection (match CoxPH contract) - Test fixes: entry+robust+compute_inference=True → NotImplementedError; entry+robust+compute_inference=False → fit succeeds with _bse/_conf_int None Co-Authored-By: Claude <noreply@anthropic.com>
…e 3.10
Use Path.open('w', newline=...) + handle.write() instead.
Co-Authored-By: Claude <noreply@anthropic.com>
9 tasks
This was referenced Jul 24, 2026
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.
Summary
This PR completes the repository-wide review → reproduce → fix → test → re-review cycle for PR79, covering backend consistency, statistical contracts, NumPy/CuPy/Torch execution, validation infrastructure, documentation, and physical GPU evidence.
Final status
Ready to merge. All maintained validation gates passed.
Current head
23c6fe9d87ba3ea4478a84e59765057a07ab6c0dc85750d63d4e6dbc9d988847566c20f5fa862e91Exact-head verification
static-contractsFinal correctness changes
NOT_COMPARABLE.compute_inference=True→ explicitNotImplementedError;cov_type+compute_inference=False→ estimation remains available without inference outputs.Documentation and artifact synchronization
compute_inferencedimension.time_indexordering, effective-rankdf_resid, and rank-deficientNOT_COMPARABLEsemantics.results/pr79/final/final_accuracy_report.jsonand.md; a new full canonical report may be committed only after an exact-head full raw campaign is processed through the current aggregator and renderer.Non-blocking follow-ups
Merge recommendation
Squash and merge.