-
Notifications
You must be signed in to change notification settings - Fork 32
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
Optionally use left/right indices buffer #83
Comments
I don't see how we could have multithreading at that level anymore. You suggest disabling thread-based parallelism for the |
Technically yes... I suppose we could use a single-threaded quick-sort like partitioning scheme.
I don't think so, or at least no with the current strategy. those arrays are used to that sample indices don't overwrite each other |
I haven't checked again but I don't think they have an option to disable parallel splitting. @maartenbreddels could you check if you have the same issue on LightGBM? Note that they are reusing allocated data like we plan to do in #81 so we need to take this into account |
There are some parallel in place partition algorithms: http://www.lsi.upc.edu/~lfrias/research/parpar/wea08.pdf But I think one of the buffers could be avoided, that would already save a bit. Would you be interested in a PR that does either a single threaded split, or uses 1 buffer, or both? I can't promise I can do it, but if the 1 buffer PR makes the code less readable, and that is a reason not to merge, I won't bother.
I cannot use LightGBM as it is now, the current implementation makes at least 2 memory copies, my vaex-ml hack avoids 1 copy, but still the memory usage is excessive. My plan is to see what is possible with pygbm (much easier to understand, and easier to edit), and possible see how they can be translated to lightgbm. |
I think a single-threaded version would be welcome and should not be too complicated to add. I'd be curious to know how to avoid using one of the two arrays though! |
I'll open an PR for that, any guidelines for how this should be configurable?
I thought of using the sample_indices for the 'left' indices, and a scratchpad/buffer for the 'right' indices. Basically, sample_indices takes over the role of left_indices_buffer. That should work right? |
If you can make sure that no entry in
Let go simple for now, you can try passing a parameter e.g. |
continuing from #79
In splitting.py, the left/right_indices_buffer will use up 8GB for 10^9 rows. If that causes swapping, the performance benefit of multithreading (which requires these buffers) are most probably not worth it. Would it be an option to disable this?
Is there also a method that could without the buffer (I'm still wrapping my head around the algo, maybe you already thought about it).
The text was updated successfully, but these errors were encountered: