A plugin to help installing torch versions
Project description
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.plugins.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
Currently PDM does not support specifying plugin-dependencies in your pyproject.toml. Thus, we suggest using a setup like the following:
[tool.pdm.scripts]
post_install = "pdm plugin add pdm-plugin-torch==$VERSION"
Contribution
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
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
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
Built Distribution
File details
Details for the file pdm-plugin-torch-23.1.0.tar.gz
.
File metadata
- Download URL: pdm-plugin-torch-23.1.0.tar.gz
- Upload date:
- Size: 14.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.4.9 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d3d429d43a6843daa3965b36e878aa87ccb7c0c9245981085de290e700cf8ae |
|
MD5 | fd7debd26151df15727f6fa2abfdd500 |
|
BLAKE2b-256 | 709a4451d506e9531041b5ad42ff670d3d43acde998d422a8306c49c620f759c |
File details
Details for the file pdm_plugin_torch-23.1.0-py3-none-any.whl
.
File metadata
- Download URL: pdm_plugin_torch-23.1.0-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.4.9 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55c7b51488dc5174446d938cc2e099852e1ff0bece28fa377a62ae859527dc27 |
|
MD5 | 9f9730ad912aa6755a5756b70e51ec61 |
|
BLAKE2b-256 | cf5418dba21e888f7432a399fd69bfea302be3d8a98ce1c747067999752c5599 |