-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Misc] Add generated git commit hash as
vllm.__commit__
(#6386)
- Loading branch information
Showing
5 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import vllm | ||
|
||
|
||
def test_embedded_commit_defined(): | ||
assert vllm.__commit__ != "COMMIT_HASH_PLACEHOLDER" | ||
# 7 characters is the length of a short commit hash | ||
assert len(vllm.__commit__) >= 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
import warnings | ||
|
||
try: | ||
import vllm.commit_id | ||
__commit__ = vllm.commit_id.__commit__ | ||
except Exception as e: | ||
warnings.warn(f"Failed to read commit hash:\n{e}", | ||
RuntimeWarning, | ||
stacklevel=2) | ||
__commit__ = "COMMIT_HASH_PLACEHOLDER" | ||
|
||
__version__ = "0.5.1" |