OpenReservoirComputing 0.3.3__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/.gitignore +2 -4
- {openreservoircomputing-0.3.3/src/OpenReservoirComputing.egg-info → openreservoircomputing-0.4.0}/PKG-INFO +32 -55
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/README.md +20 -9
- openreservoircomputing-0.4.0/pyproject.toml +132 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/src/orc/control/base.py +1 -3
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/src/orc/forecaster/train.py +1 -1
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/tests/forecaster/test_forecast_models.py +1 -1
- openreservoircomputing-0.3.3/.github/CODEOWNERS +0 -1
- openreservoircomputing-0.3.3/.github/workflows/docs.yml +0 -26
- openreservoircomputing-0.3.3/.github/workflows/draft-pdf.yml +0 -28
- openreservoircomputing-0.3.3/.github/workflows/publish.yml +0 -46
- openreservoircomputing-0.3.3/.github/workflows/tests.yml +0 -63
- openreservoircomputing-0.3.3/JOSS/CITATION.cff +0 -39
- openreservoircomputing-0.3.3/JOSS/CODE_OF_CONDUCT.md +0 -85
- openreservoircomputing-0.3.3/JOSS/joss-paper.pdf +0 -0
- openreservoircomputing-0.3.3/JOSS/paper.bib +0 -149
- openreservoircomputing-0.3.3/JOSS/paper.md +0 -117
- openreservoircomputing-0.3.3/PKG-INFO +0 -165
- openreservoircomputing-0.3.3/docs/api/classifier.md +0 -31
- openreservoircomputing-0.3.3/docs/api/control.md +0 -31
- openreservoircomputing-0.3.3/docs/api/data.md +0 -39
- openreservoircomputing-0.3.3/docs/api/drivers.md +0 -19
- openreservoircomputing-0.3.3/docs/api/embeddings.md +0 -19
- openreservoircomputing-0.3.3/docs/api/forecaster.md +0 -59
- openreservoircomputing-0.3.3/docs/api/readouts.md +0 -35
- openreservoircomputing-0.3.3/docs/api/utils.md +0 -36
- openreservoircomputing-0.3.3/docs/contributing.md +0 -68
- openreservoircomputing-0.3.3/docs/getting-started/installation.md +0 -83
- openreservoircomputing-0.3.3/docs/getting-started/quickstart.md +0 -162
- openreservoircomputing-0.3.3/docs/imgs/ORC_logo_cropped.png +0 -0
- openreservoircomputing-0.3.3/docs/index.md +0 -137
- openreservoircomputing-0.3.3/docs/javascripts/mathjax.js +0 -26
- openreservoircomputing-0.3.3/docs/stylesheets/extra.css +0 -78
- openreservoircomputing-0.3.3/docs/user-guide/data.md +0 -93
- openreservoircomputing-0.3.3/docs/user-guide/drivers.md +0 -186
- openreservoircomputing-0.3.3/docs/user-guide/embeddings.md +0 -151
- openreservoircomputing-0.3.3/docs/user-guide/models.md +0 -454
- openreservoircomputing-0.3.3/docs/user-guide/overview.md +0 -108
- openreservoircomputing-0.3.3/docs/user-guide/readouts.md +0 -185
- openreservoircomputing-0.3.3/imgs/ORC_logo_cropped.png +0 -0
- openreservoircomputing-0.3.3/imgs/architecture_paper.pdf +0 -0
- openreservoircomputing-0.3.3/imgs/benchmark_results_combined.png +0 -0
- openreservoircomputing-0.3.3/imgs/readme_example_forecast.png +0 -0
- openreservoircomputing-0.3.3/mkdocs.yml +0 -129
- openreservoircomputing-0.3.3/pyproject.toml +0 -116
- openreservoircomputing-0.3.3/setup.cfg +0 -4
- openreservoircomputing-0.3.3/src/OpenReservoirComputing.egg-info/SOURCES.txt +0 -89
- openreservoircomputing-0.3.3/src/OpenReservoirComputing.egg-info/dependency_links.txt +0 -1
- openreservoircomputing-0.3.3/src/OpenReservoirComputing.egg-info/requires.txt +0 -47
- openreservoircomputing-0.3.3/src/OpenReservoirComputing.egg-info/scm_file_list.json +0 -86
- openreservoircomputing-0.3.3/src/OpenReservoirComputing.egg-info/scm_version.json +0 -8
- openreservoircomputing-0.3.3/src/OpenReservoirComputing.egg-info/top_level.txt +0 -1
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/LICENSE +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/examples/benchmark_combined.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/examples/classification.ipynb +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/examples/continuous_rc.ipynb +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/examples/control.ipynb +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/examples/data_library.ipynb +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/examples/jit_compatibility.ipynb +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/examples/ks.ipynb +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/examples/lorenz.ipynb +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/examples/rc_background.ipynb +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/src/orc/__init__.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/src/orc/classifier/__init__.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/src/orc/classifier/base.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/src/orc/classifier/models.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/src/orc/classifier/train.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/src/orc/control/__init__.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/src/orc/control/models.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/src/orc/control/train.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/src/orc/data/__init__.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/src/orc/data/integrators.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/src/orc/drivers.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/src/orc/embeddings.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/src/orc/forecaster/__init__.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/src/orc/forecaster/base.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/src/orc/forecaster/models.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/src/orc/readouts.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/src/orc/utils/__init__.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/src/orc/utils/numerics.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/src/orc/utils/regressions.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/src/orc/utils/visualization.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/tests/classifier/test_classifier_models.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/tests/control/test_control_models.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/tests/data/test_integrators.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/tests/test_drivers.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/tests/test_embeddings.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/tests/test_readouts.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/tests/utils/test_numerics.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/tests/utils/test_regressions.py +0 -0
- {openreservoircomputing-0.3.3 → openreservoircomputing-0.4.0}/tests/utils/test_visualization.py +0 -0
|
@@ -97,10 +97,8 @@ ipython_config.py
|
|
|
97
97
|
#Pipfile.lock
|
|
98
98
|
|
|
99
99
|
# UV
|
|
100
|
-
#
|
|
101
|
-
#
|
|
102
|
-
# commonly ignored for libraries.
|
|
103
|
-
#uv.lock
|
|
100
|
+
# uv.lock IS COMMITTED to this repository on purpose: it gives contributors reproducible
|
|
101
|
+
# environments and CI runs `uv sync --locked` against it. Do not add it here.
|
|
104
102
|
|
|
105
103
|
# poetry
|
|
106
104
|
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
@@ -1,63 +1,29 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: OpenReservoirComputing
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: GPU accelerated implementations of common RC architectures
|
|
5
|
+
Project-URL: Repository, https://github.com/Jan-Williams/OpenReservoirComputing
|
|
5
6
|
Author-email: "Jan P. Williams" <jmpw1@uw.edu>, Dima Tretiak <dtretiak@uw.edu>
|
|
6
7
|
Maintainer-email: "Jan P. Williams" <jmpw1@uw.edu>
|
|
7
|
-
|
|
8
|
+
License-File: LICENSE
|
|
8
9
|
Keywords: reservoir computing
|
|
9
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
10
10
|
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
12
|
Classifier: Programming Language :: Python :: 3.10
|
|
12
13
|
Classifier: Programming Language :: Python :: 3.11
|
|
13
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
15
|
Classifier: Programming Language :: Python :: 3.13
|
|
15
16
|
Requires-Python: <3.14,>=3.10
|
|
16
|
-
|
|
17
|
-
License-File: LICENSE
|
|
18
|
-
Requires-Dist: jax
|
|
17
|
+
Requires-Dist: diffrax
|
|
19
18
|
Requires-Dist: equinox
|
|
19
|
+
Requires-Dist: jax
|
|
20
20
|
Requires-Dist: matplotlib
|
|
21
|
-
Requires-Dist: setuptools_scm>=8.1
|
|
22
|
-
Requires-Dist: diffrax
|
|
23
|
-
Provides-Extra: all
|
|
24
|
-
Requires-Dist: jax[cuda12]; extra == "all"
|
|
25
|
-
Requires-Dist: ruff; extra == "all"
|
|
26
|
-
Requires-Dist: ty; extra == "all"
|
|
27
|
-
Requires-Dist: pytest; extra == "all"
|
|
28
|
-
Requires-Dist: coverage; extra == "all"
|
|
29
|
-
Requires-Dist: pytest-cov; extra == "all"
|
|
30
|
-
Requires-Dist: notebook; extra == "all"
|
|
31
|
-
Requires-Dist: ipykernel; extra == "all"
|
|
32
|
-
Requires-Dist: pytest-env; extra == "all"
|
|
33
|
-
Requires-Dist: mkdocs; extra == "all"
|
|
34
|
-
Requires-Dist: mkdocs-material; extra == "all"
|
|
35
|
-
Requires-Dist: mkdocs-autorefs; extra == "all"
|
|
36
|
-
Requires-Dist: mkdocstrings[python]; extra == "all"
|
|
37
|
-
Requires-Dist: mkdocs-jupyter; extra == "all"
|
|
38
|
-
Provides-Extra: dev
|
|
39
|
-
Requires-Dist: ruff; extra == "dev"
|
|
40
|
-
Requires-Dist: ty; extra == "dev"
|
|
41
|
-
Requires-Dist: pytest; extra == "dev"
|
|
42
|
-
Requires-Dist: coverage; extra == "dev"
|
|
43
|
-
Requires-Dist: pytest-cov; extra == "dev"
|
|
44
|
-
Requires-Dist: pytest-env; extra == "dev"
|
|
45
|
-
Requires-Dist: mkdocs; extra == "dev"
|
|
46
|
-
Requires-Dist: mkdocs-material; extra == "dev"
|
|
47
|
-
Requires-Dist: mkdocs-autorefs; extra == "dev"
|
|
48
|
-
Requires-Dist: mkdocstrings[python]; extra == "dev"
|
|
49
|
-
Provides-Extra: notebooks
|
|
50
|
-
Requires-Dist: notebook; extra == "notebooks"
|
|
51
|
-
Requires-Dist: ipykernel; extra == "notebooks"
|
|
52
21
|
Provides-Extra: gpu
|
|
53
|
-
Requires-Dist: jax[cuda12]; extra ==
|
|
54
|
-
Provides-Extra:
|
|
55
|
-
Requires-Dist:
|
|
56
|
-
Requires-Dist:
|
|
57
|
-
|
|
58
|
-
Requires-Dist: mkdocstrings[python]; extra == "docs"
|
|
59
|
-
Requires-Dist: mkdocs-jupyter; extra == "docs"
|
|
60
|
-
Dynamic: license-file
|
|
22
|
+
Requires-Dist: jax[cuda12]; (sys_platform == 'linux') and extra == 'gpu'
|
|
23
|
+
Provides-Extra: notebooks
|
|
24
|
+
Requires-Dist: ipykernel; extra == 'notebooks'
|
|
25
|
+
Requires-Dist: notebook; extra == 'notebooks'
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
61
27
|
|
|
62
28
|
<div align="center">
|
|
63
29
|
<img src="imgs/ORC_logo_cropped.png" alt="ORC Logo" width="200px" />
|
|
@@ -79,6 +45,11 @@ The easiest way to get started with ORC is to install from PyPI:
|
|
|
79
45
|
pip install OpenReservoirComputing
|
|
80
46
|
```
|
|
81
47
|
|
|
48
|
+
or, if you use [uv](https://docs.astral.sh/uv/):
|
|
49
|
+
```bash
|
|
50
|
+
uv add OpenReservoirComputing
|
|
51
|
+
```
|
|
52
|
+
|
|
82
53
|
If you're interested in the latest, unreleased version or in contributing, you can install from source. Please see the Contribution guidelines below for more details.
|
|
83
54
|
|
|
84
55
|
## Quick start example
|
|
@@ -131,35 +102,41 @@ plt.show()
|
|
|
131
102
|
ORC models are built on top of [Equinox](https://docs.kidger.site/equinox/), and as a result we strongly recommend the use of Equinox transforms `eqx.filter_{jit, vmap, grad}` over `jax.{jit, vmap, grad}`. For more details, please check out the [JAX JIT Compatibility](https://Jan-Williams.github.io/OpenReservoirComputing/examples/jit_compatibility/) example notebook.
|
|
132
103
|
|
|
133
104
|
## Contribution guidelines
|
|
134
|
-
First off, thanks for helping out! We appreciate your willingness to contribute!
|
|
105
|
+
First off, thanks for helping out! We appreciate your willingness to contribute! ORC uses [uv](https://docs.astral.sh/uv/) to manage development environments, which keeps setup to a single command.
|
|
106
|
+
|
|
107
|
+
First, [install uv](https://docs.astral.sh/uv/getting-started/installation/) if you don't have it. Then clone the repo and sync:
|
|
135
108
|
|
|
136
109
|
```bash
|
|
137
110
|
git clone https://github.com/Jan-Williams/OpenReservoirComputing.git
|
|
111
|
+
cd OpenReservoirComputing
|
|
112
|
+
uv sync
|
|
138
113
|
```
|
|
139
114
|
|
|
140
|
-
|
|
115
|
+
`uv sync` creates a `.venv`, installs ORC in editable mode, and installs the development dependencies at the exact versions recorded in `uv.lock`. There is no need to activate the environment — just prefix commands with `uv run`.
|
|
141
116
|
|
|
142
|
-
|
|
117
|
+
For NVIDIA GPU support (Linux only — see the [installation docs](https://Jan-Williams.github.io/OpenReservoirComputing/getting-started/installation/) for why):
|
|
143
118
|
```bash
|
|
144
|
-
|
|
119
|
+
uv sync --extra gpu
|
|
145
120
|
```
|
|
146
121
|
|
|
147
|
-
|
|
122
|
+
To also install the documentation toolchain:
|
|
148
123
|
```bash
|
|
149
|
-
|
|
124
|
+
uv sync --all-groups
|
|
150
125
|
```
|
|
151
126
|
|
|
152
127
|
The main branch is protected from direct changes. If you would like to make a change please create a new branch and work on your new feature. After you are satisfied with your changes, please run our testing suite to ensure all is working well. We also expect new tests to be written for all changes if additions are made. The tests can be simply run from the root directory of the repository with
|
|
153
128
|
```bash
|
|
154
|
-
pytest
|
|
129
|
+
uv run pytest
|
|
155
130
|
```
|
|
156
131
|
Followed by a formatting check
|
|
157
132
|
```bash
|
|
158
|
-
ruff check
|
|
133
|
+
uv run ruff check
|
|
159
134
|
```
|
|
160
135
|
and a type annotation check
|
|
161
136
|
```bash
|
|
162
|
-
ty check
|
|
137
|
+
uv run ty check src/
|
|
163
138
|
```
|
|
164
139
|
|
|
165
|
-
|
|
140
|
+
If you add or change a dependency, use `uv add <package>` (or `uv add --group dev <package>` for a development tool) and **commit the updated `uv.lock`** — CI runs `uv sync --locked` and will fail if the lockfile is out of date.
|
|
141
|
+
|
|
142
|
+
Finally, submit your changes as a pull request! When you submit the PR, please request reviews from both @dtretiak and @Jan-Williams, we will try to get back to you as soon as possible. When you submit the PR, the above tests will automatically be run on your proposed changes through Github Actions, so it is best to get everything tested first before submitting!
|
|
@@ -18,6 +18,11 @@ The easiest way to get started with ORC is to install from PyPI:
|
|
|
18
18
|
pip install OpenReservoirComputing
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
+
or, if you use [uv](https://docs.astral.sh/uv/):
|
|
22
|
+
```bash
|
|
23
|
+
uv add OpenReservoirComputing
|
|
24
|
+
```
|
|
25
|
+
|
|
21
26
|
If you're interested in the latest, unreleased version or in contributing, you can install from source. Please see the Contribution guidelines below for more details.
|
|
22
27
|
|
|
23
28
|
## Quick start example
|
|
@@ -70,35 +75,41 @@ plt.show()
|
|
|
70
75
|
ORC models are built on top of [Equinox](https://docs.kidger.site/equinox/), and as a result we strongly recommend the use of Equinox transforms `eqx.filter_{jit, vmap, grad}` over `jax.{jit, vmap, grad}`. For more details, please check out the [JAX JIT Compatibility](https://Jan-Williams.github.io/OpenReservoirComputing/examples/jit_compatibility/) example notebook.
|
|
71
76
|
|
|
72
77
|
## Contribution guidelines
|
|
73
|
-
First off, thanks for helping out! We appreciate your willingness to contribute!
|
|
78
|
+
First off, thanks for helping out! We appreciate your willingness to contribute! ORC uses [uv](https://docs.astral.sh/uv/) to manage development environments, which keeps setup to a single command.
|
|
79
|
+
|
|
80
|
+
First, [install uv](https://docs.astral.sh/uv/getting-started/installation/) if you don't have it. Then clone the repo and sync:
|
|
74
81
|
|
|
75
82
|
```bash
|
|
76
83
|
git clone https://github.com/Jan-Williams/OpenReservoirComputing.git
|
|
84
|
+
cd OpenReservoirComputing
|
|
85
|
+
uv sync
|
|
77
86
|
```
|
|
78
87
|
|
|
79
|
-
|
|
88
|
+
`uv sync` creates a `.venv`, installs ORC in editable mode, and installs the development dependencies at the exact versions recorded in `uv.lock`. There is no need to activate the environment — just prefix commands with `uv run`.
|
|
80
89
|
|
|
81
|
-
|
|
90
|
+
For NVIDIA GPU support (Linux only — see the [installation docs](https://Jan-Williams.github.io/OpenReservoirComputing/getting-started/installation/) for why):
|
|
82
91
|
```bash
|
|
83
|
-
|
|
92
|
+
uv sync --extra gpu
|
|
84
93
|
```
|
|
85
94
|
|
|
86
|
-
|
|
95
|
+
To also install the documentation toolchain:
|
|
87
96
|
```bash
|
|
88
|
-
|
|
97
|
+
uv sync --all-groups
|
|
89
98
|
```
|
|
90
99
|
|
|
91
100
|
The main branch is protected from direct changes. If you would like to make a change please create a new branch and work on your new feature. After you are satisfied with your changes, please run our testing suite to ensure all is working well. We also expect new tests to be written for all changes if additions are made. The tests can be simply run from the root directory of the repository with
|
|
92
101
|
```bash
|
|
93
|
-
pytest
|
|
102
|
+
uv run pytest
|
|
94
103
|
```
|
|
95
104
|
Followed by a formatting check
|
|
96
105
|
```bash
|
|
97
|
-
ruff check
|
|
106
|
+
uv run ruff check
|
|
98
107
|
```
|
|
99
108
|
and a type annotation check
|
|
100
109
|
```bash
|
|
101
|
-
ty check
|
|
110
|
+
uv run ty check src/
|
|
102
111
|
```
|
|
103
112
|
|
|
113
|
+
If you add or change a dependency, use `uv add <package>` (or `uv add --group dev <package>` for a development tool) and **commit the updated `uv.lock`** — CI runs `uv sync --locked` and will fail if the lockfile is out of date.
|
|
114
|
+
|
|
104
115
|
Finally, submit your changes as a pull request! When you submit the PR, please request reviews from both @dtretiak and @Jan-Williams, we will try to get back to you as soon as possible. When you submit the PR, the above tests will automatically be run on your proposed changes through Github Actions, so it is best to get everything tested first before submitting!
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling>=1.27", "hatch-vcs>=0.4"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "OpenReservoirComputing"
|
|
7
|
+
authors = [
|
|
8
|
+
{ name = "Jan P. Williams", email = "jmpw1@uw.edu" },
|
|
9
|
+
{ name = "Dima Tretiak", email = "dtretiak@uw.edu" },
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
maintainers = [
|
|
13
|
+
{ name = "Jan P. Williams", email = "jmpw1@uw.edu" },
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
description = "GPU accelerated implementations of common RC architectures"
|
|
17
|
+
readme = "README.md"
|
|
18
|
+
dynamic = ["version"]
|
|
19
|
+
dependencies = [
|
|
20
|
+
"jax",
|
|
21
|
+
"equinox",
|
|
22
|
+
"matplotlib",
|
|
23
|
+
"diffrax",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
requires-python = ">=3.10, <3.14"
|
|
27
|
+
keywords = ["reservoir computing"]
|
|
28
|
+
classifiers = [
|
|
29
|
+
"License :: OSI Approved :: Apache Software License",
|
|
30
|
+
"Intended Audience :: Science/Research",
|
|
31
|
+
"Programming Language :: Python :: 3.10",
|
|
32
|
+
"Programming Language :: Python :: 3.11",
|
|
33
|
+
"Programming Language :: Python :: 3.12",
|
|
34
|
+
"Programming Language :: Python :: 3.13",
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
[project.urls]
|
|
38
|
+
Repository = "https://github.com/Jan-Williams/OpenReservoirComputing"
|
|
39
|
+
|
|
40
|
+
[project.optional-dependencies]
|
|
41
|
+
# JAX publishes CUDA wheels for Linux only (see JAX's installation docs). The marker
|
|
42
|
+
# keeps this extra a no-op on macOS and native Windows instead of an install error.
|
|
43
|
+
# Windows users with an NVIDIA GPU should install under WSL2, which reports
|
|
44
|
+
# sys_platform == "linux" and therefore does get the CUDA build.
|
|
45
|
+
gpu = ["jax[cuda12]; sys_platform == 'linux'"]
|
|
46
|
+
notebooks = ["notebook", "ipykernel"]
|
|
47
|
+
|
|
48
|
+
# Development and documentation dependencies live in PEP 735 dependency groups rather
|
|
49
|
+
# than extras: they are never published in the package metadata, and `uv sync` installs
|
|
50
|
+
# them automatically. They are therefore NOT reachable via `pip install -e ".[dev]"`.
|
|
51
|
+
[dependency-groups]
|
|
52
|
+
dev = [
|
|
53
|
+
"ruff",
|
|
54
|
+
"ty",
|
|
55
|
+
"pytest",
|
|
56
|
+
"pytest-cov",
|
|
57
|
+
"pytest-env",
|
|
58
|
+
"coverage",
|
|
59
|
+
]
|
|
60
|
+
docs = [
|
|
61
|
+
"mkdocs",
|
|
62
|
+
"mkdocs-material",
|
|
63
|
+
"mkdocs-autorefs",
|
|
64
|
+
"mkdocstrings[python]",
|
|
65
|
+
"mkdocs-jupyter",
|
|
66
|
+
# mkdocs.yml runs mkdocs-jupyter with execute: true / allow_errors: false, so the
|
|
67
|
+
# docs build executes every example notebook and needs a Jupyter kernel.
|
|
68
|
+
"notebook",
|
|
69
|
+
"ipykernel",
|
|
70
|
+
]
|
|
71
|
+
|
|
72
|
+
[tool.uv]
|
|
73
|
+
default-groups = ["dev"]
|
|
74
|
+
required-version = ">=0.9.0"
|
|
75
|
+
|
|
76
|
+
[tool.hatch.version]
|
|
77
|
+
source = "vcs"
|
|
78
|
+
|
|
79
|
+
[tool.hatch.build.targets.wheel]
|
|
80
|
+
# Required explicitly: hatchling's autodetection looks for the normalized project name
|
|
81
|
+
# ("openreservoircomputing"), which does not match the import package ("orc").
|
|
82
|
+
packages = ["src/orc"]
|
|
83
|
+
|
|
84
|
+
[tool.hatch.build.targets.sdist]
|
|
85
|
+
# only-include (not include): docs/examples is a symlink to ../examples, and hatchling's
|
|
86
|
+
# tree walk follows symlinks while de-duplicating on (st_dev, st_ino) -- so whichever of
|
|
87
|
+
# examples/ or docs/examples/ is visited first wins and the other is dropped, making the
|
|
88
|
+
# sdist non-deterministic across machines. only-include bypasses the tree walk entirely.
|
|
89
|
+
only-include = [
|
|
90
|
+
"src/orc",
|
|
91
|
+
"tests",
|
|
92
|
+
"examples",
|
|
93
|
+
"pyproject.toml",
|
|
94
|
+
"README.md",
|
|
95
|
+
"LICENSE",
|
|
96
|
+
]
|
|
97
|
+
|
|
98
|
+
[tool.pytest.ini_options]
|
|
99
|
+
testpaths = "tests"
|
|
100
|
+
addopts = "--ignore=scripts --ignore=docs"
|
|
101
|
+
env = ["MPLBACKEND=Agg"]
|
|
102
|
+
|
|
103
|
+
[tool.coverage.run]
|
|
104
|
+
source_pkgs = ["orc"]
|
|
105
|
+
branch = true
|
|
106
|
+
|
|
107
|
+
[tool.coverage.paths]
|
|
108
|
+
# Canonicalize editable (src/orc) and non-editable (site-packages/orc) layouts so
|
|
109
|
+
# reports are comparable regardless of how the project was installed.
|
|
110
|
+
source = ["src/orc", "*/site-packages/orc"]
|
|
111
|
+
|
|
112
|
+
[tool.ruff]
|
|
113
|
+
exclude = ["examples"]
|
|
114
|
+
|
|
115
|
+
[tool.ruff.lint]
|
|
116
|
+
select = ["E", "W", "F", "D", "UP", "B", "A", "C4", "N", "SIM", "I"]
|
|
117
|
+
|
|
118
|
+
ignore = ["N806", "N802", "N803", "F722"]
|
|
119
|
+
|
|
120
|
+
[tool.ruff.lint.per-file-ignores]
|
|
121
|
+
"tests/*" = ["D", "E402"]
|
|
122
|
+
"docs/*.py" = ["D", "A"]
|
|
123
|
+
"*.ipynb" = ["E", "W", "F", "D", "UP", "B", "A", "C4", "N", "SIM", "I"]
|
|
124
|
+
|
|
125
|
+
[tool.ruff.lint.pycodestyle]
|
|
126
|
+
max-line-length = 88
|
|
127
|
+
|
|
128
|
+
[tool.ruff.lint.pydocstyle]
|
|
129
|
+
convention = "numpy"
|
|
130
|
+
|
|
131
|
+
[tool.ty.src]
|
|
132
|
+
exclude = ["tests", "examples"]
|
|
@@ -179,9 +179,7 @@ class RCControllerBase(eqx.Module, ABC):
|
|
|
179
179
|
return self.force(in_seq, control_seq, res_state)
|
|
180
180
|
|
|
181
181
|
@eqx.filter_jit
|
|
182
|
-
def apply_control(
|
|
183
|
-
self, control_seq: Array, res_state: Array
|
|
184
|
-
) -> tuple[Array, Array]:
|
|
182
|
+
def apply_control(self, control_seq: Array, res_state: Array) -> Array:
|
|
185
183
|
"""Apply a predefined control sequence in closed-loop.
|
|
186
184
|
|
|
187
185
|
The readout feeds back as the next input: u(t+1) = readout(x(t)).
|
|
@@ -115,7 +115,7 @@ def train_RCForecaster(
|
|
|
115
115
|
ts = force_kwargs["ts"]
|
|
116
116
|
|
|
117
117
|
def _force(seq, state, t):
|
|
118
|
-
return model.force(seq, state, ts=t)
|
|
118
|
+
return model.force(seq, state, ts=t) # ty: ignore[unknown-argument]
|
|
119
119
|
|
|
120
120
|
tot_res_seq = eqx.filter_vmap(_force)(tot_seq, initial_res_state, ts)
|
|
121
121
|
else:
|
|
@@ -839,7 +839,7 @@ def test_multi_seq_equiv_manual_concat(lorenz_segments):
|
|
|
839
839
|
beta,
|
|
840
840
|
)
|
|
841
841
|
|
|
842
|
-
assert jnp.allclose(esn_multi.readout.wout, cmat)
|
|
842
|
+
assert jnp.allclose(esn_multi.readout.wout, cmat, atol=1e-2)
|
|
843
843
|
|
|
844
844
|
|
|
845
845
|
def test_multi_seq_tot_res_seq_shape(lorenz_segments):
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
* @Jan-Williams
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
name: Deploy Docs
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
|
-
|
|
7
|
-
permissions:
|
|
8
|
-
contents: write
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
deploy:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v4
|
|
15
|
-
with:
|
|
16
|
-
fetch-depth: 0
|
|
17
|
-
|
|
18
|
-
- uses: actions/setup-python@v5
|
|
19
|
-
with:
|
|
20
|
-
python-version: "3.12"
|
|
21
|
-
|
|
22
|
-
- name: Install dependencies
|
|
23
|
-
run: pip install -e .[docs]
|
|
24
|
-
|
|
25
|
-
- name: Deploy to GitHub Pages
|
|
26
|
-
run: mkdocs gh-deploy --force
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
name: Draft PDF
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
paths:
|
|
5
|
-
- JOSS/**
|
|
6
|
-
- .github/workflows/draft-pdf.yml
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
paper:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
name: Paper Draft
|
|
12
|
-
steps:
|
|
13
|
-
- name: Checkout
|
|
14
|
-
uses: actions/checkout@v4
|
|
15
|
-
- name: Build draft PDF
|
|
16
|
-
uses: openjournals/openjournals-draft-action@master
|
|
17
|
-
with:
|
|
18
|
-
journal: joss
|
|
19
|
-
# This should be the path to the paper within your repo.
|
|
20
|
-
paper-path: JOSS/paper.md
|
|
21
|
-
- name: Upload
|
|
22
|
-
uses: actions/upload-artifact@v4
|
|
23
|
-
with:
|
|
24
|
-
name: paper
|
|
25
|
-
# This is the output path where Pandoc will write the compiled
|
|
26
|
-
# PDF. Note, this should be the same directory as the input
|
|
27
|
-
# paper.md
|
|
28
|
-
path: JOSS/paper.pdf
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
name: Publish to PyPI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
release:
|
|
5
|
-
types: [published]
|
|
6
|
-
|
|
7
|
-
permissions:
|
|
8
|
-
id-token: write
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
build:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v4
|
|
15
|
-
with:
|
|
16
|
-
fetch-depth: 0 # needed for setuptools_scm
|
|
17
|
-
|
|
18
|
-
- uses: actions/setup-python@v5
|
|
19
|
-
with:
|
|
20
|
-
python-version: "3.12"
|
|
21
|
-
|
|
22
|
-
- name: Install build tools
|
|
23
|
-
run: pip install build
|
|
24
|
-
|
|
25
|
-
- name: Build package
|
|
26
|
-
run: python -m build
|
|
27
|
-
|
|
28
|
-
- uses: actions/upload-artifact@v4
|
|
29
|
-
with:
|
|
30
|
-
name: dist
|
|
31
|
-
path: dist/
|
|
32
|
-
|
|
33
|
-
publish:
|
|
34
|
-
needs: build
|
|
35
|
-
runs-on: ubuntu-latest
|
|
36
|
-
environment: pypi
|
|
37
|
-
permissions:
|
|
38
|
-
id-token: write
|
|
39
|
-
steps:
|
|
40
|
-
- uses: actions/download-artifact@v4
|
|
41
|
-
with:
|
|
42
|
-
name: dist
|
|
43
|
-
path: dist/
|
|
44
|
-
|
|
45
|
-
- name: Publish to PyPI
|
|
46
|
-
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
pull_request:
|
|
8
|
-
branches:
|
|
9
|
-
- main
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
run-tests:
|
|
13
|
-
strategy:
|
|
14
|
-
matrix:
|
|
15
|
-
python-version: ["3.10", "3.11", "3.12","3.13"]
|
|
16
|
-
os: [ubuntu-latest]
|
|
17
|
-
runs-on: ${{ matrix.os }}
|
|
18
|
-
steps:
|
|
19
|
-
- uses: actions/checkout@v4
|
|
20
|
-
- name: Set up Python ${{ matrix.python-version }}
|
|
21
|
-
uses: actions/setup-python@v5
|
|
22
|
-
with:
|
|
23
|
-
python-version: ${{ matrix.python-version }}
|
|
24
|
-
cache: 'pip'
|
|
25
|
-
cache-dependency-path: pyproject.toml
|
|
26
|
-
|
|
27
|
-
- name: Install dependencies
|
|
28
|
-
run: |
|
|
29
|
-
python -m pip install --upgrade pip
|
|
30
|
-
pip install .[dev]
|
|
31
|
-
|
|
32
|
-
- name: Format check with ruff
|
|
33
|
-
run: |
|
|
34
|
-
ruff check --output-format=github
|
|
35
|
-
|
|
36
|
-
- name: Type check with ty
|
|
37
|
-
run: |
|
|
38
|
-
ty check src/
|
|
39
|
-
|
|
40
|
-
- name: Test with pytest
|
|
41
|
-
run: |
|
|
42
|
-
pytest --junitxml=junit/test-results-${{ matrix.os }}-py${{ matrix.python-version }}.xml --cov=orc
|
|
43
|
-
|
|
44
|
-
- name: Show coverage report
|
|
45
|
-
run: |
|
|
46
|
-
coverage report
|
|
47
|
-
coverage xml
|
|
48
|
-
|
|
49
|
-
- name: Upload coverage to Codecov
|
|
50
|
-
if: matrix.python-version == '3.12'
|
|
51
|
-
uses: codecov/codecov-action@v5
|
|
52
|
-
with:
|
|
53
|
-
token: ${{ secrets.CODECOV_TOKEN }}
|
|
54
|
-
files: coverage.xml
|
|
55
|
-
flags: unittests
|
|
56
|
-
name: codecov-umbrella
|
|
57
|
-
fail_ci_if_error: false
|
|
58
|
-
|
|
59
|
-
- name: Test Summary
|
|
60
|
-
uses: test-summary/action@v2
|
|
61
|
-
with:
|
|
62
|
-
paths: "junit/*.xml"
|
|
63
|
-
if: always()
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
cff-version: 1.2.0
|
|
2
|
-
message: "If you use this software, please cite it as below."
|
|
3
|
-
title: "OpenReservoirComputing: GPU-Accelerated Reservoir Computing in JAX"
|
|
4
|
-
type: software
|
|
5
|
-
authors:
|
|
6
|
-
- given-names: Jan P.
|
|
7
|
-
family-names: Williams
|
|
8
|
-
email: jmpw1@uw.edu
|
|
9
|
-
affiliation: University of Washington
|
|
10
|
-
orcid: https://orcid.org/0009-0005-4955-0411
|
|
11
|
-
- given-names: Dima
|
|
12
|
-
family-names: Tretiak
|
|
13
|
-
email: dtretiak@uw.edu
|
|
14
|
-
affiliation: University of Washington
|
|
15
|
-
orcid: https://orcid.org/0009-0005-0419-7554
|
|
16
|
-
- given-names: Steven L.
|
|
17
|
-
family-names: Brunton
|
|
18
|
-
affiliation: University of Washington
|
|
19
|
-
orcid: https://orcid.org/0000-0002-6565-5118
|
|
20
|
-
- given-names: J. Nathan
|
|
21
|
-
family-names: Kutz
|
|
22
|
-
affiliation: University of Washington
|
|
23
|
-
orcid: https://orcid.org/0000-0002-6004-2275
|
|
24
|
-
- given-names: Krithika
|
|
25
|
-
family-names: Manohar
|
|
26
|
-
affiliation: University of Washington
|
|
27
|
-
orcid: https://orcid.org/0000-0002-1582-6767
|
|
28
|
-
repository-code: https://github.com/Jan-Williams/OpenReservoirComputing
|
|
29
|
-
url: https://Jan-Williams.github.io/OpenReservoirComputing/
|
|
30
|
-
license: Apache-2.0
|
|
31
|
-
keywords:
|
|
32
|
-
- reservoir computing
|
|
33
|
-
- echo state networks
|
|
34
|
-
- time series forecasting
|
|
35
|
-
- JAX
|
|
36
|
-
- GPU computing
|
|
37
|
-
- chaotic systems
|
|
38
|
-
# doi: TODO - will be assigned by JOSS upon acceptance
|
|
39
|
-
# version: TODO - set to release version at submission time
|