OpenReservoirComputing 0.1.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.
Files changed (79) hide show
  1. openreservoircomputing-0.1.0/.github/CODEOWNERS +1 -0
  2. openreservoircomputing-0.1.0/.github/workflows/tests.yml +57 -0
  3. openreservoircomputing-0.1.0/.gitignore +176 -0
  4. openreservoircomputing-0.1.0/LICENSE +201 -0
  5. openreservoircomputing-0.1.0/PKG-INFO +168 -0
  6. openreservoircomputing-0.1.0/README.md +109 -0
  7. openreservoircomputing-0.1.0/docs/api/data.md +39 -0
  8. openreservoircomputing-0.1.0/docs/api/drivers.md +19 -0
  9. openreservoircomputing-0.1.0/docs/api/embeddings.md +19 -0
  10. openreservoircomputing-0.1.0/docs/api/models.md +39 -0
  11. openreservoircomputing-0.1.0/docs/api/rc.md +19 -0
  12. openreservoircomputing-0.1.0/docs/api/readouts.md +35 -0
  13. openreservoircomputing-0.1.0/docs/api/utils.md +36 -0
  14. openreservoircomputing-0.1.0/docs/contributing.md +65 -0
  15. openreservoircomputing-0.1.0/docs/examples/lorenz.ipynb +256 -0
  16. openreservoircomputing-0.1.0/docs/examples/rc_background.ipynb +417 -0
  17. openreservoircomputing-0.1.0/docs/getting-started/installation.md +102 -0
  18. openreservoircomputing-0.1.0/docs/getting-started/quickstart.md +162 -0
  19. openreservoircomputing-0.1.0/docs/imgs/ORC_logo_cropped.png +0 -0
  20. openreservoircomputing-0.1.0/docs/imgs/control_diagram.png +0 -0
  21. openreservoircomputing-0.1.0/docs/imgs/readme_example_forecast.png +0 -0
  22. openreservoircomputing-0.1.0/docs/index.md +133 -0
  23. openreservoircomputing-0.1.0/docs/javascripts/mathjax.js +26 -0
  24. openreservoircomputing-0.1.0/docs/stylesheets/extra.css +72 -0
  25. openreservoircomputing-0.1.0/docs/user-guide/data.md +3 -0
  26. openreservoircomputing-0.1.0/docs/user-guide/drivers.md +174 -0
  27. openreservoircomputing-0.1.0/docs/user-guide/embeddings.md +151 -0
  28. openreservoircomputing-0.1.0/docs/user-guide/models.md +275 -0
  29. openreservoircomputing-0.1.0/docs/user-guide/overview.md +15 -0
  30. openreservoircomputing-0.1.0/docs/user-guide/readouts.md +148 -0
  31. openreservoircomputing-0.1.0/examples/continuous_rc.ipynb +264 -0
  32. openreservoircomputing-0.1.0/examples/control.ipynb +248 -0
  33. openreservoircomputing-0.1.0/examples/data_library.ipynb +262 -0
  34. openreservoircomputing-0.1.0/examples/ks.ipynb +299 -0
  35. openreservoircomputing-0.1.0/examples/lorenz.ipynb +257 -0
  36. openreservoircomputing-0.1.0/examples/rc_background.ipynb +405 -0
  37. openreservoircomputing-0.1.0/imgs/ORC_logo_cropped.png +0 -0
  38. openreservoircomputing-0.1.0/imgs/control_diagram.png +0 -0
  39. openreservoircomputing-0.1.0/imgs/readme_example_forecast.png +0 -0
  40. openreservoircomputing-0.1.0/mkdocs.yml +124 -0
  41. openreservoircomputing-0.1.0/pyproject.toml +106 -0
  42. openreservoircomputing-0.1.0/setup.cfg +4 -0
  43. openreservoircomputing-0.1.0/src/OpenReservoirComputing.egg-info/PKG-INFO +168 -0
  44. openreservoircomputing-0.1.0/src/OpenReservoirComputing.egg-info/SOURCES.txt +77 -0
  45. openreservoircomputing-0.1.0/src/OpenReservoirComputing.egg-info/dependency_links.txt +1 -0
  46. openreservoircomputing-0.1.0/src/OpenReservoirComputing.egg-info/requires.txt +44 -0
  47. openreservoircomputing-0.1.0/src/OpenReservoirComputing.egg-info/top_level.txt +1 -0
  48. openreservoircomputing-0.1.0/src/orc/__init__.py +29 -0
  49. openreservoircomputing-0.1.0/src/orc/classifier/__init__.py +6 -0
  50. openreservoircomputing-0.1.0/src/orc/classifier/base.py +6 -0
  51. openreservoircomputing-0.1.0/src/orc/classifier/models.py +6 -0
  52. openreservoircomputing-0.1.0/src/orc/classifier/train.py +6 -0
  53. openreservoircomputing-0.1.0/src/orc/control/__init__.py +15 -0
  54. openreservoircomputing-0.1.0/src/orc/control/base.py +362 -0
  55. openreservoircomputing-0.1.0/src/orc/control/models.py +139 -0
  56. openreservoircomputing-0.1.0/src/orc/control/train.py +90 -0
  57. openreservoircomputing-0.1.0/src/orc/data/__init__.py +27 -0
  58. openreservoircomputing-0.1.0/src/orc/data/integrators.py +753 -0
  59. openreservoircomputing-0.1.0/src/orc/drivers.py +851 -0
  60. openreservoircomputing-0.1.0/src/orc/embeddings.py +459 -0
  61. openreservoircomputing-0.1.0/src/orc/forecaster/__init__.py +20 -0
  62. openreservoircomputing-0.1.0/src/orc/forecaster/base.py +487 -0
  63. openreservoircomputing-0.1.0/src/orc/forecaster/models.py +416 -0
  64. openreservoircomputing-0.1.0/src/orc/forecaster/train.py +301 -0
  65. openreservoircomputing-0.1.0/src/orc/readouts.py +742 -0
  66. openreservoircomputing-0.1.0/src/orc/tuning/__init__.py +6 -0
  67. openreservoircomputing-0.1.0/src/orc/utils/__init__.py +6 -0
  68. openreservoircomputing-0.1.0/src/orc/utils/numerics.py +115 -0
  69. openreservoircomputing-0.1.0/src/orc/utils/regressions.py +73 -0
  70. openreservoircomputing-0.1.0/src/orc/utils/visualization.py +193 -0
  71. openreservoircomputing-0.1.0/tests/control/test_control_models.py +294 -0
  72. openreservoircomputing-0.1.0/tests/data/test_integrators.py +449 -0
  73. openreservoircomputing-0.1.0/tests/forecaster/test_forecast_models.py +510 -0
  74. openreservoircomputing-0.1.0/tests/test_drivers.py +1073 -0
  75. openreservoircomputing-0.1.0/tests/test_embeddings.py +151 -0
  76. openreservoircomputing-0.1.0/tests/test_readouts.py +298 -0
  77. openreservoircomputing-0.1.0/tests/utils/test_numerics.py +56 -0
  78. openreservoircomputing-0.1.0/tests/utils/test_regressions.py +276 -0
  79. openreservoircomputing-0.1.0/tests/utils/test_visualization.py +95 -0
@@ -0,0 +1 @@
1
+ * @Jan-Williams
@@ -0,0 +1,57 @@
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: Test with pytest
37
+ run: |
38
+ pytest --junitxml=junit/test-results-${{ matrix.os }}-py${{ matrix.python-version }}.xml --cov=orc
39
+
40
+ - name: Show coverage report
41
+ run: |
42
+ coverage report
43
+
44
+ - name: Upload coverage to Codecov
45
+ uses: codecov/codecov-action@v4
46
+ with:
47
+ token: ${{ secrets.CODECOV_TOKEN }}
48
+ files: .coverage
49
+ flags: unittests
50
+ name: codecov-umbrella
51
+ fail_ci_if_error: false
52
+
53
+ - name: Test Summary
54
+ uses: test-summary/action@v2
55
+ with:
56
+ paths: "junit/*.xml"
57
+ if: always()
@@ -0,0 +1,176 @@
1
+ # template .gitignore from #https://github.com/github/gitignore/blob/main/Python.gitignore
2
+
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__/
5
+ *.py[cod]
6
+ *$py.class
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ build/
14
+ develop-eggs/
15
+ dist/
16
+ downloads/
17
+ eggs/
18
+ .eggs/
19
+ lib/
20
+ lib64/
21
+ parts/
22
+ sdist/
23
+ var/
24
+ wheels/
25
+ share/python-wheels/
26
+ *.egg-info/
27
+ .installed.cfg
28
+ *.egg
29
+ MANIFEST
30
+
31
+ # PyInstaller
32
+ # Usually these files are written by a python script from a template
33
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
34
+ *.manifest
35
+ *.spec
36
+
37
+ # Installer logs
38
+ pip-log.txt
39
+ pip-delete-this-directory.txt
40
+
41
+ # Unit test / coverage reports
42
+ htmlcov/
43
+ .tox/
44
+ .nox/
45
+ .coverage
46
+ .coverage.*
47
+ .cache
48
+ nosetests.xml
49
+ coverage.xml
50
+ *.cover
51
+ *.py,cover
52
+ .hypothesis/
53
+ .pytest_cache/
54
+ cover/
55
+
56
+ # Translations
57
+ *.mo
58
+ *.pot
59
+
60
+ # Django stuff:
61
+ *.log
62
+ local_settings.py
63
+ db.sqlite3
64
+ db.sqlite3-journal
65
+
66
+ # Flask stuff:
67
+ instance/
68
+ .webassets-cache
69
+
70
+ # Scrapy stuff:
71
+ .scrapy
72
+
73
+ # Sphinx documentation
74
+ docs/_build/
75
+
76
+ # PyBuilder
77
+ .pybuilder/
78
+ target/
79
+
80
+ # Jupyter Notebook
81
+ .ipynb_checkpoints
82
+
83
+ # IPython
84
+ profile_default/
85
+ ipython_config.py
86
+
87
+ # pyenv
88
+ # For a library or package, you might want to ignore these files since the code is
89
+ # intended to run in multiple environments; otherwise, check them in:
90
+ # .python-version
91
+
92
+ # pipenv
93
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
95
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
96
+ # install all needed dependencies.
97
+ #Pipfile.lock
98
+
99
+ # UV
100
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
101
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
102
+ # commonly ignored for libraries.
103
+ #uv.lock
104
+
105
+ # poetry
106
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
107
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
108
+ # commonly ignored for libraries.
109
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
110
+ #poetry.lock
111
+
112
+ # pdm
113
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
114
+ #pdm.lock
115
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
116
+ # in version control.
117
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
118
+ .pdm.toml
119
+ .pdm-python
120
+ .pdm-build/
121
+
122
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
123
+ __pypackages__/
124
+
125
+ # Celery stuff
126
+ celerybeat-schedule
127
+ celerybeat.pid
128
+
129
+ # SageMath parsed files
130
+ *.sage.py
131
+
132
+ # Environments
133
+ .env
134
+ .venv
135
+ env/
136
+ venv/
137
+ ENV/
138
+ env.bak/
139
+ venv.bak/
140
+
141
+ # Spyder project settings
142
+ .spyderproject
143
+ .spyproject
144
+
145
+ # Rope project settings
146
+ .ropeproject
147
+
148
+ # mkdocs documentation
149
+ /site
150
+
151
+ # mypy
152
+ .mypy_cache/
153
+ .dmypy.json
154
+ dmypy.json
155
+
156
+ # Pyre type checker
157
+ .pyre/
158
+
159
+ # pytype static type analyzer
160
+ .pytype/
161
+
162
+ # Cython debug symbols
163
+ cython_debug/
164
+
165
+ # PyCharm
166
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
167
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
168
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
169
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
170
+ #.idea/
171
+
172
+ # Ruff stuff:
173
+ .ruff_cache/
174
+
175
+ # PyPI configuration file
176
+ .pypirc
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2025 Dima Tretiak and Jan P. Williams
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,168 @@
1
+ Metadata-Version: 2.4
2
+ Name: OpenReservoirComputing
3
+ Version: 0.1.0
4
+ Summary: GPU accelerated implementations of common RC architectures
5
+ Author-email: "Jan P. Williams" <jmpw1@uw.edu>, Dima Tretiak <dtretiak@uw.edu>
6
+ Maintainer-email: "Jan P. Williams" <jmpw1@uw.edu>
7
+ Project-URL: Repository, https://github.com/Jan-Williams/OpenReservoirComputing
8
+ Keywords: reservoir computing
9
+ Classifier: License :: OSI Approved :: Apache Software License
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
16
+ Requires-Python: <3.14,>=3.10
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: jax>=0.4.20
20
+ Requires-Dist: equinox>=0.11.0
21
+ Requires-Dist: matplotlib
22
+ Requires-Dist: diffrax>=0.6.0
23
+ Provides-Extra: all
24
+ Requires-Dist: jax[cuda12]; extra == "all"
25
+ Requires-Dist: ruff; extra == "all"
26
+ Requires-Dist: pytest; extra == "all"
27
+ Requires-Dist: coverage; extra == "all"
28
+ Requires-Dist: pytest-cov; extra == "all"
29
+ Requires-Dist: notebook; extra == "all"
30
+ Requires-Dist: ipykernel; extra == "all"
31
+ Requires-Dist: pytest-env; extra == "all"
32
+ Requires-Dist: mkdocs; extra == "all"
33
+ Requires-Dist: mkdocs-material; extra == "all"
34
+ Requires-Dist: mkdocs-autorefs; extra == "all"
35
+ Requires-Dist: mkdocstrings[python]; extra == "all"
36
+ Requires-Dist: mkdocs-jupyter; extra == "all"
37
+ Provides-Extra: dev
38
+ Requires-Dist: ruff; extra == "dev"
39
+ Requires-Dist: pytest; extra == "dev"
40
+ Requires-Dist: coverage; extra == "dev"
41
+ Requires-Dist: pytest-cov; extra == "dev"
42
+ Requires-Dist: pytest-env; extra == "dev"
43
+ Requires-Dist: mkdocs; extra == "dev"
44
+ Requires-Dist: mkdocs-material; extra == "dev"
45
+ Requires-Dist: mkdocs-autorefs; extra == "dev"
46
+ Requires-Dist: mkdocstrings[python]; extra == "dev"
47
+ Provides-Extra: notebooks
48
+ Requires-Dist: notebook; extra == "notebooks"
49
+ Requires-Dist: ipykernel; extra == "notebooks"
50
+ Provides-Extra: gpu
51
+ Requires-Dist: jax[cuda12]; extra == "gpu"
52
+ Provides-Extra: docs
53
+ Requires-Dist: mkdocs; extra == "docs"
54
+ Requires-Dist: mkdocs-material; extra == "docs"
55
+ Requires-Dist: mkdocs-autorefs; extra == "docs"
56
+ Requires-Dist: mkdocstrings[python]; extra == "docs"
57
+ Requires-Dist: mkdocs-jupyter; extra == "docs"
58
+ Dynamic: license-file
59
+
60
+ <div align="center">
61
+ <img src="imgs/ORC_logo_cropped.png" alt="ORC Logo" width="200px" />
62
+ </div>
63
+
64
+ # ORC: Open Reservoir Computing
65
+ ### Warning: ORC is currently under development, many things may be (are definitely) broken and not all functionality is documented
66
+ [![CI](https://github.com/Jan-Williams/OpenReservoirComputing/actions/workflows/tests.yml/badge.svg)](https://github.com/Jan-Williams/OpenReservoirComputing/actions/workflows/tests.yml)
67
+ [![codecov](https://codecov.io/gh/Jan-Williams/OpenReservoirComputing/branch/main/graph/badge.svg)](https://codecov.io/gh/Jan-Williams/OpenReservoirComputing)
68
+
69
+
70
+ ORC is the one-stop-shop for performant reservoir computing in jax. Key high-level features include
71
+ - Modular design for mixing and matching layers and reservoir drivers (or creating your own!)
72
+ - Continuous, discrete, serial, and parallel implementations
73
+ - Built in hyperparameter tuning (coming soon!)
74
+ - Multi-gpu training and inference (coming soon!)
75
+
76
+ ## Installation
77
+
78
+ To install ORC, first clone the repository onto your local machine
79
+ ```bash
80
+ git clone https://github.com/Jan-Williams/OpenReservoirComputing.git
81
+ ```
82
+
83
+ Then navigate to the cloned directory and use `pip` to install:
84
+ ```bash
85
+ pip install .
86
+ ```
87
+
88
+ If you would like to use ORC on GPU(s), install the optional GPU dependencies:
89
+ ```bash
90
+ pip install .[gpu]
91
+ ```
92
+
93
+ To run the example notebooks, install the optional notebook dependencies:
94
+ ```bash
95
+ pip install .[notebooks]
96
+ ```
97
+
98
+ ## Quick start example
99
+ Below is a minimal quick-start example to train your first RC with ORC. It leverages the built-in data library to integrate the Lorenz63 ODE before training and forecasting with ORC.
100
+
101
+ ```python
102
+ import orc
103
+
104
+ # integrate the Lorenz system
105
+ U,t = orc.data.lorenz63(tN=100, dt=0.01)
106
+
107
+ # train-test split
108
+ test_perc = 0.2
109
+ split_idx = int((1 - test_perc) * U.shape[0])
110
+ U_train = U[:split_idx, :]
111
+ t_train = t[:split_idx]
112
+ U_test = U[split_idx:, :]
113
+ t_test = t[split_idx:]
114
+
115
+ # Initialize and train the ESN
116
+ esn = orc.forecaster.ESNForecaster(data_dim=3, res_dim=400)
117
+ esn, R = orc.forecaster.train_ESNForecaster(esn, U_train)
118
+
119
+ # Forecast!
120
+ U_pred = esn.forecast(fcast_len=U_test.shape[0], res_state=R[-1]) # feed in the last reservoir state seen in training
121
+ ```
122
+
123
+ To visualize the forecast and compare it to the test data, we can use `orc.utils.visualization`:
124
+ ```python
125
+ orc.utils.visualization.plot_time_series(
126
+ [U_test, U_pred],
127
+ (t_test - t_test[0]), # start time at 0
128
+ state_var_names=["$u_1$", "$u_2$", "$u_3$"],
129
+ time_series_labels=["True", "Predicted"],
130
+ line_formats=["-", "r--"],
131
+ x_label= r"$t$",
132
+ )
133
+ ```
134
+
135
+ <div align="center">
136
+ <img src="imgs/readme_example_forecast.png" alt="ORC Logo"/>
137
+ </div>
138
+
139
+
140
+ ## Contribution guidelines
141
+ First off, thanks for helping out! We appreciate your willingness to contribute! To get started, clone the repo and install the developer dependencies of ORC.
142
+
143
+ ```bash
144
+ git clone https://github.com/Jan-Williams/OpenReservoirComputing.git
145
+ ```
146
+
147
+ From the root directory of the repository, create an editable install for your given hardware.
148
+
149
+ CPU:
150
+ ```bash
151
+ pip install -e .[dev]
152
+ ```
153
+
154
+ GPU:
155
+ ```bash
156
+ pip install -e .[dev, gpu]
157
+ ```
158
+
159
+ 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
160
+ ```bash
161
+ pytest
162
+ ```
163
+ Followed by a formatting check
164
+ ```bash
165
+ ruff check
166
+ ```
167
+
168
+ 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!