Skip to content

cuml.accel SVM onnx support - #8307

Merged
rapids-bot[bot] merged 3 commits into
NVIDIA:mainfrom
jcrist:cuml-accel-svm-onnx
Jul 2, 2026
Merged

cuml.accel SVM onnx support #8307
rapids-bot[bot] merged 3 commits into
NVIDIA:mainfrom
jcrist:cuml-accel-svm-onnx

Conversation

@jcrist

@jcrist jcrist commented Jul 1, 2026

Copy link
Copy Markdown
Member
  • Adds support for skl2onnx to work with SVC/SVR under cuml.accel
  • Updates tests to fix xfails
  • Removes onnx notes in the cuml.accel limitations
  • Also removes the notes on segfaults for SVC/SVR in that section. The cause there doesn't make sense (our test suite intermingles these estimators all the time and never sees these issues), and I cannot reproduce the issue locally.

Fixes #7822

jcrist added 3 commits July 1, 2026 16:38
These are easy to add by exposing `_gamma`.
I cannot reproduce the segfaults.
@jcrist jcrist self-assigned this Jul 1, 2026
@jcrist
jcrist requested a review from a team as a code owner July 1, 2026 21:46
@jcrist
jcrist requested a review from divyegala July 1, 2026 21:46
@jcrist jcrist added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change cuml-accel Issues related to cuml.accel labels Jul 1, 2026
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 3ab31879-de76-4178-9e4d-cbde6680263a

📥 Commits

Reviewing files that changed from the base of the PR and between 0b19540 and 2b62bdd.

📒 Files selected for processing (4)
  • docs/source/cuml-accel/limitations.rst
  • python/cuml/cuml/accel/_overrides/sklearn/svm.py
  • python/cuml/cuml_accel_tests/test_onnx.py
  • python/cuml/cuml_accel_tests/upstream/scikit-learn/xfail-list.yaml
💤 Files with no reviewable changes (2)
  • python/cuml/cuml_accel_tests/upstream/scikit-learn/xfail-list.yaml
  • docs/source/cuml-accel/limitations.rst

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Improved support for SVC and SVR by aligning their exposed attributes with expected behavior.
    • Suppressed an unnecessary warning during linear SVC/SVR ONNX conversion and execution.
  • Documentation

    • Updated the accelerator limitations page to reflect the current SVR fallback conditions.
  • Tests

    • Adjusted test coverage to match the latest SVC/SVR behavior and removed an outdated expected-failure case.

Walkthrough

This PR updates proxy attribute metadata for SVC/SVR under cuml.accel (replacing _not_implemented_attributes with _other_attributes containing _gamma), removes the xfail_proxy_private_attr ONNX test marker in favor of filterwarnings, updates a scikit-learn xfail list entry, and trims stale SVR documentation notes.

Changes

SVC/SVR proxy attribute and ONNX xfail fix

Layer / File(s) Summary
SVC/SVR proxy attribute metadata
python/cuml/cuml/accel/_overrides/sklearn/svm.py
_not_implemented_attributes is replaced with _other_attributes = frozenset(("_gamma",)) for both SVC and SVR.
ONNX conversion test updates
python/cuml/cuml_accel_tests/test_onnx.py
Removes the xfail_proxy_private_attr marker and replaces its use in SVC/SVR linear-kernel parametrizations with pytest.mark.filterwarnings ignoring a FutureWarning about deprecated `prob[A
Upstream scikit-learn xfail list update
python/cuml/cuml_accel_tests/upstream/scikit-learn/xfail-list.yaml
Replaces test_gamma_scale with test_svc_raises_error_internal_representation in the cuml_accel_invalid_sklearn_tests tests list.
Documentation cleanup for SVR limitations
docs/source/cuml-accel/limitations.rst
Removes the SVR "Additional notes" section (ONNX export note and SVR/LinearSVR segfault note), retaining only CPU-fallback conditions.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • rapidsai/cuml#7805: Both PRs modify test_onnx.py around SVC/SVR xfail/marker handling for private attributes during ONNX conversion.
  • rapidsai/cuml#7929: Both PRs modify the SVR section of docs/source/cuml-accel/limitations.rst.
  • rapidsai/cuml#8223: Both PRs touch SVC/SVR proxy attribute metadata and ONNX test warning handling for deprecated prob[A|B] attributes.

Suggested labels: Cython / Python

Suggested reviewers: viclafargue, csadorf

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: enabling SVC/SVR ONNX support under cuml.accel.
Description check ✅ Passed The description is directly related to the PR and summarizes the test and documentation updates.
Linked Issues check ✅ Passed The PR addresses #7822 by removing the ONNX xfail path, updating docs, and fixing the proxy attribute needed for SVC/SVR.
Out of Scope Changes check ✅ Passed The changes stay within the issue scope and only adjust ONNX support, tests, and related documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the Cython / Python Cython or Python issue label Jul 1, 2026
@jcrist

jcrist commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

/merge

@rapids-bot
rapids-bot Bot merged commit 9dfe4fd into NVIDIA:main Jul 2, 2026
98 checks passed
@jcrist
jcrist deleted the cuml-accel-svm-onnx branch July 2, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuml-accel Issues related to cuml.accel 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.

[BUG] Segfault when SVC/SVR and LinearSVC coexist under cuml.accel

4 participants