Skip to main content

vllpy

This is a package with common utility functions, files and pipelines for the Visual Learning Lab. This package uses python>=3.11.

It is recommended you create a conda environment to start using this package but this step is optional. To do so, run the commands below:

conda create -n vislearnlabpy python=3.12
conda activate vislearnlabpy

Then, activate the environment and simply install vislearnlabpy and CLIP by running the commands below in your terminal.

pip install --upgrade vislearnlabpy
pip install git+https://github.com/openai/CLIP.git

You may also have to install PyTorch manually, ensuring that you have the right version but the right version may also be installed by default with CLIP. To install the right version of PyTorch on the Tversky server, run:

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

Here is as an example of how to generate a CSV file with embeddings from a list of images in a directory. You can also use this to generate npy files and doc files by changing the output type in the command below, and generate the embeddings from a CSV file instead by using input_file instead of input_dir

python embedding_generator.py --input_dir examples/input --output_path examples/output --output_type csv --overwrite --model_name clip

Here is an example of how to generate npy files for embeddings from a list of images within subdirectories in a folder on Tversky using the dinov3-babyview model (other available models include dinov3, dinov2, dino_say_vitb14, dino_imagenet100_vitb14 and clip). For certain models, you will need a HuggingFace account and a HuggingFace access token. Set HF_TOKEN=xxxx in a .env file in the main directory of your project to be able to access restricted models. Also note that by default, npy files are generated in parallel using Ray with all available GPUs. To use specific GPUs, like the first and second GPUs for example, try using export CUDA_VISIBLE_DEVICES=0,1 Ideally run this command in a tmux window if you have a large input directory.

python embedding_generator.py --input_dir /labs/vislearnlab/data/THINGS-dataset/object_images --output_path /labs/vislearnlab/data/THINGS-dataset/things_embeddings --output_type npy --overwrite --model_name dinov3-babyview --subdirs --batch_size 1000 --ray_temp_dir /Scratch/tmp/ray

For more detailed examples, please look at the demo in the Jupyter notebooks within the examples folder.

Metadata

Release files for vislearnlabpy 0.0.4.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 vislearnlabpy 0.0.4.7
File Size Uploaded Provenance Actions
vislearnlabpy-0.0.4.7.tar.gz 58.7 kB Without provenance Details for vislearnlabpy-0.0.4.7.tar.gz

Built distribution (wheel)

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

Total release size: 124.6 kB

Release files / vislearnlabpy-0.0.4.7.tar.gz

Download URL vislearnlabpy-0.0.4.7.tar.gz
Size 58.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0a578da88d282dfeb3ab280650dcf5c6f1dedb4dd73bcf2406d19ba6cbfa71d2
BLAKE2b-256 checksum
How to use checksums
11be5c5125dfb0c86a4f75a44e31fc1c070d16796096dea81f83b825653264cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Release files / vislearnlabpy-0.0.4.7-py3-none-any.whl

Download URL vislearnlabpy-0.0.4.7-py3-none-any.whl
Size 66.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9d66884a462192ac0ab77c2a8674baf09e411e317ee58229fd663cd141fe2217
BLAKE2b-256 checksum
How to use checksums
86de43d1b3aa2884fef74313fac89af64efb8e9bf4d677fa3fc9a7aab3ff9f42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Security for vislearnlabpy 0.0.4.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.

Release history Release notifications | RSS feed

This release

0.0.4.7 This release

2 release files No provenance

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