[mypy] Enable type checking for test directory (#5017)
This commit is contained in:
@@ -6,7 +6,7 @@ from vllm.utils import cuda_device_count_stateless
|
||||
|
||||
|
||||
@ray.remote
|
||||
class _CUDADeviceCountStatelessTestActor():
|
||||
class _CUDADeviceCountStatelessTestActor:
|
||||
|
||||
def get_count(self):
|
||||
return cuda_device_count_stateless()
|
||||
@@ -22,7 +22,8 @@ def test_cuda_device_count_stateless():
|
||||
"""Test that cuda_device_count_stateless changes return value if
|
||||
CUDA_VISIBLE_DEVICES is changed."""
|
||||
|
||||
actor = _CUDADeviceCountStatelessTestActor.options(num_gpus=2).remote()
|
||||
actor = _CUDADeviceCountStatelessTestActor.options( # type: ignore
|
||||
num_gpus=2).remote()
|
||||
assert sorted(ray.get(
|
||||
actor.get_cuda_visible_devices.remote()).split(",")) == ["0", "1"]
|
||||
assert ray.get(actor.get_count.remote()) == 2
|
||||
|
||||
Reference in New Issue
Block a user