Skip to content

Improve detection of scikit-learn parity regressions #6553

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

csadorf
Copy link
Contributor

@csadorf csadorf commented Apr 18, 2025

This PR enhances the infrastructure for monitoring scikit-learn parity in cuML's accelerated estimators, enabling better tracking and management of differences between scikit-learn and cuML implementations.

Key Changes

  • Moved scikit-learn test tooling from ci/ to python/cuml/cuml/accel/tests/scikit-learn/ for better organization
  • Added xfail-list.yaml to track known differences from scikit-learn
  • Added tooling to summarize-results script to maintain xfail-list
  • Added parallel test execution support via pytest-xdist for faster test runs

Infrastructure Capabilities

The new infrastructure enables continuous monitoring of scikit-learn parity by:

  • Running scikit-learn tests with cuML acceleration
  • Tracking pass rates and comparing against thresholds
  • Automatically detecting new failures (regressions)
  • Managing known differences via xfail lists

Related Changes

Copy link

copy-pr-bot bot commented Apr 18, 2025

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions bot added Cython / Python Cython or Python issue ci labels Apr 18, 2025
@csadorf csadorf added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Apr 18, 2025
@csadorf csadorf self-assigned this Apr 18, 2025
@csadorf
Copy link
Contributor Author

csadorf commented Apr 18, 2025

/ok to test 5759457

@csadorf
Copy link
Contributor Author

csadorf commented Apr 18, 2025

/ok to test 8d56c54

@csadorf
Copy link
Contributor Author

csadorf commented Apr 18, 2025

/ok to test 1772262

csadorf added a commit to csadorf/cuml that referenced this pull request Apr 18, 2025
…sai#6553)

This change modifies the KMeans test to set n_init to 2, enhancing the stability of the k-means|| initialization process. Additional context can be found in issue rapidsai#5530.
rapids-bot bot pushed a commit that referenced this pull request Apr 18, 2025
#6555)

This change modifies the KMeans test to set n_init to 2, enhancing the stability of the k-means|| initialization process. Additional context can be found in issue #5530.

Closes #5530.

Authors:
  - Simon Adorf (https://github.com/csadorf)

Approvers:
  - Divye Gala (https://github.com/divyegala)
  - Jim Crist-Harif (https://github.com/jcrist)

URL: #6555
@csadorf csadorf force-pushed the ci/accel-skl-regression-testing branch from 1772262 to fd2d0b2 Compare April 19, 2025 17:36
@csadorf
Copy link
Contributor Author

csadorf commented Apr 21, 2025

/ok to test fd2d0b2

@csadorf csadorf force-pushed the ci/accel-skl-regression-testing branch from fd2d0b2 to a80327d Compare April 22, 2025 17:16
@csadorf
Copy link
Contributor Author

csadorf commented Apr 22, 2025

/ok to test a80327d

@csadorf
Copy link
Contributor Author

csadorf commented Apr 22, 2025

/ok to test d5ed917

@csadorf csadorf linked an issue Apr 22, 2025 that may be closed by this pull request
@csadorf
Copy link
Contributor Author

csadorf commented Apr 22, 2025

/ok to test e00dc0b

@csadorf
Copy link
Contributor Author

csadorf commented Apr 22, 2025

/ok to test 86819cf

csadorf added 3 commits April 22, 2025 15:38
- Move most of the related tooling from ci/ to python/cuml/cuml/accel/tests/scikit-learn/
- Add xfail-list.yaml to track known differences from scikit-learn
- Add --format=xfail_list to automatically generate xfail lists from failures

The infrastructure enables continuous monitoring of scikit-learn parity by:
- Running scikit-learn tests with cuML acceleration
- Tracking pass rates and comparing against thresholds
- Automatically detecting new failures
- Managing known differences via xfail lists

Import pytest lazily within the pytest_collection_modifyitems function
to avoid requiring it for normal cuML usage, ensuring pytest is only
needed during test execution.
@csadorf csadorf force-pushed the ci/accel-skl-regression-testing branch from 86819cf to 58f24eb Compare April 22, 2025 20:38
@csadorf csadorf changed the title Add scikit-learn parity regression detection infrastructure Improve detection of scikit-learn parity regressions Apr 22, 2025
@csadorf csadorf marked this pull request as ready for review April 22, 2025 20:57
@csadorf csadorf requested review from a team as code owners April 22, 2025 20:57
Copy link
Member

@jcrist jcrist left a comment

Choose a reason for hiding this comment

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

Two tiny nits, but otherwise this looks great! Thanks for working on this.

@csadorf csadorf requested a review from a team as a code owner April 24, 2025 21:13
@github-actions github-actions bot added the conda conda issue label Apr 24, 2025
Copy link
Member

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

Approving for packaging-codeowners / ci-codeowners.

Full disclosure, I only skimmed summarize-results.py, since it looks pretty complex but also isn't user-facing.

@csadorf
Copy link
Contributor Author

csadorf commented Apr 25, 2025

/merge

@rapids-bot rapids-bot bot merged commit f3a16f4 into rapidsai:branch-25.06 Apr 25, 2025
77 of 78 checks passed
@csadorf csadorf deleted the ci/accel-skl-regression-testing branch April 25, 2025 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci conda conda issue Cython / Python Cython or Python issue improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scikit-learn Parity Regression Detection Infrastructure
3 participants