Skip to main content

image

The vegvísir (Icelandic for "wayfinder", lit. 'way shower') is an Icelandic magical stave intended to help the bearer find their way through rough weather. The earliest known attestation is in the 1860 Huld manuscript. (Wikipedia)

Torchvisir

Of the many horrors AI have brought upon us, one of the least talked about is having to install the correct version of pytorch 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 you shouldn't need any of this, but you can poke at things if you really want to.

tv.load_data('my_folder_with/pci2target-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:

  • Detect supported python versions
  • Documentation

Metadata

Release files for torchvisir 0.0.7

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

Source distribution (sdist)

Source distribution for torchvisir 0.0.7
File Size Uploaded Provenance Actions
torchvisir-0.0.7.tar.gz 10.0 kB Without provenance Details for torchvisir-0.0.7.tar.gz

Built distribution (wheel)

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

Total release size: 19.1 kB

Release files / torchvisir-0.0.7.tar.gz

Download URL torchvisir-0.0.7.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5df981041969595dc99e2996b50dc83a3308cda72fdbbfd0866cbab1715acb70
BLAKE2b-256 checksum
How to use checksums
9aaf82706618cec4225d507d8c22cd1eea3cadf970e5f48019ba0e9658fd2e71
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.7-py3-none-any.whl

Download URL torchvisir-0.0.7-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
144110f62dbf6eee5d018fa2e3f6e539ccf4bccd6b013af235c970b57c8425bb
BLAKE2b-256 checksum
How to use checksums
46caf61b1299fff064022abb816f9b0141b94573083f5e5d1d8baf642f456614
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.7

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.

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