Skip to content

Conversation

@alex-jw-brooks
Copy link
Contributor

@alex-jw-brooks alex-jw-brooks commented Feb 18, 2025

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

@github-actions
Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

@alex-jw-brooks alex-jw-brooks changed the title Warn if the vLLM version can't be retrieved [Misc] Warn if the vLLM version can't be retrieved Feb 19, 2025
Copy link
Member

@DarkLight1337 DarkLight1337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. cc @youkaichao

@DarkLight1337 DarkLight1337 enabled auto-merge (squash) February 20, 2025 03:40
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Feb 20, 2025
@DarkLight1337 DarkLight1337 merged commit 9621667 into vllm-project:main Feb 20, 2025
56 checks passed
xjpang pushed a commit to xjpang/vllm that referenced this pull request Feb 20, 2025
Akshat-Tripathi pushed a commit to krai/vllm that referenced this pull request Mar 3, 2025
lulmer pushed a commit to lulmer/vllm that referenced this pull request Apr 7, 2025
shreyankg pushed a commit to shreyankg/vllm that referenced this pull request May 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants