Skip to content
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

Call gc during _alt forecast download function used for forecast eval pipeline #662

Merged
merged 1 commit into from Sep 28, 2023

Conversation

nmdefries
Copy link
Contributor

The forecast-eval pipeline is running out of memory. Try adding in some gc()s to free memory.

Note: There are other places that could be useful to call gc(), e.g. during scoring, during truth data fetch, but they would also impact non-forecast eval use. Given that calling gc() is a crude fix for OOM issues and that it would be nice for forecast eval to move away from evalcast , I don't want to go deep on this change. This is just an easy intervention on a "private" function.

Copy link
Collaborator

@brookslogan brookslogan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(If this were being used inside a fork-parallel loop run from a parent process with a bunch of stuff already in memory, we might be afraid that gc() would actually increase memory usage due to copy-on-write on OS memory pages. Checked with @nmdefries that this wasn't the case.)

Copy link
Collaborator

@dshemetov dshemetov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you both for looking deeply into the consequences of this 👍

@dshemetov dshemetov merged commit fdbbb69 into main Sep 28, 2023
4 checks passed
@dshemetov dshemetov deleted the ndefries/sprinkle-gc-get-forecasts branch September 28, 2023 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants