[Bugfix][CI] Import ray under guard (#7486)

This commit is contained in:
Woosuk Kwon 2024-08-13 17:12:58 -07:00 committed by GitHub
parent a08df8322e
commit 59edd0f134
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,3 @@
import ray
import torch
import torch.distributed as dist
from torch.distributed import ProcessGroup
@ -6,6 +5,7 @@ from torch.distributed import ProcessGroup
from vllm.platforms import current_platform
if current_platform.is_tpu():
import ray
import torch_xla.core.xla_model as xm
import torch_xla.runtime as xr
from torch_xla._internal import pjrt