mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-11 09:45:42 +08:00
[misc] fix collect env (#8894)
This commit is contained in:
parent
3b00b9c26c
commit
dc4e3df5c2
@ -267,13 +267,23 @@ def get_neuron_sdk_version(run_lambda):
|
|||||||
|
|
||||||
|
|
||||||
def get_vllm_version():
|
def get_vllm_version():
|
||||||
|
version = ""
|
||||||
try:
|
try:
|
||||||
import vllm
|
import vllm
|
||||||
return vllm.__version__ + "@" + vllm.__commit__
|
version = vllm.__version__
|
||||||
except Exception:
|
except Exception:
|
||||||
# old version of vllm does not have __commit__
|
pass
|
||||||
return 'N/A'
|
commit = ""
|
||||||
|
try:
|
||||||
|
import vllm
|
||||||
|
commit = vllm.__commit__
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
if version != "" and commit != "":
|
||||||
|
return f"{version}@{commit}"
|
||||||
|
if version == "" and commit == "":
|
||||||
|
return "N/A"
|
||||||
|
return version or commit
|
||||||
|
|
||||||
def summarize_vllm_build_flags():
|
def summarize_vllm_build_flags():
|
||||||
# This could be a static method if the flags are constant, or dynamic if you need to check environment variables, etc.
|
# This could be a static method if the flags are constant, or dynamic if you need to check environment variables, etc.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user