-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Added additional APIs to better support JNI on Spark #2032
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.
LGTM - @guolinke might you be able to take a look?
int64_t* out_len, | ||
double* out_result) { | ||
API_BEGIN(); | ||
auto param = Config::Str2Map(parameter); |
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.
some of this code looks very similar to below, would be nice to refactor to a single common function
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 agree it looks very much the same, but then again it's mostly boilerplate code that's replicated in other functions too (e.g. LGBM_BoosterPredictForFile). Maybe packaging up the Config creation and translation to OMP would be better. Different PR?
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.
ok, ignore my comment then, this is fine.
…ing. fixed dead-lock on databricks
…arcozo/jniperf
@StrikerRUS I think we can use these apis to improve the prediction in python package as well |
Performance improvement for prediction is roughly 3-4x on our datasets.
Training data loading was also improved by avoiding memory copy. Performance measurements are still in progress.