[BugFix] Don't start a Ray cluster when not using Ray (#5570)
This commit is contained in:
parent
d919ecc771
commit
1c0afa13c5
@ -616,9 +616,14 @@ class ParallelConfig:
|
||||
"required for multi-node inference")
|
||||
backend = "ray"
|
||||
elif ray_found:
|
||||
from ray.util import get_current_placement_group
|
||||
if self.placement_group or get_current_placement_group():
|
||||
if self.placement_group:
|
||||
backend = "ray"
|
||||
else:
|
||||
from ray import is_initialized as ray_is_initialized
|
||||
if ray_is_initialized():
|
||||
from ray.util import get_current_placement_group
|
||||
if get_current_placement_group():
|
||||
backend = "ray"
|
||||
self.distributed_executor_backend = backend
|
||||
logger.info("Defaulting to use %s for distributed inference",
|
||||
backend)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user