Remove instances of 'raise Exception' (#7523)

This commit is contained in:
Edward Oakes
2020-03-10 17:51:22 -07:00
committed by GitHub
parent fdb528514b
commit 7b609ca211
13 changed files with 134 additions and 131 deletions
+3 -3
View File
@@ -144,9 +144,9 @@ class ResourceSpec(
# excede the amount allowed by CUDA_VISIBLE_DEVICES.
if (num_gpus is not None and gpu_ids is not None
and num_gpus > len(gpu_ids)):
raise Exception("Attempting to start raylet with {} GPUs, "
"but CUDA_VISIBLE_DEVICES contains {}.".format(
num_gpus, gpu_ids))
raise ValueError("Attempting to start raylet with {} GPUs, "
"but CUDA_VISIBLE_DEVICES contains {}.".format(
num_gpus, gpu_ids))
if num_gpus is None:
# Try to automatically detect the number of GPUs.
num_gpus = _autodetect_num_gpus()