Skip to content

Update sklearn exporter for scikit-learn 1.10+ - #675

Merged
chyunsu3 merged 2 commits into
dmlc:mainlinefrom
chyunsu3:update_export
Jul 31, 2026
Merged

Update sklearn exporter for scikit-learn 1.10+#675
chyunsu3 merged 2 commits into
dmlc:mainlinefrom
chyunsu3:update_export

Conversation

@chyunsu3

@chyunsu3 chyunsu3 commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Closes #674

I validated the changes by running

pytest -vx -rxXs tests/python/test_sklearn_integration.py::test_skl_export_rf_regressor

with both scikit-learn 1.9 and 1.10 (nightly).

cc @betatim

@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.90%. Comparing base (96cb305) to head (45fcf67).

Files with missing lines Patch % Lines
python/treelite/sklearn/exporter.py 70.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           mainline     #675      +/-   ##
============================================
- Coverage     83.93%   83.90%   -0.03%     
============================================
  Files            75       75              
  Lines          6816     6823       +7     
  Branches        557      557              
============================================
+ Hits           5721     5725       +4     
- Misses         1095     1098       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread python/treelite/sklearn/exporter.py Outdated
@betatim

betatim commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

I don't really know the treelite code base so I can't really review this, but it looks reasonable to have a version dependent branch.

Do you want to add a regression test to this?

@chyunsu3

Copy link
Copy Markdown
Collaborator Author

Do you want to add a regression test to this?

We already have tests/python/test_sklearn_integration.py::test_skl_export_rf_regressor. To check regressions, we'd need to test a nightly version of scikit-learn in the Treelite CI. I opened #677 to follow up.

@chyunsu3
chyunsu3 merged commit 5b91ba7 into dmlc:mainline Jul 31, 2026
18 of 20 checks passed
@chyunsu3
chyunsu3 deleted the update_export branch July 31, 2026 01:25
This was referenced Aug 19, 2026
chyunsu3 added a commit to chyunsu3/treelite that referenced this pull request Aug 25, 2026
* Update sklearn exporter for scikit-learn 1.10+

* Fix version comparsion logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

scikit-learn exporter doesn't work with the nightly version of scikit-learn

2 participants