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

Dealing with Dask memory issues in the run script, #2 #87

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

jdebacker
Copy link
Member

Following up on PR #85, I noticed that despite this changes I was again seeing memory warnings:

2024-02-08 09:49:00,004 - distributed.utils_perf - WARNING - full garbage collections took 14% CPU time recently (threshold: 10%)

And no, or slow, progress in when running run_og_usa.py when running with OG-Core 0.11.0 (which increases the size of several objects in the Specifications class object that contains the model parameters.

After some profiling, I noticed that the "bytes stored" in the dask processes became quite large with the tax function estimation, but then remained quite high after that task completed:

Dask_status_ogusa_taxfunc_big_memory

This PR helps deal with that issue by closing and deleting the client after tax function estimation and then instantiating a new client before the model solution algorithm is called.

This has seemed to avoid these issues.

@rickecon
Copy link
Member

rickecon commented Feb 8, 2024

@jdebacker. This looks great. Thanks for doing this. Will merge as soon as tests pass.

@codecov-commenter
Copy link

codecov-commenter commented Feb 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7a6757b) 70.82% compared to head (b726392) 70.82%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #87   +/-   ##
=======================================
  Coverage   70.82%   70.82%           
=======================================
  Files          22       22           
  Lines        1340     1340           
=======================================
  Hits          949      949           
  Misses        391      391           
Flag Coverage Δ
unittests 70.82% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rickecon
Copy link
Member

Thanks @jdebacker. Merging.

@rickecon rickecon merged commit 2106b51 into PSLmodels:master Feb 12, 2024
6 checks passed
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.

3 participants