[Bugfix][CI] Import ray under guard (#7486)
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
import ray
|
|
||||||
import torch
|
import torch
|
||||||
import torch.distributed as dist
|
import torch.distributed as dist
|
||||||
from torch.distributed import ProcessGroup
|
from torch.distributed import ProcessGroup
|
||||||
@@ -6,6 +5,7 @@ from torch.distributed import ProcessGroup
|
|||||||
from vllm.platforms import current_platform
|
from vllm.platforms import current_platform
|
||||||
|
|
||||||
if current_platform.is_tpu():
|
if current_platform.is_tpu():
|
||||||
|
import ray
|
||||||
import torch_xla.core.xla_model as xm
|
import torch_xla.core.xla_model as xm
|
||||||
import torch_xla.runtime as xr
|
import torch_xla.runtime as xr
|
||||||
from torch_xla._internal import pjrt
|
from torch_xla._internal import pjrt
|
||||||
|
|||||||
Reference in New Issue
Block a user