vllm icon indicating copy to clipboard operation
vllm copied to clipboard

Warn if the vLLM version can't be retrieved

Open alex-jw-brooks opened this issue 4 days ago • 1 comments

There are a few checks that vLLM runs when inferring the platform that rely on inspecting the version of the vLLM package (i.e., via importlib.metadata.version). If the vLLM package isn't installed though, the import error will be swallowed, and it can result in the platform not being undetectable. There are a few situations in which this could happen, e.g., running vLLM in a dev environment where the source was been cloned & shared objects were copied from a release, but the project is just on the python path instead of installed into site packages.

This PR wraps the calls to version("vllm") to warn if a PackageNotFoundError is thrown to try to help make it more clear if this is the cause of platform resolution failing, e.g.,

WARNING 02-18 22:05:50 __init__.py:26] The vLLM package was not found, so its version could not be inspected. This may cause platform detection to fail.
WARNING 02-18 22:05:50 __init__.py:26] The vLLM package was not found, so its version could not be inspected. This may cause platform detection to fail.
WARNING 02-18 22:05:50 __init__.py:26] The vLLM package was not found, so its version could not be inspected. This may cause platform detection to fail.
INFO 02-18 22:05:50 __init__.py:210] No platform detected, vLLM is running on UnspecifiedPlatform

alex-jw-brooks avatar Feb 18 '25 22:02 alex-jw-brooks