A package to run commands when GPU resources are available
Project description
GPU Wait
A Python package that monitors GPU resources and executes commands when the GPU becomes available.
Installation
pip install gpu-wait
Usage
Command Line Interface
# Run a command when any GPU is available
gpu-wait "python train.py"
# Wait for specific GPU
gpu-wait -d 0 "python train.py"
# Customize memory threshold and polling interval
gpu-wait -t 0.8 -i 5 "python train.py"
# Enable verbose logging
gpu-wait -v "python train.py"
Python API
from gpu_wait import GPUMonitor, CommandRunner
# Create monitor with custom threshold
monitor = GPUMonitor(memory_threshold=0.8)
# Create command runner
runner = CommandRunner(monitor)
# Run command when GPU is available
runner.run_when_available("python train.py")
Features
- Monitor single or multiple GPUs
- Customizable memory threshold and polling interval
- Command line interface
- Python API
- Logging support
Requirements
- Python 3.6+
- NVIDIA GPU
- nvidia-ml-py
- psutil
- click
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gpu_wait-0.4.7.tar.gz.
File metadata
- Download URL: gpu_wait-0.4.7.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad79eb98eee513875f43e9ecbece3e93edb8409151f2d5d67f364419fcefda90
|
|
| MD5 |
eeb92bdf1a3b2db610de58ea2c730c07
|
|
| BLAKE2b-256 |
cde0538f6b3056a956a4561593078d9d92cb207e429e5f42d340cc58933517ad
|
Provenance
The following attestation bundles were made for gpu_wait-0.4.7.tar.gz:
Publisher:
publish.yml on dipta007/gpu-wait
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gpu_wait-0.4.7.tar.gz -
Subject digest:
ad79eb98eee513875f43e9ecbece3e93edb8409151f2d5d67f364419fcefda90 - Sigstore transparency entry: 157829296
- Sigstore integration time:
-
Permalink:
dipta007/gpu-wait@5c479933f12289865412c14e291c65e05e7a70d1 -
Branch / Tag:
refs/tags/v0.4.7 - Owner: https://github.com/dipta007
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5c479933f12289865412c14e291c65e05e7a70d1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file gpu_wait-0.4.7-py3-none-any.whl.
File metadata
- Download URL: gpu_wait-0.4.7-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3af130a8ad42616be110fe21c33d85fb67418a4552b8d80af855f7b1ba9c71b9
|
|
| MD5 |
e65995d9ab4dac49af0dec466ffd950b
|
|
| BLAKE2b-256 |
0f5783f20311714c81e3b17f4c19c397afad803e23411ebadcb8dfb0625c5b3f
|
Provenance
The following attestation bundles were made for gpu_wait-0.4.7-py3-none-any.whl:
Publisher:
publish.yml on dipta007/gpu-wait
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gpu_wait-0.4.7-py3-none-any.whl -
Subject digest:
3af130a8ad42616be110fe21c33d85fb67418a4552b8d80af855f7b1ba9c71b9 - Sigstore transparency entry: 157829297
- Sigstore integration time:
-
Permalink:
dipta007/gpu-wait@5c479933f12289865412c14e291c65e05e7a70d1 -
Branch / Tag:
refs/tags/v0.4.7 - Owner: https://github.com/dipta007
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5c479933f12289865412c14e291c65e05e7a70d1 -
Trigger Event:
release
-
Statement type: