ray/release/nightly_tests/dataset/wait_cluster.py

10 lines
196 B
Python
Raw Normal View History

2021-08-01 18:03:46 -07:00
import ray
import time
ray.init()
while ray.cluster_resources().get("GPU", 0) != 2:
print("Waiting for GPUs {}/2".format(ray.cluster_resources().get(
"GPU", 400)))
time.sleep(5)