[CI/Build] setuptools-scm fixes (#8900)

This commit is contained in:
Daniele
2024-10-14 11:34:47 -07:00
committed by GitHub
parent 4141608c6a
commit 203ab8f80f
7 changed files with 47 additions and 41 deletions
+10 -17
View File
@@ -267,23 +267,16 @@ def get_neuron_sdk_version(run_lambda):
def get_vllm_version():
version = ""
try:
import vllm
version = vllm.__version__
except Exception:
pass
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
from vllm import __version__, __version_tuple__
if __version__ == "dev":
return "N/A (dev)"
if len(__version_tuple__) == 4: # dev build
git_sha = __version_tuple__[-1][1:] # type: ignore
return f"{__version__} (git sha: {git_sha}"
return __version__
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.