[hail] Fix memory leak in BM and make cache size configurable#9501
Merged
danking merged 8 commits intohail-is:mainfrom Sep 25, 2020
Merged
[hail] Fix memory leak in BM and make cache size configurable#9501danking merged 8 commits intohail-is:mainfrom
danking merged 8 commits intohail-is:mainfrom
Conversation
CHANGELOG: Remove memory leak in `BlockMatrix.to_matrix_table_row_major` and `BlockMatrix.to_table_row_major`. Also, make the cache size used in both methods configurable. The `ref` variable was holding entire blocks in memory for no reason. It was a vestiage of debugging. Moreover, the configurable cache permits users to fine tune memory usage.
johnc1231
previously requested changes
Sep 24, 2020
Contributor
johnc1231
left a comment
There was a problem hiding this comment.
Docs fixes, otherwise good.
| matrix in memory. This value must be at least large enough to hold | ||
| one row of th matrix in memory. If this value is exactly the size of | ||
| one row, then a partition makes a network request for every row of | ||
| every block. Larger values reduce the number of network requests. If |
Contributor
There was a problem hiding this comment.
I'm a little confused by the wording. Is:
If this value is exactly the size of
one row, then a partition makes a network request for every row of
every block.
saying the same thing as:
If memory permits, setting this value to the size of one row permits
one network request per block per partition.
If so, why are we saying it twice?
Contributor
Author
There was a problem hiding this comment.
I fixed the verbiage. Latter should have said one partition.
| maximum_cache_memory_in_bytes : int or None | ||
| The amount of memory to reserve, per partition, to cache rows of the | ||
| matrix in memory. This value must be at least large enough to hold | ||
| one row of th matrix in memory. If this value is exactly the size of |
| ---------- | ||
| n_partitions : int or None | ||
| Number of partitions of the matrix table. | ||
| maximum_cache_memory_in_bytes : int or None |
Contributor
There was a problem hiding this comment.
Same comments as above, as this is the same paragraph.
Contributor
|
KING tests are failing |
johnc1231
approved these changes
Sep 25, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CHANGELOG: Remove memory leak in
BlockMatrix.to_matrix_table_row_majorandBlockMatrix.to_table_row_major. Also, make the cache size used in both methods configurable.The
refvariable was holding entire blocks in memory for no reason. It was avestiage of debugging. Moreover, the configurable cache permits users to fine tune
memory usage.