Repository navigation
Use an absolute shared test tolerance - #1240
Closed
karthiksenv wants to merge 1 commit into
Closed
karthiksenv wants to merge 1 commit into
karthiksenv wants to merge 1 commit into
Conversation
|
Review these changes at https://app.gitnotebooks.com/stumpy-dev/stumpy/pull/1240 |
8 tasks
Contributor
|
This is not needed for now |
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.
Related to #1175 and the question about the tolerance results.
Store
STUMPY_TEST_PRECISIONas the absolute tolerance1.5e-07requested in the issue checklist, and pass it directly toassert_allclose. This updates 93 active assertions across 17 test files and the corresponding disabled comparisons. A comment inconfig.pydocuments the setting's units.The existing default is
5, which the assertions convert to1.5 * 10**-5 = 1.5e-05. This change therefore tightens those comparisons by a factor of 100. The algorithm implementations are unchanged.This is a draft because the stricter tolerance exposes five failing cases. No tolerances were relaxed and no failing assertions were skipped.
Validation on Ubuntu, based on main
a42ca40, with Python 3.12.15, NumPy 2.5.4, Numba 0.68.1, seed3559353816, JIT disabled and CUDA simulated:atol=1.5e-05atol=1.5e-07Both runs used the same 42 test functions in the same order. Failures can change subsequent random draws, so the seed alone does not reproduce every case in isolation.
test_gpu_stump.py::test_gpu_stump_identical_subsequence_self_join4.03983644e-07test_mstump.py::test_identical_subsequence_self_join2.65725769e-07test_scrump.py::test_scrump_identical_subsequence_self_join[percentages0]2.06476546e-07test_stump.py::test_stump_identical_subsequence_self_join2.22022301e-07test_stumpi.py::test_stumpi_identical_subsequence_self_join_egress2.22022301e-07For example, GPU-STUMP returns
4.03983644e-07where the reference returns zero. This passes the old tolerance and fails the proposed one.Black and flake8 passed across the package, tests and included helper scripts.
git diff --checkpassed. An AST comparison confirms that the executable changes consist only of the configured tolerance conversion. The full suite, JIT-enabled tests and hardware CUDA validation have not been run for this branch.To reproduce the affected selection from either branch, with the versions above installed:
Pull Request Checklist
./setup.sh dev && ./test.shand ensured all tests passThe draft records the failures for discussion before requesting review.