Fix import vllm condition (#11682)

This commit is contained in:
Guancheng Fu 2024-07-31 13:50:01 +08:00 committed by GitHub
parent 54bf3a23a6
commit afeca38a47
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -73,7 +73,7 @@ def is_vllm_available():
import sys
original_path = sys.path
# Temporally remove current directory
sys.path = [p for p in sys.path if p != '']
sys.path = original_path[1:]
_IS_VLLM_AVAILABLE = importlib.util.find_spec("vllm") is not None
sys.path = original_path
return _IS_VLLM_AVAILABLE