Skip to content

Commit 96ce8bf

Browse files
authored
Merge branch 'master' into feat/device-stats-filter-keys
2 parents 5a1a203 + 5f98958 commit 96ce8bf

16 files changed

Lines changed: 49 additions & 74 deletions

.github/workflows/_legacy-checkpoints.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ on:
4444
env:
4545
LEGACY_FOLDER: "tests/legacy"
4646
TORCH_URL: "https://download.pytorch.org/whl/cpu/"
47+
# Supply-chain guard: skip PyPI releases newer than this. See https://docs.astral.sh/uv/reference/settings/#exclude-newer
48+
UV_EXCLUDE_NEWER: "2 days"
4749

4850
defaults:
4951
run:
@@ -71,12 +73,15 @@ jobs:
7173
PACKAGE_NAME: pytorch
7274
FREEZE_REQUIREMENTS: 1
7375
timeout-minutes: 20
74-
run: uv pip install . --extra-index-url="${TORCH_URL}"
76+
# `unsafe-best-match` required: PyTorch extra-index mirrors an older fsspec that
77+
# conflicts with lightning's version range under UV_EXCLUDE_NEWER.
78+
run: uv pip install . --extra-index-url="${TORCH_URL}" --index-strategy unsafe-best-match
7579
if: inputs.pl_version == ''
7680

7781
- name: Install PL version
7882
timeout-minutes: 20
79-
run: uv pip install "pytorch-lightning==${{ inputs.pl_version }}" --extra-index-url="${TORCH_URL}"
83+
# `unsafe-best-match` required: same fsspec/PyTorch-index conflict as above.
84+
run: uv pip install "pytorch-lightning==${{ inputs.pl_version }}" --extra-index-url="${TORCH_URL}" --index-strategy unsafe-best-match
8085
if: inputs.pl_version != ''
8186

8287
- name: Adjust tests -> PL

.github/workflows/call-clear-cache.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
jobs:
2424
cron-clear:
2525
if: github.event_name == 'schedule' || github.event_name == 'pull_request'
26-
uses: Lightning-AI/utilities/.github/workflows/cleanup-caches.yml@v0.15.3
26+
uses: Lightning-AI/utilities/.github/workflows/cleanup-caches.yml@86fe1b20b4609835ba9e8c8739cd39707ba76868 # v0.15.3
2727
with:
2828
scripts-ref: v0.15.2
2929
dry-run: ${{ github.event_name == 'pull_request' }}
@@ -32,7 +32,7 @@ jobs:
3232

3333
direct-clear:
3434
if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request'
35-
uses: Lightning-AI/utilities/.github/workflows/cleanup-caches.yml@v0.15.3
35+
uses: Lightning-AI/utilities/.github/workflows/cleanup-caches.yml@86fe1b20b4609835ba9e8c8739cd39707ba76868 # v0.15.3
3636
with:
3737
scripts-ref: v0.15.2
3838
dry-run: ${{ github.event_name == 'pull_request' }}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,16 @@ jobs:
4545
os: ["ubuntu-22.04", "macOS-14", "windows-2022"]
4646
pkg-name: ["fabric", "pytorch", "lightning", "notset"]
4747
python-version: ["3.10", "3.11"]
48+
env:
49+
# Supply-chain guard: skip PyPI releases newer than this (ISO 8601 duration). See https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-uploaded-prior-to
50+
PIP_UPLOADED_PRIOR_TO: "P2D"
4851
steps:
4952
- uses: actions/checkout@v6
5053
- uses: actions/setup-python@v6
5154
with:
5255
python-version: ${{ matrix.python-version }}
56+
- name: Upgrade pip (for --uploaded-prior-to, pip >= 26.1)
57+
run: python -m pip install --upgrade "pip>=26.1"
5358
- uses: actions/download-artifact@v8
5459
with:
5560
name: dist-packages-${{ github.sha }}

.github/workflows/ci-rtfd.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ jobs:
6868
# TODO: Remove this - Enable running MPS tests on this platform
6969
DISABLE_MPS: ${{ matrix.os == 'macOS-14' && '1' || '0' }}
7070
UV_TORCH_BACKEND: "cpu"
71+
# Supply-chain guard: skip PyPI releases newer than this. See https://docs.astral.sh/uv/reference/settings/#exclude-newer
72+
UV_EXCLUDE_NEWER: "2 days"
7173
steps:
7274
- uses: actions/checkout@v6
7375

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ jobs:
7373
# TODO: Remove this - Enable running MPS tests on this platform
7474
DISABLE_MPS: ${{ matrix.os == 'macOS-14' && '1' || '0' }}
7575
UV_TORCH_BACKEND: "cpu"
76+
# Supply-chain guard: skip PyPI releases newer than this. See https://docs.astral.sh/uv/reference/settings/#exclude-newer
77+
UV_EXCLUDE_NEWER: "2 days"
7678
steps:
7779
- uses: actions/checkout@v6
7880

.github/workflows/cleanup-caches.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Check out code
12-
uses: actions/checkout@v6
12+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1313

1414
- name: Cleanup
1515
run: |

.github/workflows/code-checks.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ defaults:
2727
jobs:
2828
mypy:
2929
runs-on: ubuntu-22.04
30+
env:
31+
# Supply-chain guard: skip PyPI releases newer than this. See https://docs.astral.sh/uv/reference/settings/#exclude-newer
32+
UV_EXCLUDE_NEWER: "2 days"
3033
steps:
3134
- uses: actions/checkout@v6
3235

.github/workflows/docs-build.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ env:
4848
FREEZE_REQUIREMENTS: "1"
4949
TORCH_URL: "https://download.pytorch.org/whl/cpu/"
5050
PYPI_LOCAL_DIR: "pypi_pkgs/"
51+
# Supply-chain guard: skip PyPI releases newer than this. See https://docs.astral.sh/uv/reference/settings/#exclude-newer
52+
UV_EXCLUDE_NEWER: "2 days"
5153

5254
jobs:
5355
docs-make:
@@ -103,9 +105,15 @@ jobs:
103105
104106
- name: Install package & dependencies
105107
timeout-minutes: 20
108+
# `unsafe-best-match` lets uv consider all indexes when resolving a package,
109+
# not just the first one it's found on. Required here because the PyTorch CPU
110+
# extra-index mirrors an older `fsspec` that conflicts with `lightning[all]`'s
111+
# version range under `UV_EXCLUDE_NEWER`; without this flag uv refuses to fall
112+
# back to PyPI for a newer compatible version.
106113
run: |
107114
uv pip install .[all] -U -r requirements/${{ matrix.pkg-name }}/docs.txt \
108-
-f ${PYPI_LOCAL_DIR} --extra-index-url="${TORCH_URL}"
115+
-f ${PYPI_LOCAL_DIR} --extra-index-url="${TORCH_URL}" \
116+
--index-strategy unsafe-best-match
109117
uv pip list
110118
111119
- name: Install req. for Notebooks/tutorials
@@ -179,7 +187,7 @@ jobs:
179187
- name: Inject version selector
180188
working-directory: docs/build
181189
run: |
182-
pip install -q wget
190+
uv pip install -q wget
183191
python -m wget https://raw.githubusercontent.com/Lightning-AI/utilities/main/scripts/inject-selector-script.py
184192
python inject-selector-script.py html ${{ matrix.pkg-name }}
185193

.github/workflows/label-conflicts.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)