File tree 1 file changed +14
-4
lines changed
1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -267,13 +267,23 @@ def get_neuron_sdk_version(run_lambda):
267
267
268
268
269
269
def get_vllm_version ():
270
+ version = ""
270
271
try :
271
272
import vllm
272
- return vllm . __version__ + "@" + vllm .__commit__
273
+ version = vllm .__version__
273
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
277
287
278
288
def summarize_vllm_build_flags ():
279
289
# This could be a static method if the flags are constant, or dynamic if you need to check environment variables, etc.
You can’t perform that action at this time.
0 commit comments