Skip to content

Use _assert_allclose function for approximate equality check.#6763

Merged
rapids-bot[bot] merged 1 commit intorapidsai:branch-25.06from
csadorf:fix/issue-6753
May 20, 2025
Merged

Use _assert_allclose function for approximate equality check.#6763
rapids-bot[bot] merged 1 commit intorapidsai:branch-25.06from
csadorf:fix/issue-6753

Conversation

@csadorf
Copy link
Copy Markdown
Contributor

@csadorf csadorf commented May 19, 2025

This commit introduces a new helper function, _assert_allclose, to check if array-like data and cuml arrays are approximately equal using specified relative and absolute tolerances. The existing test case for binary operations has been updated to utilize this new function for adjusted precision in comparisons.

Closes gh-6753

This commit introduces a new helper function, _assert_allclose, to check
if array-like data and cuml arrays are approximately equal using
specified relative and absolute tolerances. The existing test case for
binary operations has been updated to utilize this new function for
adjusted precision in comparisons.
@csadorf csadorf self-assigned this May 19, 2025
@csadorf csadorf requested a review from a team as a code owner May 19, 2025 22:06
@csadorf csadorf requested review from dantegd and teju85 May 19, 2025 22:06
@github-actions github-actions Bot added the Cython / Python Cython or Python issue label May 19, 2025
@csadorf csadorf added bug Something isn't working non-breaking Non-breaking change and removed Cython / Python Cython or Python issue labels May 19, 2025
Copy link
Copy Markdown
Member

@betatim betatim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In principle fine for me.

One thing that would be nice, but bigger than this PR, is to somehow collect the various variations of allclose functions that seem to be defined across the tests.

@betatim
Copy link
Copy Markdown
Member

betatim commented May 20, 2025

The failing test (test_tsne_knn_graph_used[cancer-fft-sklearn]) doesn't look like it should be a flaky test, but also not related to this PR really.

@csadorf
Copy link
Copy Markdown
Contributor Author

csadorf commented May 20, 2025

/merge

@rapids-bot rapids-bot Bot merged commit 5fe1203 into rapidsai:branch-25.06 May 20, 2025
92 checks passed
@csadorf csadorf deleted the fix/issue-6753 branch May 20, 2025 16:04
@csadorf
Copy link
Copy Markdown
Contributor Author

csadorf commented May 21, 2025

One thing that would be nice, but bigger than this PR, is to somehow collect the various variations of allclose functions that seem to be defined across the tests.

I've created #6782 to capture that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky cuML Array Binary Operations Test Failure: Floating Point Precision Issue

3 participants