Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
d83abd4
chlog: new section
Borda Sep 3, 2025
58ff367
docs: simplify version table (#21123)
Borda Aug 29, 2025
34799c2
Adding test for legacy checkpoint created with 2.5.4 (#21128)
pl-ghost Aug 29, 2025
1df18ff
resolve failing tests with pt-2.1 (#21130)
Borda Aug 29, 2025
94f8084
fix(callbacks): Defer step/time-triggered ModelCheckpoint saves until…
littlebullGit Aug 29, 2025
e537128
build(deps): bump google-github-actions/auth from 2 to 3 (#21139)
dependabot[bot] Sep 1, 2025
98a4d0a
build(deps): bump google-github-actions/setup-gcloud from 2 to 3 (#21…
dependabot[bot] Sep 1, 2025
8401828
build(deps): update ipython[notebook] requirement from <9.5.0 to <9.6…
dependabot[bot] Sep 1, 2025
b49838b
build(deps): bump coverage from 7.10.5 to 7.10.6 in /requirements (#2…
dependabot[bot] Sep 1, 2025
9de35b1
build(deps): bump pytest-rerunfailures from 15.1 to 16.0 in /requirem…
dependabot[bot] Sep 1, 2025
12a75bb
build(deps): update onnx requirement from <1.19.0,>1.12.0 to >1.12.0,…
dependabot[bot] Sep 1, 2025
7160273
build(deps): update typing-extensions requirement from <4.15.0,>4.5.0…
dependabot[bot] Sep 1, 2025
f8d700b
Simplify workflow matrix (#21132)
matsumotosan Sep 1, 2025
4dbacdc
Docs on hook call order (#21120)
SkafteNicki Sep 1, 2025
8f8ed37
Add missing device id for pytorch 2.8 (#21105)
SkafteNicki Sep 1, 2025
82ee1a1
Simplify Fabric tests workflow matrix (#21142)
matsumotosan Sep 1, 2025
3df3fcb
build(deps): update ipython[all] requirement from <8.19.0 to <9.0.0 i…
dependabot[bot] Sep 1, 2025
ff13bea
docs: update `optimizer_zero_grad` order, and the backward pass. (#21…
GdoongMathew Sep 2, 2025
8bd363c
docs: move `on_fit_end` hook to `teardown` stage. (#21143)
GdoongMathew Sep 2, 2025
1607a33
Fix TQDM progress bar showing the wrong total when using a finite and…
SkafteNicki Sep 2, 2025
581d576
Warning on eval module (#21146)
SkafteNicki Sep 2, 2025
a2005eb
Fix workflow matrix reference (#21145)
matsumotosan Sep 2, 2025
289f0c4
Fix `LightningCLI` not using `ckpt_path` hyperparameters to instantia…
mauvilsa Sep 2, 2025
74e9487
Add support for deepspeeds `exclude_frozen_parameters` (#21060)
SkafteNicki Sep 2, 2025
257db2b
Impr docs on batch sizes and limits in distributed (#21070)
SkafteNicki Sep 2, 2025
b2ef2e3
Fix: `no_grad` with AMP bug (#20921)
baskrahmer Sep 2, 2025
052836a
docs: update `setup` and `restore`. (#21149)
GdoongMathew Sep 3, 2025
b28f2c8
docs: warning don’t use `torch.profiler.profile` context manager arou…
KAVYANSHTYAGI Sep 3, 2025
795930a
`uv` for pytorch tests (#21148)
matsumotosan Sep 3, 2025
ae36587
docs: clarify `DeviceStatsMonitor` logged metrics (#20895)
MrAnayDongre Sep 3, 2025
cb4f729
chore: remove redundant words (#21151)
slicesequal Sep 3, 2025
98536d6
tests: fix missing import
Borda Sep 3, 2025
514a792
fix links in DeepSpeed docs (#21153)
marios1861 Sep 3, 2025
bb4dbf9
`uv` for tests-fabric (#21155)
matsumotosan Sep 3, 2025
adc72e2
Remove forgotten deprecated parse_as_dict argument in LightningCLI te…
mauvilsa Sep 4, 2025
98a5188
Respect `verbose=False` in `seed_everything` when no seed is provided…
KAVYANSHTYAGI Sep 4, 2025
2e5d022
Tuner cleanup on error (#21162)
SkafteNicki Sep 4, 2025
1ed69e0
update flaky syntax (#21156)
Borda Sep 4, 2025
edbca36
debug failing tests for Fabric with `ddp_fork` on PT 2.8 (#21093)
Borda Sep 4, 2025
88c3591
releasing `2.5.5`
Borda Sep 3, 2025
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
16 changes: 10 additions & 6 deletions .github/workflows/_legacy-checkpoints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,28 +57,32 @@ jobs:
steps:
- uses: actions/checkout@v5

- uses: actions/setup-python@v5
- name: Install uv and set Python version
uses: astral-sh/setup-uv@v6
with:
# Python version here needs to be supported by all PL versions listed in back-compatible-versions.txt.
python-version: "3.9"
# TODO: Avoid activating environment like this
# see: https://github.com/astral-sh/setup-uv/tree/v6/?tab=readme-ov-file#activate-environment
activate-environment: true
enable-cache: true

- name: Install PL from source
env:
PACKAGE_NAME: pytorch
FREEZE_REQUIREMENTS: 1
timeout-minutes: 20
run: pip install . --extra-index-url="${TORCH_URL}"
run: uv pip install . --extra-index-url="${TORCH_URL}"
if: inputs.pl_version == ''

- name: Install PL version
timeout-minutes: 20
run: pip install "pytorch-lightning==${{ inputs.pl_version }}" --extra-index-url="${TORCH_URL}"
run: uv pip install "pytorch-lightning==${{ inputs.pl_version }}" --extra-index-url="${TORCH_URL}"
if: inputs.pl_version != ''

- name: Adjust tests -> PL
if: ${{ matrix.pkg-name != 'lightning' }}
run: |
pip install -q -r .actions/requirements.txt
uv pip install -q -r .actions/requirements.txt
python .actions/assistant.py copy_replace_imports --source_dir="./tests" \
--source_import="lightning.fabric,lightning.pytorch" \
--target_import="lightning_fabric,pytorch_lightning"
Expand Down Expand Up @@ -115,7 +119,7 @@ jobs:
# export to env bool if secrets.AWS_REGION is not empty
run: echo "WITH_SECRETS=$([ -n '${{ secrets.AWS_REGION }}' ] && echo 1 || echo 0)" >> $GITHUB_ENV

- run: pip install -r requirements/ci.txt
- run: uv pip install -r requirements/ci.txt
- name: Upload checkpoints to S3
if: ${{ env.WITH_SECRETS == '1' }}
working-directory: ${{ env.LEGACY_FOLDER }}
Expand Down
132 changes: 60 additions & 72 deletions .github/workflows/ci-tests-fabric.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,113 +38,98 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
os: [macOS-14, ubuntu-22.04, windows-2022]
config:
# only run PyTorch latest
- { os: "macOS-14", pkg-name: "lightning", python-version: "3.10", pytorch-version: "2.1" }
- { os: "ubuntu-22.04", pkg-name: "lightning", python-version: "3.10", pytorch-version: "2.1" }
- { os: "windows-2022", pkg-name: "lightning", python-version: "3.10", pytorch-version: "2.1" }
- { os: "macOS-14", pkg-name: "lightning", python-version: "3.11", pytorch-version: "2.2.2" }
- { os: "ubuntu-22.04", pkg-name: "lightning", python-version: "3.11", pytorch-version: "2.2.2" }
- { os: "windows-2022", pkg-name: "lightning", python-version: "3.11", pytorch-version: "2.2.2" }
- { os: "macOS-14", pkg-name: "lightning", python-version: "3.11", pytorch-version: "2.3" }
- { os: "ubuntu-22.04", pkg-name: "lightning", python-version: "3.11", pytorch-version: "2.3" }
- { os: "windows-2022", pkg-name: "lightning", python-version: "3.11", pytorch-version: "2.3" }
- { os: "macOS-14", pkg-name: "lightning", python-version: "3.12.7", pytorch-version: "2.4.1" }
- { os: "ubuntu-22.04", pkg-name: "lightning", python-version: "3.12.7", pytorch-version: "2.4.1" }
- { os: "windows-2022", pkg-name: "lightning", python-version: "3.12.7", pytorch-version: "2.4.1" }
- { os: "macOS-14", pkg-name: "lightning", python-version: "3.12.7", pytorch-version: "2.5.1" }
- { os: "ubuntu-22.04", pkg-name: "lightning", python-version: "3.12.7", pytorch-version: "2.5.1" }
- { os: "windows-2022", pkg-name: "lightning", python-version: "3.12.7", pytorch-version: "2.5.1" }
- { pkg-name: "lightning", python-version: "3.10", pytorch-version: "2.1" }
- { pkg-name: "lightning", python-version: "3.11", pytorch-version: "2.2.2" }
- { pkg-name: "lightning", python-version: "3.11", pytorch-version: "2.3" }
- { pkg-name: "lightning", python-version: "3.12.7", pytorch-version: "2.4.1" }
- { pkg-name: "lightning", python-version: "3.12.7", pytorch-version: "2.5.1" }

# only run PyTorch latest with Python latest, use Fabric scope to limit dependency issues
- { os: "macOS-14", pkg-name: "fabric", python-version: "3.12.7", pytorch-version: "2.6" }
- { os: "ubuntu-22.04", pkg-name: "fabric", python-version: "3.12.7", pytorch-version: "2.6" }
- { os: "windows-2022", pkg-name: "fabric", python-version: "3.12.7", pytorch-version: "2.6" }
# "oldest" versions tests, only on minimum Python
- { os: "macOS-14", pkg-name: "fabric", pytorch-version: "2.1", requires: "oldest" }
- { os: "ubuntu-22.04", pkg-name: "fabric", pytorch-version: "2.1", requires: "oldest" }
- { os: "windows-2022", pkg-name: "fabric", pytorch-version: "2.1", requires: "oldest" }
- { pkg-name: "fabric", python-version: "3.12.7", pytorch-version: "2.6" }

# "fabric" installs the standalone package
- { os: "macOS-14", pkg-name: "fabric", python-version: "3.10", pytorch-version: "2.7" }
- { os: "ubuntu-22.04", pkg-name: "fabric", python-version: "3.10", pytorch-version: "2.7" }
- { os: "windows-2022", pkg-name: "fabric", python-version: "3.10", pytorch-version: "2.7" }
- { pkg-name: "fabric", python-version: "3.10", pytorch-version: "2.7" }

# adding recently cut Torch 2.7 - FUTURE
- { os: "macOS-14", pkg-name: "fabric", python-version: "3.12", pytorch-version: "2.8" }
- { os: "ubuntu-22.04", pkg-name: "fabric", python-version: "3.12", pytorch-version: "2.8" }
- { os: "windows-2022", pkg-name: "fabric", python-version: "3.12", pytorch-version: "2.8" }
- { pkg-name: "fabric", python-version: "3.12", pytorch-version: "2.8" }

# "oldest" versions tests, only on minimum Python
- { pkg-name: "fabric", pytorch-version: "2.1", requires: "oldest" }
timeout-minutes: 25 # because of building grpcio on Mac
env:
PACKAGE_NAME: ${{ matrix.pkg-name }}
PACKAGE_NAME: ${{ matrix.config.pkg-name }}
FREEZE_REQUIREMENTS: ${{ ! (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')) }}
PYPI_CACHE_DIR: "_pip-wheels"
TORCH_URL_STABLE: "https://download.pytorch.org/whl/cpu/"
TORCH_URL_TEST: "https://download.pytorch.org/whl/test/cpu/"
# TODO: Remove this - Enable running MPS tests on this platform
DISABLE_MPS: ${{ matrix.os == 'macOS-14' && '1' || '0' }}
steps:
- uses: actions/checkout@v5

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Install uv and set Python version
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version || '3.9' }}
python-version: ${{ matrix.config.python-version || '3.9' }}
# TODO: Avoid activating environment like this
# see: https://github.com/astral-sh/setup-uv/tree/v6/?tab=readme-ov-file#activate-environment
activate-environment: true
enable-cache: true

- name: Basic setup
run: uv pip install -q -r .actions/requirements.txt

- name: basic setup
run: pip install -q -r .actions/requirements.txt
- name: Append Env. vars for Linux
if: ${{ runner.os == 'Linux' }}
run: echo "GLOO_SOCKET_IFNAME=eth0" >> $GITHUB_ENV

- name: Append Env. vars for MacOS
if: ${{ runner.os == 'macOS' }}
run: echo "GLOO_SOCKET_IFNAME=lo0" >> $GITHUB_ENV

- name: Append Env. vars for Windows
if: ${{ runner.os == 'windows' }}
run: |
# Avoid issue on Windows with PyTorch 2.4: "RuntimeError: use_libuv was requested but PyTorch was build without libuv support"
echo "USE_LIBUV=0" >> $GITHUB_ENV

- name: Set min. dependencies
if: ${{ matrix.requires == 'oldest' }}
if: ${{ matrix.config.requires == 'oldest' }}
run: |
cd requirements/fabric
pip install -U "lightning-utilities[cli]"
uv pip install -U "lightning-utilities[cli]"
python -m lightning_utilities.cli requirements set-oldest --req_files "['base.txt', 'strategies.txt', 'test.txt']"
pip install "cython<3.0" wheel
pip install "pyyaml==5.4" --no-build-isolation
uv pip install "cython<3.0" wheel
uv pip install "pyyaml==5.4" --no-build-isolation

- name: Adjust PyTorch versions in requirements files
if: ${{ matrix.requires != 'oldest' }}
if: ${{ matrix.config.requires != 'oldest' }}
run: |
pip install -q -r requirements/ci.txt
uv pip install -q -r requirements/ci.txt
python -m wget https://raw.githubusercontent.com/Lightning-AI/utilities/main/scripts/adjust-torch-versions.py
for fpath in `ls requirements/**/*.txt`; do \
python ./adjust-torch-versions.py $fpath ${{ matrix.pytorch-version }}; \
python ./adjust-torch-versions.py $fpath ${{ matrix.config.pytorch-version }}; \
done

- name: pip wheels cache
uses: actions/cache/restore@v4
with:
path: ${{ env.PYPI_CACHE_DIR }}
key: pypi_wheels
- run: |
mkdir -p $PYPI_CACHE_DIR
ls -lh $PYPI_CACHE_DIR

- name: Expand Env. variables
run: |
# Switch PyTorch URL between stable and test/future
python -c "print('TORCH_URL=' + str('${{env.TORCH_URL_TEST}}' if '${{ matrix.pytorch-version }}' == '2.7' else '${{env.TORCH_URL_STABLE}}'))" >> $GITHUB_ENV
python -c "print('TORCH_URL=' + str('${{env.TORCH_URL_TEST}}' if '${{ matrix.config.pytorch-version }}' == '2.7' else '${{env.TORCH_URL_STABLE}}'))" >> $GITHUB_ENV
# Switch coverage scope
python -c "print('COVERAGE_SCOPE=' + str('lightning' if '${{matrix.pkg-name}}' == 'lightning' else 'lightning_fabric'))" >> $GITHUB_ENV
python -c "print('COVERAGE_SCOPE=' + str('lightning' if '${{matrix.config.pkg-name}}' == 'lightning' else 'lightning_fabric'))" >> $GITHUB_ENV
# if you install mono-package set dependency only for this subpackage
python -c "print('EXTRA_PREFIX=' + str('' if '${{matrix.pkg-name}}' != 'lightning' else 'fabric-'))" >> $GITHUB_ENV
- name: Append Env. vars for MacOS
if: ${{ runner.os == 'macOS' }}
run: |
# trying to avoid "gloo" issue with SIGABRT
echo "GLOO_SOCKET_IFNAME=lo0" >> $GITHUB_ENV
- name: Append Env. vars for Windows
if: ${{ runner.os == 'windows' }}
run: |
# Avoid issue on Windows with PyTorch 2.4: "RuntimeError: use_libuv was requested but PyTorch was build without libuv support"
echo "USE_LIBUV=0" >> $GITHUB_ENV
python -c "print('EXTRA_PREFIX=' + str('' if '${{matrix.config.pkg-name}}' != 'lightning' else 'fabric-'))" >> $GITHUB_ENV

- name: Install package & dependencies
timeout-minutes: 20
run: |
pip install -e ".[${EXTRA_PREFIX}test,${EXTRA_PREFIX}strategies]" \
-U --upgrade-strategy=eager --prefer-binary \
--extra-index-url="${TORCH_URL}" \
--find-links="${PYPI_CACHE_DIR}"
pip list
uv pip install ".[${EXTRA_PREFIX}test,${EXTRA_PREFIX}strategies]" \
--upgrade \
--find-links="${TORCH_URL}"
uv pip list

- name: Dump handy wheels
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
continue-on-error: true
Expand All @@ -155,7 +140,7 @@ jobs:
cache-key: "pypi_wheels"

- name: Adjust tests
if: ${{ matrix.pkg-name != 'lightning' }}
if: ${{ matrix.config.pkg-name != 'lightning' }}
run: |
python .actions/assistant.py copy_replace_imports --source_dir="./tests" \
--source_import="lightning.fabric" --target_import="lightning_fabric"
Expand Down Expand Up @@ -188,10 +173,13 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: tests/tests_fabric/coverage.xml
flags: ${{ env.COVERAGE_SCOPE }},cpu,pytest,python${{ matrix.python-version }}
flags: ${{ env.COVERAGE_SCOPE }},cpu,pytest,python${{ matrix.config.python-version }}
name: CPU-coverage
fail_ci_if_error: false

- name: Minimize uv cache
run: uv cache prune --ci

fabric-cpu-guardian:
runs-on: ubuntu-latest
needs: fabric-cpu
Expand Down
Loading
Loading