-
Notifications
You must be signed in to change notification settings - Fork 4
Fix memory leaks #845
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
Fix memory leaks #845
Conversation
mauch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah that is my mistake - there should be a logging statement directly after that which I forgot to copy across
Part 3 of pulling apart #834 into manageable chunks