Skip to main content

torchannex

torchannex is a curated distribution ("annex") of small, pure-Python libraries that extend PyTorch. Installing torchannex gives you a set of sub-libraries pinned to versions that are known to be compatible with a specific PyTorch release, although these libraries are intended to be loosely coupled with PyTorch and therefore compatible with a variety of releases.

The annex is designed to be cheap: every package in it is a lightweight pure Python package that installs instantly and pulls in no heavy native dependencies of its own beyond PyTorch.

When should I use torchannex?

You do not have to depend on torchannex directly. Two patterns are supported:

  1. Batteries-included. Depend on torchannex. You get the full curated set, versioned in lockstep with the PyTorch release you have installed.
  2. Hand-picked. Depend on the individual annex packages you care about and pin them yourself. Useful when you have an opinion about a specific sub-library's version and do not want the whole set.

The annex packages are ordinary PyPI packages. The metapackage is a convenience, not a gate.

Installation

pip install torchannex
# or
uv pip install torchannex

If torch is already installed (or pinned elsewhere in your environment), the resolver will select the torchannex version whose PyTorch pin matches:

pip install "torch==2.5.3" torchannex   # resolves to torchannex 2.5.x

Versioning

torchannex versions track PyTorch on the X.Y components only:

Component Meaning
X PyTorch major version (lockstep)
Y PyTorch minor version (lockstep)
Z Independent annex bugfix counter for the X.Y series

A torchannex X.Y.Z release depends on torch ~= X.Y.0 (i.e. >= X.Y.0, < X.(Y+1).0). This means:

  • Any torch X.Y.* patch release is compatible with any torchannex X.Y.*.
  • If we ship a fix to an annex sub-library without a new PyTorch release, we bump only the annex Z. For example, for the PyTorch 2.5 series:
    • torchannex 2.5.0 — first annex release for torch 2.5
    • torchannex 2.5.1 — bugfix to an annex sub-library (torch unchanged)
    • torchannex 2.5.2 — another annex bugfix
  • When PyTorch 2.6 ships we start a new series at torchannex 2.6.0.

Relationship between torch Z and torchannex Z

They are independent. torchannex 2.5.7 does not imply torch 2.5.7; it simply means the 8th annex release cut for the 2.5 series. Whatever torch 2.5.* you have installed is fine.

What's in the annex?

In the short term, we plan to put spmd_types in the annex to allow for some closer integration with DTensor local map.

Building and releasing

torchannex is a pure metapackage — no Python source — built with setuptools. The empty py-modules / packages entries in pyproject.toml tell setuptools there is nothing to find.

uv build       # produces sdist and wheel
uv publish     # uploads to PyPI (requires credentials)

See TESTING.md for the manual acceptance tests to run before a release.

License

BSD-3-Clause.

Metadata

Release files for torchannex 0.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for torchannex 0.0.0
File Size Uploaded Provenance Actions
torchannex-0.0.0.tar.gz 3.9 kB Without provenance Details for torchannex-0.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for torchannex 0.0.0
File Interpreter ABI Platform Actions
torchannex-0.0.0-py3-none-any.whl Python 3 none any Details for torchannex-0.0.0-py3-none-any.whl

Total release size: 7.6 kB

Release files / torchannex-0.0.0.tar.gz

Download URL torchannex-0.0.0.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5541fd59e2216f8e284b672a42d0958bc792ed1f63d71cf8ab71e6d2d914bb30
BLAKE2b-256 checksum
How to use checksums
19a448996db5d0d7eb5f632945794767dbe75c216e1a7ed6499c8461bb3221fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / torchannex-0.0.0-py3-none-any.whl

Download URL torchannex-0.0.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
271194a0a9a7e99ba668d9fb1b0ef887c0514d07206c1359bd0249995e452997
BLAKE2b-256 checksum
How to use checksums
1d6fb5aa44bf039554d43ed838afcc088499633d3d98682179f5e4e61c6e0709
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for torchannex 0.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page