OpenSourceEconomics / skillmodels

MIT License
11 stars 5 forks source link

Reduce the peak memory usage of skillmodels #76

Closed hmgaudecker closed 1 week ago

hmgaudecker commented 1 week 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 1 week ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

codecov[bot] commented 1 week 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 1 week 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.