[Bugfix] Ignore ray reinit error when current platform is ROCm or XPU (#10375)

Signed-off-by: Hollow Man <hollowman@opensuse.org>
This commit is contained in:
ℍ𝕠𝕝𝕝𝕠𝕨 𝕄𝕒𝕟 2024-11-18 05:29:26 +02:00 committed by GitHub
parent c4e464333e
commit 47826cacf0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -234,7 +234,7 @@ def initialize_ray_cluster(
if current_platform.is_rocm() or current_platform.is_xpu():
# Try to connect existing ray instance and create a new one if not found
try:
ray.init("auto")
ray.init("auto", ignore_reinit_error=True)
except ConnectionError:
logger.warning(
"No existing RAY instance detected. "