A simple utility to execute your deep learning scripts when there are enough idle gpus
Project description
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)
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
wait4gpu-0.0.1.tar.gz
(3.7 kB
view details)
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 wait4gpu-0.0.1.tar.gz.
File metadata
- Download URL: wait4gpu-0.0.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30c129999970d24339befc10bd32144ef73617daa571de3d2baf5bd65b25cfe0
|
|
| MD5 |
e1873963cf400917494dcd96091cfdc2
|
|
| BLAKE2b-256 |
bbaaa33debefc7223d582d4f4f3694c14dc8e409ecfe597c7e6fee2b9f90d068
|
File details
Details for the file wait4gpu-0.0.1-py3-none-any.whl.
File metadata
- Download URL: wait4gpu-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
154ffdd4c3367db3812f63fda80a070e0d01285e875fe5f6696785e5536a9af2
|
|
| MD5 |
e76ac0272e60e9423f3763989347d964
|
|
| BLAKE2b-256 |
4028cb0635925cbef66275fca61d0d116f2ae35bb7eb9b3fca8eee93100c47fc
|