Skip to content

Commit 6ea2963

Browse files
youkaichaosumitd2
authored andcommitted
[misc] fix collect env (vllm-project#8894)
Signed-off-by: Sumit Dubey <sumit.dubey2@ibm.com>
1 parent 7ab6c66 commit 6ea2963

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

collect_env.py

+14-4
Original file line numberDiff line numberDiff line change
@@ -267,13 +267,23 @@ def get_neuron_sdk_version(run_lambda):
267267

268268

269269
def get_vllm_version():
270+
version = ""
270271
try:
271272
import vllm
272-
return vllm.__version__ + "@" + vllm.__commit__
273+
version = vllm.__version__
273274
except Exception:
274-
# old version of vllm does not have __commit__
275-
return 'N/A'
276-
275+
pass
276+
commit = ""
277+
try:
278+
import vllm
279+
commit = vllm.__commit__
280+
except Exception:
281+
pass
282+
if version != "" and commit != "":
283+
return f"{version}@{commit}"
284+
if version == "" and commit == "":
285+
return "N/A"
286+
return version or commit
277287

278288
def summarize_vllm_build_flags():
279289
# This could be a static method if the flags are constant, or dynamic if you need to check environment variables, etc.

0 commit comments

Comments
 (0)