From 48f589e18b8b6758dbfb6bb23b2994430893b477 Mon Sep 17 00:00:00 2001 From: youkaichao Date: Fri, 14 Jun 2024 10:02:23 -0700 Subject: [PATCH] [mis] fix flaky test of test_cuda_device_count_stateless (#5546) --- tests/distributed/test_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/distributed/test_utils.py b/tests/distributed/test_utils.py index b7ec59c7a2cc6..923ad66c2e08f 100644 --- a/tests/distributed/test_utils.py +++ b/tests/distributed/test_utils.py @@ -23,7 +23,8 @@ def test_cuda_device_count_stateless(): CUDA_VISIBLE_DEVICES is changed.""" actor = _CUDADeviceCountStatelessTestActor.options(num_gpus=2).remote() - assert ray.get(actor.get_cuda_visible_devices.remote()) == "0,1" + assert sorted(ray.get( + actor.get_cuda_visible_devices.remote()).split(",")) == ["0", "1"] assert ray.get(actor.get_count.remote()) == 2 ray.get(actor.set_cuda_visible_devices.remote("0")) assert ray.get(actor.get_count.remote()) == 1