Skip to content

Refactor likelihood module#77

Merged
hmgaudecker merged 2 commits intoreduce-mem-usagefrom
refactor-likelihood
Sep 11, 2024
Merged

Refactor likelihood module#77
hmgaudecker merged 2 commits intoreduce-mem-usagefrom
refactor-likelihood

Conversation

@hmgaudecker
Copy link
Copy Markdown
Member

  • In maximization_inputs.py, import from two modules with likelihood functions.
  • Remove the _jax-suffixes from likelihood functions, seems like a leftover from transition days.

@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@hmgaudecker hmgaudecker requested a review from janosg September 10, 2024 11:09
Copy link
Copy Markdown
Member

@janosg janosg left a comment

Choose a reason for hiding this comment

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

Looks much better now!

@hmgaudecker hmgaudecker merged commit df4f68a into reduce-mem-usage Sep 11, 2024
@hmgaudecker hmgaudecker deleted the refactor-likelihood branch September 11, 2024 12:38
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 11, 2024

Codecov Report

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

Please upload report for BASE (reduce-mem-usage@4e64952). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/skillmodels/maximization_inputs.py 90.12% 8 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##             reduce-mem-usage      #77   +/-   ##
===================================================
  Coverage                    ?   91.43%           
===================================================
  Files                       ?       40           
  Lines                       ?     3070           
  Branches                    ?        0           
===================================================
  Hits                        ?     2807           
  Misses                      ?      263           
  Partials                    ?        0           

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

hmgaudecker added a commit that referenced this pull request Sep 11, 2024
…kelihood functions modules (#77)

* Add a version of mem consumption test that fails if there are increases in the repo.
* Decorate kalman_update, _calculate_sigma_points,  with jax.checkpoint, can use `prevent_cse=False` due to being inside lax.scan, as per https://jax.readthedocs.io/en/latest/_autosummary/jax.checkpoint.html\#jax.checkpoint.
* Use checkpoint() on kalman_predict as well, requires changing `transition_func` to be its first argument and using `jnp.array` in tests.
* Provision for testing on GPUs, timing information is not useful yet.
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.

2 participants