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

Streamline run_inference_algorithm and the streaming average #713

Closed
wants to merge 8 commits into from

Conversation

reubenharry
Copy link
Contributor

The run_inference_algorithm code currently has a mode to incrementally compute a value (e.g. an incremental expectation), which saves memory. This PR presents a cleaner (and in my opinion, more functional) version of the code. The core idea is that to incrementally compute an expectation, the right thing to do is to modify the kernel, and then pass that kernel to run_inference_algorithm, rather than modify run_inference_algorithm. As part of this change, we also let transform be a general function on (state, info), which allows information from the info to be used (which we have needed).

  • There is a high-level description of the changes;
  • The branch is rebased on the latest main commit;
  • pre-commit is installed and configured on your machine, and you ran it before opening the PR;
  • There are tests covering the changes;
  • The doc is up-to-date;

@reubenharry reubenharry closed this Aug 6, 2024
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