feat(explorer): use uncertainties for analysis propagation#269
Open
Rajesh270712 wants to merge 1 commit into
Open
feat(explorer): use uncertainties for analysis propagation#269Rajesh270712 wants to merge 1 commit into
Rajesh270712 wants to merge 1 commit into
Conversation
b778c15 to
5e72619
Compare
9575fab to
deda98d
Compare
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
uncertainties~=3.2todeltakit-explorer.ufloat,unumpy, andcorrelated_valuesfor LEPPR, log-fidelity, and lambda uncertainty propagation.Links
uncertaintiesinstead of computing standard deviations manually #215Problem
Issue #215 asks for the analysis helpers to use
uncertaintiesinstead of maintaining standard-deviation propagation formulas manually. The existing LEPPR/log-fidelity/lambda paths computed propagated errors by hand, which made the formulas harder to audit and extend.Fix
This PR adds
uncertaintiesto the explorer package and delegates the affected propagation steps touncertaintieshelpers. The external API shape is unchanged: callers still receive floats or NumPy arrays rather thanuncertaintiesobjects.Validation
uv run --group test pytest deltakit-explorer/tests/analysis/test_leppr.py deltakit-explorer/tests/analysis/test_lambda.py deltakit-explorer/tests/analysis/budget/test_post_processing.py -q->6063 passed in 11.25suv run --group lint ruff check deltakit-explorer/src/deltakit_explorer/analysis/_leppr.py deltakit-explorer/src/deltakit_explorer/analysis/_lambda.py deltakit-explorer/tests/analysis/test_leppr.py deltakit-explorer/tests/analysis/test_lambda.py->All checks passed!uv run --group lint mypy --config-file deltakit-explorer/pyproject.toml deltakit-explorer/src/deltakit_explorer/analysis/_leppr.py deltakit-explorer/src/deltakit_explorer/analysis/_lambda.py->Success: no issues found in 2 source filesuv run --group lint deptry deltakit-explorer/src --config deltakit-explorer/pyproject.toml->Success! No dependency issues found.uv run python -c "import uncertainties; import deltakit_explorer.analysis._leppr; import deltakit_explorer.analysis._lambda; print(uncertainties.__version__)"->3.2.3git diff --check origin/main...HEAD-> passed with no outputRisk Notes
uncertaintiesdoes not ship type stubs, so the mypy configuration includes a narrow missing-import override for that dependency.