Skip to content

Commit 3160211

Browse files
committed
fix for pre-commit failed job - Error: vllm/executor/ray_distributed_executor.py:531: error: Library stubs not installed for "pkg_resources" (5)
Signed-off-by: Alexandru Badea <george-alexandru.badea@ionos.com>
1 parent 3b528fe commit 3160211

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

.github/workflows/pre-commit.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,28 @@ jobs:
99
pre-commit:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v4 # Use the latest stable version tag
13-
- uses: actions/setup-python@v5 # Use the latest stable version tag
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-python@v5
1414
with:
1515
python-version: "3.12"
1616
- run: echo "::add-matcher::.github/workflows/matchers/actionlint.json"
1717
- run: echo "::add-matcher::.github/workflows/matchers/mypy.json"
1818
- name: Set VLLM_TARGET_DEVICE to CPU for pre-commit checks
1919
run: echo "VLLM_TARGET_DEVICE=cpu" >> $GITHUB_ENV
20-
- name: Install vLLM Build Dependencies
21-
run: pip install -r requirements/build.txt
20+
- name: Install PyTorch for CPU
21+
# Explicitly install the CPU version of PyTorch from their stable index.
22+
# This ensures pip finds the correct wheel without the problematic '+cpu' tag.
23+
# Check PyTorch's official website for the exact command for torch==2.6.0 CPU
24+
# As of my last update, it would typically be:
25+
run: pip install torch==2.6.0 --index-url https://download.pytorch.org/whl/cpu
26+
- name: Install vLLM Build Dependencies (excluding torch, as it's already installed)
27+
# We need to filter out torch from build.txt for this step
28+
# A simple way is to use grep or sed, or if build.txt is small, just list others.
29+
# Given build.txt has `torch==2.6.0`, we'll exclude it here.
30+
run: pip install $(grep -v 'torch==' requirements/build.txt | tr '\n' ' ')
2231
- name: Install vLLM Project and Dev Dependencies
2332
run: pip install -e ".[dev]"
24-
- uses: pre-commit/action@v3.0.1 # Use the latest stable version tag
33+
34+
- uses: pre-commit/action@v3.0.1
2535
with:
2636
extra_args: --all-files --hook-stage manual

0 commit comments

Comments
 (0)