-
Notifications
You must be signed in to change notification settings - Fork 105
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
[ML] adds support for transforming LGBMRegressor models #247
[ML] adds support for transforming LGBMRegressor models #247
Conversation
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.
We'll need a few changes to noxfile.py
:
- Add the files that are typed to the
TYPED_FILES
collection - Add a section for testing with and without
lightgbm
in thetest_ml_deps
job
And one change in setup.py
:
- Add the
lightgbm
extra so we can version constrain in the future if needed
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.
Handful of nits but now this is ready for a technical review :D Thanks much!
Also, I noticed the version pin to 2.3.X, it looks like a release candidate for v3 got published literally minutes ago. As a separate item I'll open an issue to test against v3 and see if it's easy for us to support both or if its more work.
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.
One tiny comment then this LGTM
eland/ml/transformers/lightgbm.py
Outdated
if decider == ">=": | ||
return "gte" | ||
raise ValueError( | ||
"Unsupported splitting decider: %s. Only <=, " "<, >=, and > are allowed." |
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.
This is two string literals joining together, you can change it to one. (see "...<=, " "<,..."
)
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.
Overall looks good. I haven't checked the format for LGBM, but the test passing convinces me you're converting correctly :). On that front, I think we probably ought to have a test for a classifier as well.
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.
LGTM
Thanks @benwtrent and @tveasey! |
This adds support for lightgbm LGBMRegressor models.
Verified that all the supported objective functions and various booster types work great.
relates to #240