-
Notifications
You must be signed in to change notification settings - Fork 183
Add support for local trees mode in forest #2615
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
Add support for local trees mode in forest #2615
Conversation
/intelci: run |
Codecov Report❌ Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
/intelci: run |
/intelci: run |
/intelci: run |
/intelci: run |
/intelci: run |
/intelci: run |
/intelci: run |
/intelci: run |
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 go with a wrapper over _onedal_factory
. It would isolate the changes only to spmd. Something like
def local_trees_wrapper(func):
def new_factory(self, **params):
params["local_trees_mode"] = self.local_trees_mode
return func(self, **params)
return new_factory
If at the top of the spmd file, it will be very clear that something is added and different in a way that isn't obscured by another function indirection in the class.
Additional things:
- The addition of testing is 🔥
- Add some code comments in the spmd file so that the next person can understand why the init was added (since its so many parameters, it may be hard to spot).
- Overall I am surprised how cleanly this came through. Its definitely something for others to reference to going forward.
Great suggestion, didn't fully realize this was possible. Added. |
/intelci: run |
/intelci: run |
/intelci: run |
Green CI from before reformat: http://intel-ci.intel.com/f06d1269-bcb8-f1a2-8fdc-d4f5ef20c6a0 |
@icfaust got local_trees_wrapper implemented such that no changes in non-spmd file are necessary (just returns class instead of function) and CI appears to be okay. Feel free to suggest tweaks to the updated implementation. |
/intelci: run |
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.
that green CI is chefs kiss. thanks for the hard work it looks great
Description
Adds API to sklearnex to utilize changes added in uxlfoundation/oneDAL#3139. Supports
local_trees_mode
parameter in Random Forest SPMD classes without breaking scikit-learn inheritor requirements. Adds test for this parameter (just functionality). Docs need to be updated somehow.PR completeness and readability
Testing
Performance