Skip to content

Commit

Permalink
[misc] fix collect env (vllm-project#8894)
Browse files Browse the repository at this point in the history
  • Loading branch information
youkaichao authored Sep 27, 2024
1 parent 3b49e01 commit b2215e8
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions collect_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,23 @@ def get_neuron_sdk_version(run_lambda):


def get_vllm_version():
version = ""
try:
import vllm
return vllm.__version__ + "@" + vllm.__commit__
version = vllm.__version__
except Exception:
# old version of vllm does not have __commit__
return 'N/A'

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

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.
Expand Down

0 comments on commit b2215e8

Please sign in to comment.