A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 16, 15:45 UTC
[misc] fix collect env (#8894)
youkaichao committed
Sep 27, 2024 at 00:26 UTC
dc4e3df5c23282b2ebaead95f179c25c9d7ec4d8
1 file changed
+14
-4
collect_env.py
+14
-4
@@ -267,13 +267,23 @@ def get_neuron_sdk_version(run_lambda):
267
268
269
def get_vllm_version():
270
+ version = ""
271
try:
272
import vllm
272
- return vllm.__version__ + "@" + vllm.__commit__
273
+ version = vllm.__version__
274
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
287
288
def summarize_vllm_build_flags():
289
# This could be a static method if the flags are constant, or dynamic if you need to check environment variables, etc.