mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-05-11 22:13:42 +08:00
[Small] Capture AttributeError when checking ray dependency. (#29024)
Signed-off-by: Chenheli Hua <huachenheli@outlook.com>
This commit is contained in:
parent
b4734b9550
commit
e4c3182c68
@ -10,6 +10,8 @@ def is_ray_initialized():
|
|||||||
return ray.is_initialized()
|
return ray.is_initialized()
|
||||||
except ImportError:
|
except ImportError:
|
||||||
return False
|
return False
|
||||||
|
except AttributeError:
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
def is_in_ray_actor():
|
def is_in_ray_actor():
|
||||||
@ -24,3 +26,5 @@ def is_in_ray_actor():
|
|||||||
)
|
)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
return False
|
return False
|
||||||
|
except AttributeError:
|
||||||
|
return False
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user