Your first labflow experiment¶
Scaffold¶
This creates experiments/ou_stationary.py with a minimal JAX scaffold.
Inspect¶
# experiments/ou_stationary.py
from dataclasses import dataclass
from labflow import experiment
@dataclass
class OuStationaryConfig:
tau: float = 10.0
sigma: float = 1.0
T: float = 1000.0
dt: float = 0.01
seed: int = 42
@experiment(config=OuStationaryConfig, tags=["jax", "simulation"])
def ou_stationary(cfg):
"""Verify OU stationary ~ N(0, σ²/2λ)."""
import jax
import jax.numpy as jnp
key = jax.random.PRNGKey(cfg.seed)
# ... your simulation
return {"theoretical_var": cfg.sigma**2 / (2 / cfg.tau)}
Run¶
Output:
Run complete. Output: outputs/ou_stationary/2026-04-22-14-30-00-abc123/
Returned: {'theoretical_var': 50.0}