mirror of
https://github.com/headroomlabs-ai/headroom.git
synced 2026-08-27 14:17:10 -04:00
ci: allow PyPI deps during CPU torch install (#1930)
## Description Fixes the CI failure exposed on the `8527b910` push run: - Run: https://github.com/headroomlabs-ai/headroom/actions/runs/29063619700 - Failed job: `test (3)` / job `86271743483` - Failed step: `Install (CPU torch + prebuilt wheel + dev deps, no cargo rebuild)` The failing command used the PyTorch CPU index as the only package index: ```bash pip install torch --index-url https://download.pytorch.org/whl/cpu ``` That index does not provide transitive dependencies such as `typing-extensions`, so pip backtracked across torch CPU wheels and failed before tests ran. This PR keeps the PyTorch CPU index primary for `torch` while allowing PyPI for dependencies. ## Type of Change - [x] Bug fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Performance improvement - [ ] Code refactoring (no functional changes) ## Changes Made - Adds `--extra-index-url https://pypi.org/simple` to each CI `pip install torch --index-url https://download.pytorch.org/whl/cpu` command. - Leaves the CPU torch index as the primary index so CI still installs CPU torch wheels. ## Testing - [ ] Unit tests pass (`pytest`) - [ ] Linting passes (`ruff check .`) - [ ] Type checking passes (`mypy headroom`) - [ ] New tests added for new functionality - [x] Manual testing performed ### Test Output ```text git diff --check # passed rg -n "pip install torch" .github/workflows/ci.yml # all four torch install commands now include --extra-index-url https://pypi.org/simple ``` ## Real Behavior Proof - Environment: Local worktree `C:\git\headroom-ci-fix`, branch `jd/fix-ci-torch-install-index`. - Exact command / steps: Inspected failed GitHub Actions log for run `29063619700` job `86271743483`, then updated matching torch install commands in `.github/workflows/ci.yml`. - Observed result: The workflow no longer uses the PyTorch CPU index as the only index for torch installs; PyPI is available for transitive dependencies such as `typing-extensions`. - Not tested: Full CI run locally; GitHub Actions is the authoritative verification for the affected install path. ## Review Readiness - [x] I have performed a self-review - [x] This PR is ready for human review ## Checklist - [x] My code follows the project's style guidelines - [x] I have performed a self-review of my code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] I have updated the CHANGELOG.md if applicable ## Screenshots (if applicable) N/A. ## Additional Notes This is a fix-forward PR. Reverting `8527b910` would reintroduce the Ruff failure it fixed; the failed job did not reach tests and failed only during dependency installation.
This commit is contained in:
parent
8527b910dc
commit
98ff203f98
1 changed files with 4 additions and 4 deletions
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
|
|
@ -201,7 +201,7 @@ jobs:
|
|||
- name: Install (CPU torch + prebuilt wheel + dev deps, no cargo rebuild)
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install torch --index-url https://download.pytorch.org/whl/cpu
|
||||
pip install torch --index-url https://download.pytorch.org/whl/cpu --extra-index-url https://pypi.org/simple
|
||||
WHEEL="$(ls dist/*.whl)"
|
||||
pip install "${WHEEL}[dev]" pytest-split
|
||||
# cwd's ./headroom source tree shadows the installed wheel; copy the
|
||||
|
|
@ -275,7 +275,7 @@ jobs:
|
|||
- name: Install (CPU torch + wheel[dev,relevance])
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install torch --index-url https://download.pytorch.org/whl/cpu
|
||||
pip install torch --index-url https://download.pytorch.org/whl/cpu --extra-index-url https://pypi.org/simple
|
||||
WHEEL="$(ls dist/*.whl)"
|
||||
pip install "${WHEEL}[dev,relevance]"
|
||||
SITE="$(python -c 'import sysconfig; print(sysconfig.get_path("platlib"))')"
|
||||
|
|
@ -317,7 +317,7 @@ jobs:
|
|||
- name: Install (CPU torch + wheel[dev,agno])
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install torch --index-url https://download.pytorch.org/whl/cpu
|
||||
pip install torch --index-url https://download.pytorch.org/whl/cpu --extra-index-url https://pypi.org/simple
|
||||
WHEEL="$(ls dist/*.whl)"
|
||||
pip install "${WHEEL}[dev,agno]"
|
||||
SITE="$(python -c 'import sysconfig; print(sysconfig.get_path("platlib"))')"
|
||||
|
|
@ -343,7 +343,7 @@ jobs:
|
|||
- name: Install (CPU torch + wheel[dev] + playwright)
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install torch --index-url https://download.pytorch.org/whl/cpu
|
||||
pip install torch --index-url https://download.pytorch.org/whl/cpu --extra-index-url https://pypi.org/simple
|
||||
WHEEL="$(ls dist/*.whl)"
|
||||
pip install "${WHEEL}[dev]" playwright
|
||||
SITE="$(python -c 'import sysconfig; print(sysconfig.get_path("platlib"))')"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue