Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@DRMacIver
Copy link
Contributor

@DRMacIver DRMacIver commented May 14, 2025

This adds new APIs for implementing potentials in a stateful way. That is, rather than treating the potential as always starting from scratch, it can maintain state between invocations.

Currently this just implements the old potential API in terms of the new one, with the intention that later work will rebuild the SMC algorithm on top of the stateful API, which will allow for much more efficient use.

@DRMacIver DRMacIver marked this pull request as draft May 14, 2025 15:27
@codecov
Copy link

codecov bot commented Jun 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@DRMacIver DRMacIver force-pushed the DRMacIver/stateful-potentials branch from 7a79974 to 223692c Compare June 6, 2025 12:37
DRMacIver added 2 commits June 6, 2025 13:57
This adds an implementation of a stateful API for potentials,
where rather than a potential being represented as a pure function,
it can maintain state. At present this is solely designed to
expose the old API through a caching layer. For potentials that
are expensive to compute from scratch this may be a performance
gain to use, but otherwise has relatively few advantages over the
old way of defining things, although in some cases it may be more
convenient to implement something using the streaming API.
This reimplements the JSON potential on top of the stateful API,
allowing it to incrementally read the incoming bytes rather than
restarting from scratch each time.
@DRMacIver DRMacIver force-pushed the DRMacIver/stateful-potentials branch from 223692c to cf6a286 Compare June 6, 2025 12:57
@DRMacIver DRMacIver marked this pull request as ready for review June 6, 2025 14:08
@DRMacIver DRMacIver merged commit f91cb1a into main Jun 6, 2025
3 checks passed
@DRMacIver DRMacIver deleted the DRMacIver/stateful-potentials branch June 6, 2025 14:09
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