OpenSourceEconomics / skillmodels

MIT License
12 stars 6 forks source link

Reduce the peak memory usage of skillmodels #76

Closed hmgaudecker closed 2 months ago

hmgaudecker commented 2 months ago

It looks like memory consumption of loglike_and_grad is rising about linearly in the number of observations (and probably also parameters) at present, making it the limiting factor for real-world applications. This PR aims at reducing peak memory usage.

Table to keep track of mem usage of pixi run mem-on-clean-repo will be in MEMTRACKER.md. Delete upon merging.

review-notebook-app[bot] commented 2 months ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 92.59259% with 8 lines in your changes missing coverage. Please review.

Project coverage is 91.43%. Comparing base (bbd4ce4) to head (f04041d). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/skillmodels/maximization_inputs.py 90.12% 8 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #76 +/- ## ========================================== + Coverage 91.42% 91.43% +0.01% ========================================== Files 39 40 +1 Lines 3066 3070 +4 ========================================== + Hits 2803 2807 +4 Misses 263 263 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

hmgaudecker commented 2 months ago

For the record: The 8 lines of missed coverage are _get_jnp_params_vec, which does not have tests. Does not seem to be an issue.