This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
forked from vllm-project/vllm
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
SUMMARY: * update GHA action `nm-build-vllm` to not install `nm-magic-wand-nightly` * update build script to not install `nm-magic-wand-nightly` (we might consider getting rid of this script altogether, since we aren't really using it) * remove unused GHA action `nm-test-vllm`. this has been superseded by `nm-install-test-whl` * update GHA action `nm-install-test-whl` to get version of `nm-magic-wand` if `nm-magic-wand-nightly` is not present * update `setup.py` to default generate "nightly" package and add option based on ENV to generate release package. this also includes managing the dependency on `nm-magic-wand`. * update `set-env` action to set ENV based on `wf_category` input * update "release" workflow to include all supported python versions * delete obsolete "gen-whl" NOTES: - "magic-wand" is only a runtime dependency, so no need to install it during build phase. - this PR makes it so that we by default generate a "nightly" package with a "nightly" version number. if we want to generate a release package we'll need to specify `wf_category` as `RELEASE`. TEST PLAN: runs on remote push. verifying that `wf_category` set to `RELEASE` will generate appropriate package. ran "build" workflow with `wf_category` set to `RELEASE` ... package looks properly named and versioned ... https://github.com/neuralmagic/nm-vllm/actions/runs/9129675592 the "remote push" defaulted to generating a "nightly" package ... please see ... https://github.com/neuralmagic/nm-vllm/actions/runs/9129665988 Co-authored-by: andy-neuma <[email protected]>
- Loading branch information
1 parent
9ea5c95
commit c9d9587
Showing
10 changed files
with
107 additions
and
86 deletions.
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
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
# UPSTREAM SYNC: noqa is required for passing ruff. | ||
# This file has been modified by Neural Magic | ||
|
||
import datetime | ||
import importlib.util | ||
import io | ||
import logging | ||
|
@@ -306,9 +307,28 @@ def find_version(filepath: str) -> str: | |
raise RuntimeError("Unable to find version string.") | ||
|
||
|
||
# Neuralmagic packaging ENV's | ||
NM_RELEASE_TYPE = 'NM_RELEASE_TYPE' | ||
|
||
|
||
def get_nm_vllm_package_name() -> str: | ||
nm_release_type = os.getenv(NM_RELEASE_TYPE) | ||
package_name = None | ||
if nm_release_type == 'RELEASE': | ||
package_name = 'nm-vllm' | ||
else: | ||
package_name = 'nm-vllm-nightly' | ||
return package_name | ||
|
||
|
||
def get_vllm_version() -> str: | ||
version = find_version(get_path("vllm", "__init__.py")) | ||
|
||
nm_release_type = os.getenv(NM_RELEASE_TYPE) | ||
if nm_release_type != 'RELEASE': | ||
date = datetime.date.today().strftime("%Y%m%d") | ||
version += f'.{date}' | ||
|
||
if _is_cuda(): | ||
cuda_version = str(get_nvcc_cuda_version()) | ||
if cuda_version != MAIN_CUDA_VERSION: | ||
|
@@ -393,6 +413,9 @@ def _read_requirements(filename: str) -> List[str]: | |
|
||
# UPSTREAM SYNC: needed for sparsity | ||
_sparsity_deps = ["nm-magic-wand-nightly"] | ||
nm_release_type = os.getenv(NM_RELEASE_TYPE) | ||
if nm_release_type == 'RELEASE': | ||
_sparsity_deps = ["nm-magic-wand"] | ||
|
||
package_data = { | ||
"vllm": ["py.typed", "model_executor/layers/fused_moe/configs/*.json"] | ||
|
@@ -402,7 +425,7 @@ def _read_requirements(filename: str) -> List[str]: | |
package_data["vllm"].append("*.so") | ||
|
||
setup( | ||
name="nm-vllm", | ||
name=get_nm_vllm_package_name(), | ||
version=get_vllm_version(), | ||
author="vLLM Team, Neural Magic", | ||
author_email="[email protected]", | ||
|