Summary
Bring flepimop2-op_engine's options surface up to parity with flepimop2-op_system's, and add a jax optional extra, so op_engine's new diffrax/lineax-backed CoreSolver methods (#67) and sparse/dense implicit-solve dispatch (#69) can actually be wired up through the flepimop2 provider the same way COVID19_USA's diffrax_engine.py is wired up today.
Current state (confirmed by direct comparison)
flepimop2-op_system's OpSystemSystem (flepimop2-op_system/src/flepimop2/system/op_system/__init__.py) compiles the spec once and publishes a rich self.options surface — 23 keys, including pytree_stepper_fn, block_pytree_stepper_fn, history_stepper_fn, body_eval_fn, block_history_stepper_fn, block_body_eval_fn, factorize_axes, block_axes, template_shapes — read via stepper.option(name, default). This is exactly the contract COVID19_USA's diffrax_engine.py depends on.
flepimop2-op_engine's OpEngineFlepimop2Engine (flepimop2-op_engine/src/flepimop2/engine/op_engine/__init__.py) is an EngineABC (consumer role, not a SystemABC) and today only ever reads 4 option keys off whatever system it's given — operators, jacobian, operator_axis, mixing_kernels — and only ever calls the plain bound stepper() (flat/scalar eval_fn path). It never touches pytree_stepper_fn, history_stepper_fn, body_eval_fn, or any block-axis variant. If op_engine were pointed at an op_system-compiled spec today, it would silently use only the scalar path and none of the vectorized/history machinery.
Structural drift beyond scope, noted for awareness (not necessarily to fix in this issue): the two adapters declare their module identity differently (OpSystemSystem's module="..." class-declaration kwarg vs OpEngineFlepimop2Engine's module: Literal[...] Pydantic field), and their pyproject.tomls have diverged in dependency style (op-system>=0.2.0 registry pin vs op-engine @ git+...@main direct git pin) and version (0.2.0 vs 0.1.0).
Scope
Acceptance criteria
flepimop2-op_engine can drive a diffrax-backed CoreSolver solve using pytree_stepper_fn/history_stepper_fn/body_eval_fn/block-axis options from an op_system-compiled spec, exercised by a test analogous to COVID19_USA's own coverage.
- Existing SciPy-
CoreSolver-backed behavior is unchanged (this is additive, not a replacement of the existing 4-key read path).
just quality and just test pass for both provider packages.
Relationship to other issues
Depends on #67 (needs the diffrax-backed methods to exist before the provider can wire them up) and #69 (needs the sparse/dense implicit-solve dispatch for full method coverage) — can be scoped/designed in parallel but the "use them" acceptance criterion is blocked on both landing. See #26 for the overall tracking issue.
Summary
Bring
flepimop2-op_engine's options surface up to parity withflepimop2-op_system's, and add ajaxoptional extra, soop_engine's new diffrax/lineax-backedCoreSolvermethods (#67) and sparse/dense implicit-solve dispatch (#69) can actually be wired up through the flepimop2 provider the same way COVID19_USA'sdiffrax_engine.pyis wired up today.Current state (confirmed by direct comparison)
flepimop2-op_system'sOpSystemSystem(flepimop2-op_system/src/flepimop2/system/op_system/__init__.py) compiles the spec once and publishes a richself.optionssurface — 23 keys, includingpytree_stepper_fn,block_pytree_stepper_fn,history_stepper_fn,body_eval_fn,block_history_stepper_fn,block_body_eval_fn,factorize_axes,block_axes,template_shapes— read viastepper.option(name, default). This is exactly the contract COVID19_USA'sdiffrax_engine.pydepends on.flepimop2-op_engine'sOpEngineFlepimop2Engine(flepimop2-op_engine/src/flepimop2/engine/op_engine/__init__.py) is anEngineABC(consumer role, not aSystemABC) and today only ever reads 4 option keys off whatever system it's given —operators,jacobian,operator_axis,mixing_kernels— and only ever calls the plain boundstepper()(flat/scalareval_fnpath). It never touchespytree_stepper_fn,history_stepper_fn,body_eval_fn, or any block-axis variant. Ifop_enginewere pointed at anop_system-compiled spec today, it would silently use only the scalar path and none of the vectorized/history machinery.Structural drift beyond scope, noted for awareness (not necessarily to fix in this issue): the two adapters declare their module identity differently (
OpSystemSystem'smodule="..."class-declaration kwarg vsOpEngineFlepimop2Engine'smodule: Literal[...]Pydantic field), and theirpyproject.tomls have diverged in dependency style (op-system>=0.2.0registry pin vsop-engine @ git+...@maindirect git pin) and version (0.2.0vs0.1.0).Scope
OpEngineFlepimop2Engineto read and use theop_system-style vectorized/history option keys when present and when the configuredCoreSolvermethod supports them (this issue should land after or alongside Add diffrax/lineax-backed adaptive methods to op_engine's CoreSolver, ported from COVID19_USA's diffrax_engine.py #67/Multi-backend implicit solve: Array-API dense fallback + SciPy/CuPy sparse registry #69, since the SciPy explicit/dense-implicitCoreSolverpath doesn't need most of these — the point is enabling the new diffrax-backed methods to consume them the waydiffrax_engine.pydoes).[project.optional-dependencies] jax = [...]toflepimop2-op_engine/pyproject.toml, mirroringflepimop2-op_system'sjax/jax-inferenceextras, onceop_engineitself has ajaxextra (see Add diffrax/lineax-backed adaptive methods to op_engine's CoreSolver, ported from COVID19_USA's diffrax_engine.py #67).op-enginedependency pin style — if/whenop_enginestarts publishing releases the wayop_systemnow does (seeop_system's recent 0.2.0 release), switch from the git-ref pin to a registry version pin for consistency.Acceptance criteria
flepimop2-op_enginecan drive a diffrax-backedCoreSolversolve usingpytree_stepper_fn/history_stepper_fn/body_eval_fn/block-axis options from anop_system-compiled spec, exercised by a test analogous to COVID19_USA's own coverage.CoreSolver-backed behavior is unchanged (this is additive, not a replacement of the existing 4-key read path).just qualityandjust testpass for both provider packages.Relationship to other issues
Depends on #67 (needs the diffrax-backed methods to exist before the provider can wire them up) and #69 (needs the sparse/dense implicit-solve dispatch for full method coverage) — can be scoped/designed in parallel but the "use them" acceptance criterion is blocked on both landing. See #26 for the overall tracking issue.