Skip to content

update last release with .post [rebase & merge] #20755

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

Merged
merged 6 commits into from
Apr 25, 2025
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@
/README.md @williamfalcon @lantiga
/src/pytorch_lightning/__about__.py @williamfalcon @lantiga @borda
/src/lightning_fabric/__about__.py @williamfalcon @lantiga @borda

/src/lightning/fabric/loggers @williamfalcon
/src/lightning/pytorch/loggers @williamfalcon
4 changes: 2 additions & 2 deletions .github/workflows/_legacy-checkpoints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ defaults:

jobs:
create-legacy-ckpts:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
pl-version: ${{ steps.decide-version.outputs.pl-version }}
steps:
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
aws s3 cp $AWS_RUN checkpoints.zip s3://pl-public-data/legacy/ --acl public-read

add-ckpt-test:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
if: inputs.create_pr
needs: create-legacy-ckpts
env:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci-tests-fabric.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ jobs:
include:
# only run PyTorch latest
- { os: "macOS-14", pkg-name: "lightning", python-version: "3.10", pytorch-version: "2.1" }
- { os: "ubuntu-20.04", 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-20.04", 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-20.04", 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" }
Expand All @@ -61,11 +61,11 @@ jobs:
- { 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-20.04", 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" }
# "fabric" installs the standalone package
- { os: "macOS-14", pkg-name: "fabric", python-version: "3.10", pytorch-version: "2.5" }
- { os: "ubuntu-20.04", pkg-name: "fabric", python-version: "3.10", pytorch-version: "2.5" }
- { os: "ubuntu-22.04", pkg-name: "fabric", python-version: "3.10", pytorch-version: "2.5" }
- { os: "windows-2022", pkg-name: "fabric", python-version: "3.10", pytorch-version: "2.5" }
# adding recently cut Torch 2.7 - FUTURE
# - { os: "macOS-14", pkg-name: "fabric", python-version: "3.12", pytorch-version: "2.7" }
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci-tests-pytorch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ jobs:
include:
# only run PyTorch latest
- { os: "macOS-14", pkg-name: "lightning", python-version: "3.10", pytorch-version: "2.1" }
- { os: "ubuntu-20.04", 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-20.04", 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-20.04", 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" }
Expand All @@ -65,11 +65,11 @@ jobs:
- { os: "windows-2022", pkg-name: "pytorch", python-version: "3.12.7", pytorch-version: "2.6" }
# "oldest" versions tests, only on minimum Python
- { os: "macOS-14", pkg-name: "pytorch", pytorch-version: "2.1", requires: "oldest" }
- { os: "ubuntu-20.04", pkg-name: "pytorch", pytorch-version: "2.1", requires: "oldest" }
- { os: "ubuntu-22.04", pkg-name: "pytorch", pytorch-version: "2.1", requires: "oldest" }
- { os: "windows-2022", pkg-name: "pytorch", pytorch-version: "2.1", requires: "oldest" }
# "pytorch" installs the standalone package
- { os: "macOS-14", pkg-name: "pytorch", python-version: "3.10", pytorch-version: "2.5" }
- { os: "ubuntu-20.04", pkg-name: "pytorch", python-version: "3.10", pytorch-version: "2.5" }
- { os: "ubuntu-22.04", pkg-name: "pytorch", python-version: "3.10", pytorch-version: "2.5" }
- { os: "windows-2022", pkg-name: "pytorch", python-version: "3.10", pytorch-version: "2.5" }
# adding recently cut Torch 2.7 - FUTURE
# - { os: "macOS-14", pkg-name: "pytorch", python-version: "3.12", pytorch-version: "2.7" }
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ defaults:

jobs:
mypy:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ env:
jobs:
docs-make:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
Expand All @@ -72,7 +72,7 @@ jobs:
lfs: ${{ matrix.pkg-name == 'pytorch' }}
- uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version: "3.10"

- name: List notebooks
if: ${{ matrix.pkg-name == 'pytorch' }}
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
deploy-docs:
needs: docs-make
if: github.repository_owner == 'Lightning-AI' && github.event_name != 'pull_request'
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-tutorials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ defaults:

jobs:
docs-update:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
Expand Down
2 changes: 2 additions & 0 deletions docs/source-fabric/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@
("py:.*", "torch_xla.*"),
("py:class", "transformer_engine.*"),
("py:class", "bitsandbytes.*"),
# loggers
('py:class', 'tensorboardX.SummaryWriter'), # todo: this is unexpected as the imports locally works
]

# -- Options for todo extension ----------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions docs/source-pytorch/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ def _load_py_module(name: str, location: str) -> ModuleType:
# missing in generated API
("py:exc", "MisconfigurationException"),
# TODO: generated list of all existing ATM, need to be fixed
('py:class', 'tensorboardX.SummaryWriter'),
("py:class", "AveragedModel"),
("py:class", "CometExperiment"),
("py:meth", "DataModule.__init__"),
Expand Down
10 changes: 5 additions & 5 deletions src/lightning/pytorch/trainer/connectors/callback_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from datetime import timedelta
from typing import Optional, Union

from lightning_utilities import module_available
from lightning_utilities.core.imports import RequirementCache

import lightning.pytorch as pl
from lightning.fabric.utilities.registry import _load_external_callbacks
Expand Down Expand Up @@ -93,7 +93,7 @@ def _configure_checkpoint_callbacks(self, enable_checkpointing: bool) -> None:
" but found `ModelCheckpoint` in callbacks list."
)
elif enable_checkpointing:
if module_available("litmodels") and self.trainer._model_registry:
if RequirementCache("litmodels >=0.1.7") and self.trainer._model_registry:
trainer_source = inspect.getmodule(self.trainer)
if trainer_source is None or not isinstance(trainer_source.__package__, str):
raise RuntimeError("Unable to determine the source of the trainer.")
Expand All @@ -103,11 +103,11 @@ def _configure_checkpoint_callbacks(self, enable_checkpointing: bool) -> None:
else:
from litmodels.integrations.checkpoints import LightningModelCheckpoint as LitModelCheckpoint

model_checkpoint = LitModelCheckpoint(model_name=self.trainer._model_registry)
model_checkpoint = LitModelCheckpoint(model_registry=self.trainer._model_registry)
else:
rank_zero_info(
"You are using the plain ModelCheckpoint callback."
" Consider using LitModelCheckpoint which with seamless uploading to Model registry."
"Using default `ModelCheckpoint`. Consider installing `litmodels` package to enable"
" `LitModelCheckpoint` for automatic upload to the Lightning model registry."
)
model_checkpoint = ModelCheckpoint()
self.trainer.callbacks.append(model_checkpoint)
Expand Down
2 changes: 1 addition & 1 deletion src/version.info
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.1
2.5.1.post0
Loading