Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Misc] Add generated git commit hash as vllm.__commit__ #6386

Merged
merged 2 commits into from
Jul 12, 2024

Conversation

mgoin
Copy link
Member

@mgoin mgoin commented Jul 12, 2024

This PR embeds the current git commit hash of the source code into the installed library.

  1. The hash itself is defined in the __commit_ variable in vllm/version.py alongside __version__, with an initial dummy string "COMMIT_HASH_PLACEHOLDER"
  2. It writes the commit id to the untracked vllm/commit_id.py file instead of modifying version.py, mainly to prevent somebody from accidentally committing their commit IDs, and to keep setup.py from polluting developers' git status.

After you run pip install -e ., you should see something like:

>>> import vllm
>>> print(vllm.__version__)
0.5.1
>>> print(vllm.__commit__)
eb7557fbb40553ff4e4f7cd8dedd4297d1bb2111

@mgoin mgoin added the ready ONLY add when PR is ready to merge/full CI is needed label Jul 12, 2024
@mgoin mgoin requested a review from comaniac July 12, 2024 19:30
Copy link

👋 Hi! Thank you for contributing to the vLLM project.
Just a reminder: PRs would not trigger full CI run by default. Instead, it would only trigger fastcheck CI to run, which consists only a small and essential subset of tests to quickly catch small errors.

Full CI run is still required to merge this PR so please make sure that you run full CI before merging or if you need more test signals.

To run full CI, you can do one of these:

  • Add ready label to the PR
  • Comment /ready on the PR
  • Enable auto-merge.

🚀

@mgoin mgoin requested a review from simon-mo July 12, 2024 19:32
Copy link
Collaborator

@comaniac comaniac left a comment

Choose a reason for hiding this comment

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

LGTM!

@mgoin mgoin enabled auto-merge (squash) July 12, 2024 19:56
@mgoin mgoin merged commit 111fc6e into main Jul 12, 2024
87 checks passed
@youkaichao youkaichao deleted the commit-hash-version branch July 13, 2024 01:52
@youkaichao
Copy link
Member

@mgoin this actually does not work in ci. all ci jobs have this warning now. see https://buildkite.com/vllm/ci-aws/builds/4840#0190a94d-30c0-4ef4-96fa-55d943ac116b/178-326 for example.

the test you add, is not run in ci I think.

dtrifiro pushed a commit to opendatahub-io/vllm that referenced this pull request Jul 17, 2024
xjpang pushed a commit to xjpang/vllm that referenced this pull request Jul 24, 2024
Alvant pushed a commit to compressa-ai/vllm that referenced this pull request Oct 26, 2024
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.

3 participants