-
Notifications
You must be signed in to change notification settings - Fork 564
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
CPU/GPU interop with RandomForest #6175
Conversation
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. |
Does "latest treelite" mean we need #6212 to be merged for this to work? |
This PR actually contains duplicate commits from #6212. So yes, we need the latest Treelite to support the interop feature. |
# treelite does an internal isinstance check to detect an sklearn | ||
# RF, which proxymodule interferes with. We work around that | ||
# temporarily here just for treelite internal check and | ||
# restore the __class__ at the end of the method. |
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.
In a future version of Treelite, we should add an alternative version of treelite.sklearn.import_model
that takes in a second argument model_type
? The caller would provide a string to uniquely identify the model type, so that we can remove the internal isinstance
check.
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.
Maybe, depends on whether we do other changes in cuML itself to potentially avoid this
/merge |
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.
Just realized I forgot to review this PR before it was merged, sorry about that! I just took a look at it. It looks like several workarounds were used, but all of them seemed necessary. Also, good testing. LGTM. Thanks for the great work @hcho3!
First version for CPU/GPU interop with RandomForest. Note. This feature requires latest Treelite.