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
Last synced: 11 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: BigBuildBench
  • License: mit
  • Language: Python
  • Default Branch: master
  • Size: 51.8 KB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License Citation

README.md

A Parallel ODE Solver for PyTorch

pytest

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: BigBuildBench
  • Login: BigBuildBench
  • Kind: organization

abbr. B3, benchmarking the repo-level understanding capability of your LLMs by reconstructing project build-file.

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
  • Create event: 4
Last Year
  • Create event: 4

Dependencies

.github/workflows/python-package.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
docs/requirements.in pypi
  • mkdocs ==1.4.1
  • mkdocs-jupyter *
docs/requirements.txt pypi
  • 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.2.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
pyproject.toml pypi