Skip to content

Commit 3c1dc71

Browse files
authored
ci: freeze requirements used in workflows (#19146)
1 parent 97469c6 commit 3c1dc71

File tree

14 files changed

+24
-14
lines changed

14 files changed

+24
-14
lines changed

.actions/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
jsonargparse>=4.16.0
1+
jsonargparse >=4.16.0, <4.28.0
22
requests

.github/actions/pip-wheels/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ runs:
1919
using: "composite"
2020
steps:
2121
- name: install dev. env
22-
run: pip install setuptools wheel
22+
run: pip install -r requirements/ci.txt
2323
shell: bash
2424

2525
- name: Freeze local emv.

.github/actions/pkg-check/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ runs:
1414
using: "composite"
1515
steps:
1616
- name: install dev. env
17-
run: pip install "twine==4.0.1" setuptools wheel flake8
17+
run: pip install -r requirements/ci.txt
1818
shell: bash
1919

2020
- name: Set PACKAGE_NAME envvar

.github/workflows/_legacy-checkpoints.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,14 @@ jobs:
110110
path: ${{ env.legacy_dir }}/checkpoints/
111111
retention-days: ${{ env.KEEP_DAYS }}
112112

113+
- run: pip install -r requirements/ci.txt
113114
- name: Upload checkpoints to S3
114115
working-directory: ${{ env.legacy_dir }}
115116
env:
116117
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_PUB_ACCESS_KEY }}
117118
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_PUB_SECRET_KEY }}
118119
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
119120
run: |
120-
pip install -q awscli
121121
aws s3 sync $AWS_RUN checkpoints/ s3://pl-public-data/legacy/checkpoints/
122122
zip -r checkpoints.zip checkpoints
123123
aws s3 cp $AWS_RUN checkpoints.zip s3://pl-public-data/legacy/ --acl public-read

.github/workflows/ci-checkpoints.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
paths:
1010
- ".github/workflows/ci-checkpoints.yml"
1111
- ".github/workflows/_legacy-checkpoints.yml.yml"
12+
- "requirements/ci.txt"
1213

1314
jobs:
1415
try-legacy-checkpoints:

.github/workflows/ci-pkg-install.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
1010
paths:
1111
- ".actions/*"
12+
- "requirements/ci.txt"
1213
- ".github/actions/pkg-check/*"
1314
- ".github/actions/pkg-install/*"
1415
- ".github/workflows/_build-packages.yml"

.github/workflows/ci-tests-app.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
paths:
1111
- ".actions/*"
1212
- ".github/workflows/ci-tests-app.yml"
13+
- "requirements/ci.txt"
1314
- "src/lightning/app/**"
1415
- "src/lightning_app/*"
1516
- "tests/tests_app/**"
@@ -91,7 +92,6 @@ jobs:
9192
- name: Install package & dependencies
9293
timeout-minutes: 20
9394
run: |
94-
python -m pip install -q pip -U
9595
pip install -e ".[${EXTRA_PREFIX}dev]" -U --prefer-binary \
9696
--find-links="${TORCH_URL}" --find-links="${PYPI_CACHE_DIR}"
9797
pip list

.github/workflows/ci-tests-data.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
1010
paths:
1111
- ".actions/*"
12+
- "requirements/ci.txt"
1213
- "requirements/data/**"
1314
- "src/lightning/data/**"
1415
- "src/lightning/__init__.py"
@@ -69,7 +70,7 @@ jobs:
6970
- name: Adjust PyTorch versions in requirements files
7071
if: ${{ matrix.requires != 'oldest' && matrix.release != 'pre' }}
7172
run: |
72-
pip install -q wget packaging
73+
pip install -q -r requirements/ci.txt
7374
python -m wget https://raw.githubusercontent.com/Lightning-AI/utilities/main/scripts/adjust-torch-versions.py
7475
for fpath in `ls requirements/data/*.txt`; do \
7576
python ./adjust-torch-versions.py $fpath ${{ matrix.pytorch-version }}; \
@@ -88,7 +89,6 @@ jobs:
8889
- name: Install package & dependencies
8990
timeout-minutes: 20
9091
run: |
91-
python -m pip install -q pip -U
9292
pip install -e ".[data-dev]" -U --prefer-binary -f ${TORCH_URL}
9393
pip list
9494

.github/workflows/ci-tests-fabric.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
1010
paths:
1111
- ".actions/*"
12+
- "requirements/ci.txt"
1213
- "requirements/fabric/**"
1314
- "src/lightning/fabric/**"
1415
- "src/lightning_fabric/*"
@@ -109,7 +110,7 @@ jobs:
109110
- name: Adjust PyTorch versions in requirements files
110111
if: ${{ matrix.requires != 'oldest' }}
111112
run: |
112-
pip install -q wget packaging
113+
pip install -q -r requirements/ci.txt
113114
python -m wget https://raw.githubusercontent.com/Lightning-AI/utilities/main/scripts/adjust-torch-versions.py
114115
for fpath in `ls requirements/**/*.txt`; do \
115116
python ./adjust-torch-versions.py $fpath ${{ matrix.pytorch-version }}; \
@@ -136,7 +137,6 @@ jobs:
136137
- name: Install package & dependencies
137138
timeout-minutes: 20
138139
run: |
139-
#python -m pip install -q pip -U
140140
pip install -e ".[${EXTRA_PREFIX}test,${EXTRA_PREFIX}strategies]" -U --prefer-binary \
141141
--find-links="${TORCH_URL}" --find-links="${PYPI_CACHE_DIR}"
142142
pip list

.github/workflows/ci-tests-pytorch.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
1010
paths:
1111
- ".actions/*"
12+
- "requirements/ci.txt"
1213
- "requirements/pytorch/**"
1314
- "src/lightning/pytorch/**"
1415
- "src/pytorch_lightning/*"
@@ -114,7 +115,7 @@ jobs:
114115
- name: Adjust PyTorch versions in requirements files
115116
if: ${{ matrix.requires != 'oldest' }}
116117
run: |
117-
pip install -q wget packaging
118+
pip install -q -r requirements/ci.txt
118119
python -m wget https://raw.githubusercontent.com/Lightning-AI/utilities/main/scripts/adjust-torch-versions.py
119120
for fpath in `ls requirements/**/*.txt`; do \
120121
python ./adjust-torch-versions.py $fpath ${{ matrix.pytorch-version }}; \
@@ -142,7 +143,6 @@ jobs:
142143
- name: Install package & dependencies
143144
timeout-minutes: 20
144145
run: |
145-
#python -m pip install -q pip -U
146146
pip install ".[${EXTRA_PREFIX}extra,${EXTRA_PREFIX}test,${EXTRA_PREFIX}strategies]" -U --prefer-binary \
147147
-r requirements/_integrations/accelerators.txt \
148148
--find-links="${TORCH_URL}" --find-links="${PYPI_CACHE_DIR}"

0 commit comments

Comments
 (0)