Skip to content

Start · 01

Install

These docs track the development branch

Releases are frozen until 1.0, so pip install resdag currently serves 0.6.2 — which predates parts of the API documented here (the ESN facade, resdag.data streaming, and the newer readout solvers). To use the documented API today, install from git: pip install "git+https://github.com/El3ssar/ResDAG".

uv add resdag            # core
uv add "resdag[hpo]"     # + Optuna hyperparameter optimization
pip install resdag            # core
pip install "resdag[hpo]"     # + Optuna hyperparameter optimization

Requirements: Python ≥ 3.11 and PyTorch ≥ 2.10. Verify:

python -c "import resdag; print(resdag.__version__)"

On GPUs

Models, data, training, and forecasting all run on CUDA via .to("cuda"). Performance depends on scale:

  • Large reservoirs and batches. Reservoirs of ~2,000+ units or batches of multiple trajectories train and forecast up to an order of magnitude faster than on CPU. Run examples/11_gpu_benchmark.py to measure the crossover point on your hardware.
  • Small models. A single trajectory through a few hundred neurons is bound by kernel-launch overhead rather than arithmetic, so expect performance comparable to CPU.

Scale & deploy covers device placement patterns in detail.

Development install

git clone https://github.com/El3ssar/ResDAG && cd ResDAG
uv sync --extra dev
uv run pytest --no-cov -q

Next

02 · First forecast — train a forecaster on a chaotic attractor and run an autoregressive forecast.