Skip to main content

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

Metadata

Release files for gpu-wait 0.4.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gpu-wait 0.4.9
File Size Uploaded
gpu_wait-0.4.9.tar.gz 3.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gpu-wait 0.4.9
File Interpreter ABI Platform
gpu_wait-0.4.9-py3-none-any.whl Python 3 none any Details

Total release size: 8.2 kB

Release files / gpu_wait-0.4.9.tar.gz

Download URL gpu_wait-0.4.9.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b4f103fd9fd06ba4b6d1cac5fc5c14a4a6d060dd5c4d4ff45426a452c0f1ea59
BLAKE2b-256 checksum
How to use checksums
3433abb83163abaafcf9c33b2bebc9e7663db63914a2b193419da6c92f1e4b5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.13

Release files / gpu_wait-0.4.9-py3-none-any.whl

Download URL gpu_wait-0.4.9-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f4dbda67370ce9baeb17b12784eab6e96162b6fba59d4f9cee678ae7ac648eb2
BLAKE2b-256 checksum
How to use checksums
8d10888c27e5ca3b9f0e6c987e4dc9e74081c77391db89849a25b88a4c08b8ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.13

Release history Release notifications | RSS feed

This release

0.4.9 This release

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

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