Skip to content
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

Merged
merged 8 commits into from Mar 18, 2019

Conversation

eisber
Copy link
Contributor

@eisber eisber commented Feb 27, 2019

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.

src/c_api.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@imatiach-msft imatiach-msft left a 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?

src/c_api.cpp Outdated Show resolved Hide resolved
int64_t* out_len,
double* out_result) {
API_BEGIN();
auto param = Config::Str2Map(parameter);
Copy link
Contributor

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

Copy link
Contributor Author

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?

Copy link
Contributor

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.

@StrikerRUS StrikerRUS requested a review from guolinke March 7, 2019 11:04
@guolinke guolinke merged commit beeb6e0 into microsoft:master Mar 18, 2019
@guolinke
Copy link
Collaborator

@StrikerRUS I think we can use these apis to improve the prediction in python package as well

@lock lock bot locked as resolved and limited conversation to collaborators Mar 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants