Skip to main content

A plugin to help installing torch versions

Project description

🔦 pdm-plugin-torch

A utility tool for selecting torch backend and version.

Embark Embark Build status Docs status pdm-managed

What it does

Due to torch being published in many different variants with local versions to signify the underlying API, it is hard to integrate into a lockfile-based workflow. This is due to the local versions - +cu111, +cpu, and so on - being considered the "same" package, so you can't resolve two at the same time.

This tool generate multiple lockfiles only for torch and allows you to use a pdm subcommand (pdm torch) to select the one you want.

Configuration

These are the supported options:

[tool.pdm.plugin.torch]
dependencies = [
   "torch==1.10.2"
]
lockfile = "torch.lock"
enable-cpu = true

enable-rocm = true
rocm-versions = ["4.2"]

enable-cuda = true
cuda-versions = ["cu111", "cu113"]

Installation

PDM supports specifying plugin-dependencies in your pyproject.toml, which is the suggested installation method. Note that in pdm-plugin-torch versions before 23.4.0, our configuration was in tool.pdm.plugins.torch. If upgrading, you'll need to also change that to tool.pdm.plugin.torch.

[tool.pdm]
plugins = ["pdm-plugin-torch==$VERSION"]

Contribution

Contributor Covenant

We welcome community contributions to this project.

Please read our Contributor Guide for more information on how to get started. Please also read our Contributor Terms before you make any contributions.

Any contribution intentionally submitted for inclusion in an Embark Studios project, shall comply with the Rust standard licensing model (MIT OR Apache 2.0) and therefore be dual licensed as described below, without any additional terms or conditions:

License

This contribution is dual licensed under EITHER OF

at your option.

For clarity, "your" refers to Embark or any other licensee/user of the contribution.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdm_plugin_torch-23.4.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

pdm_plugin_torch-23.4.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file pdm_plugin_torch-23.4.0.tar.gz.

File metadata

  • Download URL: pdm_plugin_torch-23.4.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.10.1 CPython/3.10.12

File hashes

Hashes for pdm_plugin_torch-23.4.0.tar.gz
Algorithm Hash digest
SHA256 69cd8aeada2890d138ab717f94b2c23862e2116433d096eff0638e1357a8bfe5
MD5 1cce648125530773062ce688d567b701
BLAKE2b-256 521c26503051b7a8ae1e60818d4ffb2f56b57a2119ae632a0f98cb646bc19786

See more details on using hashes here.

File details

Details for the file pdm_plugin_torch-23.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pdm_plugin_torch-23.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc60752f7ddafe002a7a5ae1cc0df39d3f3bee96866d3384274d63aeb277f2b4
MD5 ab7f360e016d5716c40c8431de8b01cb
BLAKE2b-256 97a4502b3f19c969c2a7ed47fd97ef679482a701b4a03103ccfcfb9aa45e5765

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page