Fix memory leaks - #845
Merged
Merged
Conversation
mauch
approved these changes
May 21, 2025
mauch
left a comment
Contributor
There was a problem hiding this comment.
Just a minor comment about moving a cheap compute step inside the conditional block where it's needed. Not a vital change though.
| # Explode out the img_diff column. | ||
| extr_df = extr_df.explode("img_diff").reset_index() | ||
| total_to_extract = extr_df.shape[0] | ||
| total_to_extract = extr_df.shape[0].compute() |
Contributor
There was a problem hiding this comment.
You can potentially move this line back inside the if add_mode: condition below since total_to_extract is never used outside the condition. Its not vital though - since that compute() should be pretty cheap.
Contributor
Author
There was a problem hiding this comment.
Ah that is my mistake - there should be a logging statement directly after that which I forgot to copy across
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.
Part 3 of pulling apart #834 into manageable chunks