{"id":37624970,"url":"https://github.com/martenlienen/torchode","last_synced_at":"2026-01-16T10:46:23.044Z","repository":{"id":63983617,"uuid":"555867409","full_name":"martenlienen/torchode","owner":"martenlienen","description":"A parallel ODE solver for PyTorch","archived":false,"fork":false,"pushed_at":"2024-10-03T12:30:41.000Z","size":83,"stargazers_count":271,"open_issues_count":1,"forks_count":20,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-28T06:46:29.469Z","etag":null,"topics":["deep-learning","neural-ode","pytorch"],"latest_commit_sha":null,"homepage":"https://torchode.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/martenlienen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-10-22T14:19:33.000Z","updated_at":"2025-11-24T22:44:07.000Z","dependencies_parsed_at":"2024-05-22T08:24:25.932Z","dependency_job_id":"321266b9-ff5c-4274-b49b-602d135c8ec2","html_url":"https://github.com/martenlienen/torchode","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/martenlienen/torchode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martenlienen%2Ftorchode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martenlienen%2Ftorchode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martenlienen%2Ftorchode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martenlienen%2Ftorchode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martenlienen","download_url":"https://codeload.github.com/martenlienen/torchode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martenlienen%2Ftorchode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","neural-ode","pytorch"],"created_at":"2026-01-16T10:46:22.965Z","updated_at":"2026-01-16T10:46:23.025Z","avatar_url":"https://github.com/martenlienen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Parallel ODE Solver for PyTorch\n\n![pytest](https://github.com/martenlienen/torchode/actions/workflows/python-package.yml/badge.svg)\n\ntorchode is a suite of single-step ODE solvers such as `dopri5` or `tsit5` that are\ncompatible with PyTorch's JIT compiler and parallelized across a batch. JIT compilation\noften gives a performance boost, especially for code with many small operations such as an\nODE solver, while batch-parallelization means that the solver can take a step of `0.1` for\none sample and `0.33` for another, depending on each sample's difficulty. This can avoid\nperformance traps for models of varying stiffness and ensures that the model's predictions\nare independent from the compisition of the batch. See the\n[paper](https://openreview.net/forum?id=uiKVKTiUYB0) for details.\n\n- [*Documentation*](https://torchode.readthedocs.org)\n\nIf you get stuck at some point, you think the library should have an example on _x_ or you\nwant to suggest some other type of improvement, please open an [issue on\ngithub](https://github.com/martenlienen/torchode/issues/new).\n\n## Installation\n\nYou can get the latest released version from PyPI with\n\n```sh\npip install torchode\n```\n\nTo install a development version, clone the repository and install in editable mode:\n\n```sh\ngit clone https://github.com/martenlienen/torchode\ncd torchode\npip install -e .\n```\n\n## Usage\n\n```python\nimport matplotlib.pyplot as pp\nimport torch\nimport torchode as to\n\ndef f(t, y):\n    return -0.5 * y\n\ny0 = torch.tensor([[1.2], [5.0]])\nn_steps = 10\nt_eval = torch.stack((torch.linspace(0, 5, n_steps), torch.linspace(3, 4, n_steps)))\n\nterm = to.ODETerm(f)\nstep_method = to.Dopri5(term=term)\nstep_size_controller = to.IntegralController(atol=1e-6, rtol=1e-3, term=term)\nsolver = to.AutoDiffAdjoint(step_method, step_size_controller)\njit_solver = torch.compile(solver)\n\nsol = jit_solver.solve(to.InitialValueProblem(y0=y0, t_eval=t_eval))\nprint(sol.stats)\n# =\u003e {'n_f_evals': tensor([26, 26]), 'n_steps': tensor([4, 2]),\n# =\u003e  'n_accepted': tensor([4, 2]), 'n_initialized': tensor([10, 10])}\n\npp.plot(sol.ts[0], sol.ys[0])\npp.plot(sol.ts[1], sol.ys[1])\n```\n\n## Citation\n\nIf you build upon this work, please cite the following paper.\n\n```\n@inproceedings{lienen2022torchode,\n  title = {torchode: A Parallel {ODE} Solver for PyTorch},\n  author = {Marten Lienen and Stephan G{\\\"u}nnemann},\n  booktitle = {The Symbiosis of Deep Learning and Differential Equations II, NeurIPS},\n  year = {2022},\n  url = {https://openreview.net/forum?id=uiKVKTiUYB0}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartenlienen%2Ftorchode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartenlienen%2Ftorchode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartenlienen%2Ftorchode/lists"}