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

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.6
File Size Uploaded Provenance Actions
torchvisir-0.0.6.tar.gz 9.5 kB Without provenance Details for torchvisir-0.0.6.tar.gz

Built distribution (wheel)

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

Total release size: 18.2 kB

Release files / torchvisir-0.0.6.tar.gz

Download URL torchvisir-0.0.6.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a7b2499ce3fa90d77deef40c795671eab19aca855aff1a7f2efb911d9f61644a
BLAKE2b-256 checksum
How to use checksums
0576c570f000f56f9c91376c5aabfa9934c92cd29d5b6aee9a7bbda487d29c41
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.6-py3-none-any.whl

Download URL torchvisir-0.0.6-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ea22f7bffbd335f874d5d6d90a2537f83e9c277a5c661c7c1bdac92939062c2c
BLAKE2b-256 checksum
How to use checksums
d8ea9603ce263f63cafd155eb5b3722f08ba0f3c10707deddb48cda015cf95b5
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.6

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