Wait4GPU
A simple utility to execute your deep learning scripts when there are enough idle gpus.
一个在有足够的空闲gpu时执行深度学习训练的小工具
Install
python setup.py install
Usage
As a command wrapper
python3 -m Wait4GPU [--num-required NUM_REQUIRED] [--no-python] training_script
Example:
# train `atss_r50_fpn_1x_coco.py` with 1 gpu using mmdetection
python3 -m Wait4GPU tools/train.py configs/atss/atss_r50_fpn_1x_coco.py
# train `atss_r50_fpn_1x_coco.py` with 2 gpus using mmdetection
python3 -m Wait4GPU --num-required 2 --no-python ./tools/dist_train.sh configs/atss/atss_r50_fpn_1x_coco.py 2
You may refer to Wait4GPU/__main__.py for more detailed usage.
Integrate with your code
from Wait4GPU.wait4gpu import wait_until_idle
import os
available = wait_until_idle(num_req=2)
os.environ["CUDA_VISIBLE_DEVICES"] = ",".join(available)
Metadata
Release files for wait4gpu 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wait4gpu-0.0.1.tar.gz | 3.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wait4gpu-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.1 kB
Release files / wait4gpu-0.0.1.tar.gz
| Download URL | wait4gpu-0.0.1.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30c129999970d24339befc10bd32144ef73617daa571de3d2baf5bd65b25cfe0
|
|
BLAKE2b-256 checksum How to use checksums |
bbaaa33debefc7223d582d4f4f3694c14dc8e409ecfe597c7e6fee2b9f90d068
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.5
|
Release files / wait4gpu-0.0.1-py3-none-any.whl
| Download URL | wait4gpu-0.0.1-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
154ffdd4c3367db3812f63fda80a070e0d01285e875fe5f6696785e5536a9af2
|
|
BLAKE2b-256 checksum How to use checksums |
4028cb0635925cbef66275fca61d0d116f2ae35bb7eb9b3fca8eee93100c47fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.5
|