-
Notifications
You must be signed in to change notification settings - Fork 658
Support fitted IsolationForest conversion to scikit-learn #8483
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
rapids-bot
merged 4 commits into
NVIDIA:main
from
JulienAu:fea-isolation-forest-as-sklearn
Aug 18, 2026
+351
−17
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
58bb4b5
Support fitted IsolationForest conversion to scikit-learn
JulienAu 3fb032e
Guard _attrs_to_cpu against a partially fitted model
JulienAu e75c3b5
Fix import formatting for isort
JulienAu e370675
Carry a configured max_depth over to reconstructed estimators
JulienAu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, thanks for working on this feature! I submitted dmlc/treelite#684 so that Treelite will preserve per-node sample counts.
Let's wait until #684 is merged, and remove this utility function.@JulienAu Would you be able to review dmlc/treelite#684 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed, thanks for the quick fix upstream (findings posted on dmlc/treelite#684). One data point for the sequencing here: the bytes cuML currently serializes carry data_count as present with value 0 on every node, and task_type kRegressor, so exported trees would come back with n_node_samples equal to 0 silently. Dropping the reconstruction therefore needs, besides treelite#684, the cuML C++ export to write real counts and tag kIsolationForest, plus a treelite release picked up by cuML. Since #8477 is blocked on this conversion, one option is to land the reconstruction now and swap it for the exported counts in a follow-up once the whole chain is in place. Happy either way, I will follow whatever sequencing you and @csadorf prefer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd much prefer to not block this PR on necessary upstream changes and just get this working with the local work-around. We can track the follow-up work in a separate issue and then land it as soon as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's follow @csadorf's suggestion and merge this PR first. We will remove the workaround later, once the upstream change is made. I created #8488 to keep track.