patrick-kidger / patrick-kidger/diffrax

Recommendation for real-time publishing of vector field

Open
#651 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Python
Stars
2.1k
Forks
189
Avg merge
3d 18h
Merged PRs (30d)
1

Description

As far as I understand, there are two main ways of inspecting the progress of a diffeqsolve:

  • progress_meter this is called every timestep with the ability to use jax conditionals to do every n timesteps instead but uses the solver_state rather than the vector field as an argument and therefore, unless a custom solver is defined that saves a copy of vector field in its internal state then we are limited with the information we can save.
  • saveat here diffrax stores the relevant data in memory and returns a solution variable containing all this data after the solve completes.
    What I would like to do is instead push (and potentially postprocess) data at each saveat timestep to a file or external server (such as mlflow) immediately (or potentially asynchronously) so that I can monitor how the simulation is progressing in real-time.

Do you have any recommendations on how to achieve this with the current API? Or a laundry list of required PR's to make something like this possible?

Thanks again! 🙏🏻

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the current diffeqsolve API around progress_meter, saveat, solver_state, and solution. Clarify whether the desired outcome is an API change, documentation, or a defined integration approach for streaming or asynchronous saveat data; the issue is done when those requirements and supported behavior are agreed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.