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

Implemented memory allocation strategy for different prediction types #60

Merged
merged 1 commit into from
Oct 10, 2022

Conversation

popovstefan
Copy link
Contributor

Tried to use the library in a real-time streaming application and got random memory leak errors. Debugged and noticed that for each prediction type we allocate the same memory for the output result, but it should be different. See the notes at the following links:

In this pull request I have implemented a method to dynamically determine the memory needed for the output result based on the prediction type (at the bottom of the LGBMBooster.java class). I have also written tests for all possible prediction types.

@popovstefan
Copy link
Contributor Author

I believe the fail in 17, macos-11 is related to microsoft/LightGBM#4229 but I am not sure how can I fix that. Maybe downgrading the libomp as the issue suggests?

@shuttie shuttie merged commit 7bf02f7 into metarank:main Oct 10, 2022
@shuttie
Copy link
Contributor

shuttie commented Oct 10, 2022

The issue you've mentioned seems to be specific to macos-12. Re-running the CI seems to hint that it's some sort of flaky test.

@shuttie
Copy link
Contributor

shuttie commented Oct 10, 2022

@popovstefan I've made a minor release https://github.com/metarank/lightgbm4j/releases/tag/3.3.2-2 with your fix. Thanks for the contribution!

@popovstefan popovstefan deleted the memoryleak-prediction-types branch October 11, 2022 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants