Address TODO items: safe_inference migration, module splits, np.dot, and bug fixes#163
Merged
Address TODO items: safe_inference migration, module splits, np.dot, and bug fixes#163
Conversation
…and bug fixes Migrate ~32 inline inference sites to safe_inference() across 11 source files, split 3 oversized modules (trop, imputation, two_stage) into sub-modules, replace @ operator with np.dot() at observation-dimension sites to avoid Apple M4 BLAS spurious warnings, fix diagnostics.py SE=0.0 bug, and fix test_two_stage.py test_nan_propagation no-op test. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Overall assessment: ✅ Looks good Executive summary:
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
Tests not run (not requested). |
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
safe_inference()across 11 source files for consistent NaN-safe inferencetrop.py→trop_results.py;imputation.py→imputation_results.py+imputation_bootstrap.py;two_stage.py→two_stage_results.py+two_stage_bootstrap.py@operator withnp.dot()at ~30 observation-dimension matrix sites to avoid Apple M4 BLAS spurious RuntimeWarningsdiagnostics.py:785SE returning 0.0 instead of NaN for undefined standard errorstest_two_stage.py::test_nan_propagationno-op test (waspasswith no assertions)Methodology references (required if estimator / math changes)
safe_inference()migration, both use t-distribution. Documented in REGISTRY.md.Validation
test_diagnostics.py(SE=NaN regression),test_linalg.py(np.dot no-warnings),test_staggered.py(NaN-SE CI regression),test_two_stage.py(test_nan_propagation fix)from diff_diff.X import Y)Security / privacy
Generated with Claude Code