Skip to content
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

Eager pip install #13198

Closed
wants to merge 6 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/ci-pytorch_test-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,18 @@ jobs:
- name: Pull legacy checkpoints
run: bash .actions/pull_legacy_checkpoints.sh

- run: |
python -c "flag = '--pre' if '${{matrix.release}}' == 'pre' else ' ' ; print('PIP_FLAG=' + flag)" >> $GITHUB_ENV
python -c "url = 'test/cpu/torch_test.html' if '${{matrix.release}}' == 'pre' else 'cpu/torch_stable.html' ; print('TORCH_URL=' + url)" >> $GITHUB_ENV

- name: Install dependencies
env:
PACKAGE_NAME: pytorch
FREEZE_REQUIREMENTS: 1
run: |
flag=$(python -c "print('--pre' if '${{matrix.release}}' == 'pre' else '')" 2>&1)
url=$(python -c "print('test/cpu/torch_test.html' if '${{matrix.release}}' == 'pre' else 'cpu/torch_stable.html')" 2>&1)
pip install -e .[test] --upgrade $flag --find-links "https://download.pytorch.org/whl/${url}"
flag=$(python -c "print('--pre' if '${{matrix.release}}' == 'pre' else '')")
url=$(python -c "print('test/cpu/torch_test.html' if '${{matrix.release}}' == 'pre' else 'cpu/torch_stable.html')")
pip install -e .[test] $PIP_FLAG --find-links "$TORCH_URL" -U --upgrade-strategy eager
pip list
shell: bash

Expand All @@ -97,7 +101,7 @@ jobs:
run: |
# adjust versions according installed Torch version
python ./requirements/pytorch/adjust-versions.py requirements/pytorch/extra.txt
pip install --requirement ./requirements/pytorch/extra.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade
pip install $PIP_FLAG -r ./requirements/pytorch/extra.txt --find-links "$TORCH_URL" -U --upgrade-strategy eager
pip list
shell: bash

Expand Down Expand Up @@ -143,7 +147,7 @@ jobs:
run: |
# adjust versions according installed Torch version
python ./requirements/pytorch/adjust-versions.py requirements/pytorch/examples.txt
pip install -r requirements/pytorch/examples.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade
pip install $PIP_FLAG -r requirements/pytorch/examples.txt --find-links "$TORCH_URL --upgrade
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so what we can do here is reinstall the all above to reduce installing different versions to be not sliding with example requirements...


- name: Run Examples
working-directory: ./examples
Expand Down