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.4

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.4
File Size Uploaded Provenance Actions
torchvisir-0.0.4.tar.gz 10.2 kB Without provenance Details for torchvisir-0.0.4.tar.gz

Built distribution (wheel)

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

Total release size: 19.6 kB

Release files / torchvisir-0.0.4.tar.gz

Download URL torchvisir-0.0.4.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ab9e5eb1458bc3d5a46a1d1a9eba427f0edf16d61eb9c0a87b3c6060aac73297
BLAKE2b-256 checksum
How to use checksums
abb13861d1bf5666606f4250e23ac37c5e9e24fd5bbec846f7a8b2aadf0298e0
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.4-py3-none-any.whl

Download URL torchvisir-0.0.4-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0443d0c939227e5db036d997275d5303949886821b686b7053c268833897a852
BLAKE2b-256 checksum
How to use checksums
532a5de8745156a9a3b3e574726a4f9f82ff77343d015f5cba464c24af1212fa
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.4

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