Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/EmbarkStudios/pdm-plugin-torch
A tool for managing torch-variants with PDM.
https://github.com/EmbarkStudios/pdm-plugin-torch
Last synced: about 2 months ago
JSON representation
A tool for managing torch-variants with PDM.
- Host: GitHub
- URL: https://github.com/EmbarkStudios/pdm-plugin-torch
- Owner: EmbarkStudios
- License: apache-2.0
- Created: 2023-02-11T11:11:18.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-30T11:24:06.000Z (2 months ago)
- Last Synced: 2024-10-30T12:18:06.275Z (2 months ago)
- Language: Python
- Size: 117 KB
- Stars: 31
- Watchers: 8
- Forks: 5
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE-APACHE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-pdm - pdm-plugin-torch - A utility tool for selecting torch backend and version (Plugins)
README
# `🔦 pdm-plugin-torch `
A utility tool for selecting torch backend and version.
[![Embark](https://img.shields.io/badge/embark-open%20source-blueviolet.svg)](https://embark.dev)
[![Embark](https://img.shields.io/badge/discord-ark-%237289da.svg?logo=discord)](https://discord.gg/dAuKfZS)
[![Build status](https://badge.buildkite.com/968ac3c0bb075fb878f9f973ed91406c8b257b0f050c197542.svg?theme=github&branch=main)](https://buildkite.com/embark-studios/pdm-plugin-torch)
[![Docs status](https://img.shields.io/badge/Docs-latest-brightgreen)](https://embarkstudios.github.io/pdm-plugin-torch/)
[![pdm-managed](https://img.shields.io/badge/PDM-v2.8.0-blueviolet)](https://pdm.fming.dev)> **Warning**
> This plugin is unmaintained, and broken due to breaking in upstream APIs. It will not be updated here.## 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:
```toml
[tool.pdm.plugin.torch]
dependencies = [
"torch==1.10.2"
]
lockfile = "torch.lock"
enable-cpu = trueenable-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`.
``` toml
[tool.pdm]
plugins = ["pdm-plugin-torch==$VERSION"]
```## Contribution
[![Contributor Covenant](https://img.shields.io/badge/contributor%20covenant-v1.4-ff69b4.svg)](../main/CODE_OF_CONDUCT.md)
We welcome community contributions to this project.
Please read our [Contributor Guide](CONTRIBUTING.md) for more information on how to get started.
Please also read our [Contributor Terms](CONTRIBUTING.md#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](LICENSE-APACHE) or )
* MIT license ([LICENSE-MIT](LICENSE-MIT) or )at your option.
For clarity, "your" refers to Embark or any other licensee/user of the contribution.