Torchvisir
Of the many horrors AI have brought upon us, one of the least talked about is having to install the correct version of pytoch to match the GPU, operating system and application. This tool will hopefully take care of that.
Usage
In the simplest form, all you need is this. This will detect PCI devices, load the default data and install torch with pip.
from torchvisir import Torchvisir
Torchvisir().install_torch()
If you prefer to do each step manually you can do that.
tv = Torchvisir()
tv.get_pci_ids()
tv.get_torch_targets()
tv.install_torch()
All data, and most of the logic, are saved as json. You can change or add devices as you wish.
Like adding your own PCI devices, a folder with json files or a python dict. Same with vendor repositories.
In normal cases ytou shouldn't need any of this, but you can poke at things if you really want to.
tv.load_data('my_folder_with/pci2taget-mappings/')
tv.data['pci_id_data']['ffff:ffff'] = 'visir-gpu123' # Imaginary GPU
tv.data['repos']['VisirGPUs'] = {
"pattern": "^visir-gpu",
"index_url": "https://localhost/visir-whl/",
"pkgs": [
"torch==2.14.0+my_vgpu",
"torchvision==0.29.0+my_vgpu",
"torchaudio==2.11.0.3+my_vgpu"
]
}
tv.load_data('my_other_folder_with/repos')
tv.pci_ids = ["ffff:ffff"] # Pretend we detected our fake GPU
print(tv.install_torch(dry_run=True))
TODO
Torchvisir is in early development, there are still a lot of things that needs to be fixed:
- CPU fallback
- Detect supported python versions
- Documentation
Metadata
Release files for torchvisir 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| torchvisir-0.0.3.tar.gz | 9.9 kB | Without provenance | Details for torchvisir-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| torchvisir-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for torchvisir-0.0.3-py3-none-any.whl |
Total release size: 18.9 kB
Release files / torchvisir-0.0.3.tar.gz
| Download URL | torchvisir-0.0.3.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
166fcadbfc7bd566883b46aa7468dab885857c5d00cef1d28fac666c6a0a6c91
|
|
BLAKE2b-256 checksum How to use checksums |
628fa469cfa3614759a5ea1f38306ddcb35ae0b76b16fe5cf5df84033413b377
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / torchvisir-0.0.3-py3-none-any.whl
| Download URL | torchvisir-0.0.3-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d18a8e451b861170852ee8f210e3011ab8342d63176250f65bab6aec6400311f
|
|
BLAKE2b-256 checksum How to use checksums |
bdc372a6235fc3ddcf53b90a40f40fcb4dff509f2b94044b2d0743c7669380bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for torchvisir 0.0.3
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.