Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.2%) to scientific vocabulary
Keywords
Repository
A parallel ODE solver for PyTorch
Basic Info
- Host: GitHub
- Owner: martenlienen
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://torchode.readthedocs.io
- Size: 81.1 KB
Statistics
- Stars: 264
- Watchers: 1
- Forks: 20
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
A Parallel ODE Solver for PyTorch
torchode is a suite of single-step ODE solvers such as dopri5 or tsit5 that are
compatible with PyTorch's JIT compiler and parallelized across a batch. JIT compilation
often gives a performance boost, especially for code with many small operations such as an
ODE solver, while batch-parallelization means that the solver can take a step of 0.1 for
one sample and 0.33 for another, depending on each sample's difficulty. This can avoid
performance traps for models of varying stiffness and ensures that the model's predictions
are independent from the compisition of the batch. See the
paper for details.
If you get stuck at some point, you think the library should have an example on x or you want to suggest some other type of improvement, please open an issue on github.
Installation
You can get the latest released version from PyPI with
sh
pip install torchode
To install a development version, clone the repository and install in editable mode:
sh
git clone https://github.com/martenlienen/torchode
cd torchode
pip install -e .
Usage
```python import matplotlib.pyplot as pp import torch import torchode as to
def f(t, y): return -0.5 * y
y0 = torch.tensor([[1.2], [5.0]]) nsteps = 10 teval = torch.stack((torch.linspace(0, 5, nsteps), torch.linspace(3, 4, nsteps)))
term = to.ODETerm(f) stepmethod = to.Dopri5(term=term) stepsizecontroller = to.IntegralController(atol=1e-6, rtol=1e-3, term=term) solver = to.AutoDiffAdjoint(stepmethod, stepsizecontroller) jit_solver = torch.compile(solver)
sol = jitsolver.solve(to.InitialValueProblem(y0=y0, teval=t_eval)) print(sol.stats)
=> {'nfevals': tensor([26, 26]), 'n_steps': tensor([4, 2]),
=> 'naccepted': tensor([4, 2]), 'ninitialized': tensor([10, 10])}
pp.plot(sol.ts[0], sol.ys[0]) pp.plot(sol.ts[1], sol.ys[1]) ```
Citation
If you build upon this work, please cite the following paper.
@inproceedings{lienen2022torchode,
title = {torchode: A Parallel {ODE} Solver for PyTorch},
author = {Marten Lienen and Stephan G{\"u}nnemann},
booktitle = {The Symbiosis of Deep Learning and Differential Equations II, NeurIPS},
year = {2022},
url = {https://openreview.net/forum?id=uiKVKTiUYB0}
}
Owner
- Name: Marten Lienen
- Login: martenlienen
- Kind: user
- Location: Germany
- Company: TUM
- Website: https://martenlienen.com
- Twitter: martenlienen
- Repositories: 100
- Profile: https://github.com/martenlienen
Citation (CITATION.cff)
cff-version: 1.2.0
title: torchode
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Marten
family-names: Lienen
email: m.lienen@tum.de
- given-names: Stephan
family-names: Günnemann
email: s.guennemann@tum.de
repository-code: "https://github.com/martenlienen/torchode"
license: MIT
preferred-citation:
type: conference-paper
title: "torchode: A Parallel ODE Solver for PyTorch"
authors:
- given-names: Marten
family-names: Lienen
email: m.lienen@tum.de
- given-names: Stephan
family-names: Günnemann
email: s.guennemann@tum.de
collection-title: "The Symbiosis of Deep Learning and Differential Equations II, NeurIPS"
year: 2022
url: "https://openreview.net/forum?id=uiKVKTiUYB0"
GitHub Events
Total
- Issues event: 6
- Watch event: 33
- Issue comment event: 12
- Fork event: 8
Last Year
- Issues event: 6
- Watch event: 33
- Issue comment event: 12
- Fork event: 8
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 3
- Total pull requests: 0
- Average time to close issues: about 15 hours
- Average time to close pull requests: N/A
- Total issue authors: 2
- Total pull request authors: 0
- Average comments per issue: 2.67
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 3
- Pull requests: 0
- Average time to close issues: about 15 hours
- Average time to close pull requests: N/A
- Issue authors: 2
- Pull request authors: 0
- Average comments per issue: 2.67
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- Ilykuleshov (3)
- timnotavailable (2)
- 1ho0jin1 (1)
- zjowowen (1)
- wangmiaowei (1)
- jucor (1)
- gisilvs (1)
- m13ammed (1)
- kschischo (1)
- chansigit (1)
- janrohleff (1)
- tuchris (1)
Pull Request Authors
- Ilykuleshov (2)
- wootwootwootwoot (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 2,685 last-month
- Total dependent packages: 3
- Total dependent repositories: 2
- Total versions: 14
- Total maintainers: 1
pypi.org: torchode
A parallel ODE solver for PyTorch
- Documentation: https://torchode.readthedocs.io/
- License: MIT License
-
Latest release: 1.0.0
published over 1 year ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v3 composite
- actions/setup-python v3 composite
- mkdocs ==1.4.1
- mkdocs-jupyter *
- attrs ==22.1.0
- beautifulsoup4 ==4.11.1
- bleach ==5.0.1
- certifi ==2022.12.7
- charset-normalizer ==2.1.1
- click ==8.1.3
- defusedxml ==0.7.1
- entrypoints ==0.4
- fastjsonschema ==2.16.2
- ghp-import ==2.1.0
- idna ==3.4
- jinja2 ==3.1.2
- jsonschema ==4.17.0
- jupyter-client ==7.4.4
- jupyter-core ==4.11.2
- jupyterlab-pygments ==0.2.2
- jupytext ==1.14.1
- lxml ==4.9.1
- markdown ==3.3.7
- markdown-it-py ==2.1.0
- markupsafe ==2.1.1
- mdit-py-plugins ==0.3.1
- mdurl ==0.1.2
- mergedeep ==1.3.4
- mistune ==0.8.4
- mkdocs ==1.4.1
- mkdocs-jupyter ==0.22.0
- mkdocs-material ==8.5.7
- mkdocs-material-extensions ==1.1
- nbclient ==0.7.0
- nbconvert ==6.5.4
- nbformat ==5.7.0
- nest-asyncio ==1.5.6
- packaging ==21.3
- pandocfilters ==1.5.0
- pygments ==2.13.0
- pymdown-extensions ==9.7
- pyparsing ==3.0.9
- pyrsistent ==0.19.1
- python-dateutil ==2.8.2
- pyyaml ==6.0
- pyyaml-env-tag ==0.1
- pyzmq ==24.0.1
- requests ==2.28.1
- six ==1.16.0
- soupsieve ==2.3.2.post1
- tinycss2 ==1.2.1
- toml ==0.10.2
- tornado ==6.2
- traitlets ==5.5.0
- urllib3 ==1.26.12
- watchdog ==2.1.9
- webencodings ==0.5.1
- functorch *
- sympy ~= 1.10
- torch ~= 1.11
- torchtyping ~= 0.1.4