-
Notifications
You must be signed in to change notification settings - Fork 104
CI: Add FlagGems-vllm checkout for test purpose #388
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
base: v0.2.1
Are you sure you want to change the base?
Changes from 4 commits
2041354
4d76d39
78a3f89
705f480
852e2ed
cf77af7
a37721f
92c202f
8d34d1d
40fcf03
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,21 +3,43 @@ | |
| # Setup script for Ascend NPU CI environment. | ||
| set -euo pipefail | ||
|
|
||
| # Install FlagGems-vllm for test purpose | ||
| FLAGGEMS_VLLM_DIR="$(cd .. && pwd -P)/FlagGems-vllm" | ||
| rm -rf "${FLAGGEMS_VLLM_DIR}" | ||
| git clone https://github.com/flagos-ai/FlagGems-vllm.git "${FLAGGEMS_VLLM_DIR}" | ||
| git -C "${FLAGGEMS_VLLM_DIR}" checkout main | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. git clone --branch ${FLAGGEMS_VERSION} --depth 1 https://github.com/flagos-ai/FlagGems /workspace/FlagGems
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. git clone --branch ${FLAGGEMS_VERSION} --depth 1 https://github.com/flagos-ai/FlagGems /workspace/FlagGems |
||
| python -m pip install --no-build-isolation -e "${FLAGGEMS_VLLM_DIR}" | ||
|
|
||
| git config --global --add safe.directory "$(pwd)" | ||
|
|
||
| pip install --upgrade pip "setuptools>=77.0.3" | ||
|
|
||
| # Install vLLM-Plugin-FL | ||
| pip install \ | ||
| --no-build-isolation \ | ||
| --no-deps \ | ||
| -e . | ||
|
|
||
| python - <<'PY' | ||
| import flag_gems | ||
| import flaggems_vllm | ||
| import numpy | ||
| import torch | ||
| import torch_npu # noqa: F401 | ||
| import vllm | ||
| import vllm_fl | ||
|
|
||
| expected = "1.26.4" | ||
| if numpy.__version__ != expected: | ||
| raise RuntimeError( | ||
| f"Unexpected NumPy version: {numpy.__version__}; expected {expected}" | ||
| ) | ||
| print(f"NumPy version: {numpy.__version__}") | ||
| print(f"vLLM import ok: {vllm.__version__}") | ||
| print(f"vLLM-FL import ok: {vllm_fl.__file__}") | ||
| print(f"FlagGems import ok: {getattr(flag_gems, '__version__', 'unknown')}") | ||
| print(f"FlagGems-vllm grouped_topk: {callable(flaggems_vllm.grouped_topk)}") | ||
| print(f"Torch import ok: {torch.__version__}") | ||
| print(f"Accelerator available: {torch.npu.is_available()}") | ||
| print(f"Accelerator count: {torch.npu.device_count()}") | ||
| PY | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,13 @@ | |
| # Setup script for Enflame S60 CI. | ||
| set -euo pipefail | ||
|
|
||
| # Install FlagGems-vllm for test purpose | ||
| FLAGGEMS_VLLM_DIR="$(cd .. && pwd -P)/FlagGems-vllm" | ||
| rm -rf "${FLAGGEMS_VLLM_DIR}" | ||
| git clone https://github.com/flagos-ai/FlagGems-vllm.git "${FLAGGEMS_VLLM_DIR}" | ||
| git -C "${FLAGGEMS_VLLM_DIR}" checkout main | ||
| python -m pip install --no-build-isolation -e "${FLAGGEMS_VLLM_DIR}" | ||
|
|
||
| : "${VLLM_PLUGINS:?VLLM_PLUGINS is not set}" | ||
| : "${TOPS_VISIBLE_DEVICES:?TOPS_VISIBLE_DEVICES is not set}" | ||
|
|
||
|
|
@@ -20,11 +27,13 @@ if [[ -n "${GITHUB_ENV:-}" ]]; then | |
| done | ||
| fi | ||
|
|
||
| # The vendor runtime, vLLM, and FlagGems come from the pinned base image. | ||
| # Install vLLM-Plugin-FL | ||
| # The vendor runtime and vLLM come from the pinned base image. | ||
| python -m pip install --no-build-isolation --no-deps -e . | ||
|
|
||
| python - <<'PY' | ||
| import flag_gems | ||
| import flaggems_vllm | ||
| import torch | ||
| import torch_gcu # noqa: F401 | ||
| import vllm | ||
|
|
@@ -33,6 +42,7 @@ import vllm_fl | |
| print(f"vLLM import ok: {vllm.__version__}") | ||
| print(f"vLLM-FL import ok: {vllm_fl.__file__}") | ||
| print(f"FlagGems import ok: {getattr(flag_gems, '__version__', 'unknown')}") | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. import flag_gems need to check flaggems_vllm |
||
| print(f"FlagGems-vllm grouped_topk: {callable(flaggems_vllm.grouped_topk)}") | ||
| print(f"FlagGems vendor: {getattr(flag_gems, 'vendor_name', 'auto-detected')}") | ||
| print(f"Torch import ok: {torch.__version__}") | ||
| print(f"Accelerator available: {torch.gcu.is_available()}") | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Install FlagGems for test purpose
FLAGGEMS_VLLM_DIR="$(cd .. && pwd -P)/FlagGems-vllm"
git clone https://github.com/flagos-ai/FlagGems-vllm.git "${FLAGGEMS_VLLM_DIR}"
git -C "${FLAGGEMS_VLLM_DIR}" checkout main
pip install --no-build-isolation -e ${FLAGGEMS_VLLM_DIR}
Install vLLM-Plugin-FL