-
Notifications
You must be signed in to change notification settings - Fork 50
Fixing memory problems for dataProcess using multicore #176
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
base: RELEASE_3_21
Are you sure you want to change the base?
Fixing memory problems for dataProcess using multicore #176
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Associated with issue #177 |
|
@smartinez-yatiribio thanks for putting up this PR, we've also noticed these memory issues too. I noticed a lot of the changes here are simply spacing / tabbing differences. I'm going to pull your changes locally and re-push only the files that are involved in parallel processing and then review the changes after that. I also will look to modify the PR to point to the devel branch (since the release branch is for bug fixes and I would consider this more of a feature request / feature upgrade) |
|
Ok, sounds good. |
|
I wanted to update this issue saying that the last comit I just did, the better and simpler approach, using just data.table parallel processing, seems to work better. Please, I had problems with linear summarization, but maybe is because I wasn't using the latest version. I am confused about that. |
|
I did some reading and I'm a little skeptical of the data.table approach based on this issue. Data.table's parallelization seems to only work for simpler functions, but not custom functions (unless if it uses simple subfunctions like Could you add information on the benchmarks you performed comparing the processing time and memory usage for:
Additional note: we have plans to migrate our parallel processing to use the matter package, which addresses the memory overhead issue alongside other problems. |
|
You know what? you are right. And it only worked for me with a small dataset. I was really seeing all CPUs working at the same time. But when I tried with my real dataset that has 30M rows...it doesnt work. I am still trying to figure this out, because I cannot process that amount of data, and it is not as many as we will have in the future with an Astral. |
Motivation and Context
dataProcess() function, when using numOfCores > 1, was copying the input data to all the worker processes. That becomes a real problem when working with a very large input dataset.
In addition, the parallel processing loop was done over individual proteins, instead of over chunks of data.
The proposed change, using packages foreach and doParallel, splits the data into chunks and only sends one chunk to each of the workers.
Changes
Please provide a detailed bullet point list of your changes.
Testing
Please describe any unit tests you added or modified to verify your changes.
Checklist Before Requesting a Review