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

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

Built distribution (wheel)

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

Total release size: 19.6 kB

Release files / torchvisir-0.0.5.tar.gz

Download URL torchvisir-0.0.5.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f8ec86781bc3374205ed92b4decaf25644e7baea8095230e9a05317d208664fe
BLAKE2b-256 checksum
How to use checksums
40d34fec5f852aac3625ef694a26b0e8aeb0bbc31109195199783de71b44e9c8
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.5-py3-none-any.whl

Download URL torchvisir-0.0.5-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c5c0ab964334493334f3e808397c015410048ff4fc9724b69140f1163bb2439b
BLAKE2b-256 checksum
How to use checksums
d9367ed6f70656897be933423177b79eaf91b145461e79148e8488be4c881c45
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.5

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