Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit 761ab33

Browse files
authored
Cast gpu_id to int (#203)
int conversion on gpu_id in ray_ddp.RayStrategy.root_device Signed-off-by: Matt <[email protected]>
1 parent 371cb19 commit 761ab33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ray_lightning/ray_ddp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ def root_device(self):
289289

290290
# Adjust to support multiple GPUs per worker or fractional
291291
# GPUs per worker.
292-
gpu_id = ray.get_gpu_ids()[0]
292+
gpu_id = int(ray.get_gpu_ids()[0])
293293
cuda_visible_str = os.environ.get("CUDA_VISIBLE_DEVICES", "")
294294
if cuda_visible_str and cuda_visible_str != "NoDevFiles":
295295
cuda_visible_list = [

0 commit comments

Comments
 (0)