patrick-kidger / patrick-kidger/diffrax
Save num_steps At ts
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.1k
- Forks
- 189
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 1
Description
Hi!
I am solving SDEs with adaptive stepsize (PID very efficient in my case), and for benchmarking purposes, I need to know the number of steps the solver take to reach specific conditions. However, I clearly can't afford to do a SaveAt(steps=True). And I can't find another way to accessing it properly.
Ideally, one could have a SaveState that includes a ns for number of steps (and why not a dts for stepsize) in addition to ts and ys. Thereby, one could save them at any specified ts, with a modified save_ts. What do you think?
And thanks for the great package!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with SaveState and save_ts in diffrax/_integrate.py, at the locations linked in the issue, and compare their behavior with SaveAt(steps=True). Define how a step count, and optionally step sizes, should be aligned with requested ts values without retaining every solver step; done means the proposed API is specified and covered by relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100