From 192c047d6674279c40a3cbe25a295b1713b4c4b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 21:28:53 +0000 Subject: [PATCH 1/4] Bump lightning[pytorch-extra] from 2.4.0 to 2.5.0.post0 in /requirements Bumps [lightning[pytorch-extra]](https://github.com/Lightning-AI/lightning) from 2.4.0 to 2.5.0.post0. - [Release notes](https://github.com/Lightning-AI/lightning/releases) - [Commits](https://github.com/Lightning-AI/lightning/compare/2.4.0...2.5.0.post0) --- updated-dependencies: - dependency-name: lightning[pytorch-extra] dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements/required.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/required.txt b/requirements/required.txt index d40386f424..815960b066 100644 --- a/requirements/required.txt +++ b/requirements/required.txt @@ -6,7 +6,7 @@ einops==0.8.0 fiona==1.10.1 kornia==0.7.4 lightly==1.5.15 -lightning[pytorch-extra]==2.4.0 +lightning[pytorch-extra]==2.5.0.post0 matplotlib==3.10.0 numpy==2.2.1 pandas==2.2.3 From 09158c911554dc41e409470ea1d9a2afac12a4b8 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 23 Dec 2024 16:40:20 -0500 Subject: [PATCH 2/4] Small type changes --- pyproject.toml | 2 +- torchgeo/trainers/base.py | 2 +- torchgeo/trainers/iobench.py | 2 +- torchgeo/trainers/moco.py | 2 +- torchgeo/trainers/simclr.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a37a7bd759..a4e125f5a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ dependencies = [ # lightning 2+ required for LightningCLI args + sys.argv support # lightning 2.3 contains known bugs related to YAML parsing # https://github.com/Lightning-AI/pytorch-lightning/issues/19977 - "lightning[pytorch-extra]>=2,!=2.3.*", + "lightning[pytorch-extra]>=2,!=2.3.*,!=2.5.0", # matplotlib 3.5+ required for Python 3.10 wheels "matplotlib>=3.5", # numpy 1.21.2+ required by Python 3.10 wheels diff --git a/torchgeo/trainers/base.py b/torchgeo/trainers/base.py index 35666e98e4..02628ba08c 100644 --- a/torchgeo/trainers/base.py +++ b/torchgeo/trainers/base.py @@ -55,7 +55,7 @@ def configure_metrics(self) -> None: def configure_optimizers( self, - ) -> 'lightning.pytorch.utilities.types.OptimizerLRSchedulerConfig': + ) -> 'lightning.pytorch.utilities.types.OptimizerLRScheduler': """Initialize the optimizer and learning rate scheduler. Returns: diff --git a/torchgeo/trainers/iobench.py b/torchgeo/trainers/iobench.py index c8826a1dce..c7be263dac 100644 --- a/torchgeo/trainers/iobench.py +++ b/torchgeo/trainers/iobench.py @@ -24,7 +24,7 @@ def configure_models(self) -> None: def configure_optimizers( self, - ) -> 'lightning.pytorch.utilities.types.OptimizerLRSchedulerConfig': + ) -> 'lightning.pytorch.utilities.types.OptimizerLRScheduler': """Initialize the optimizer. Returns: diff --git a/torchgeo/trainers/moco.py b/torchgeo/trainers/moco.py index b079543adb..ce35855c12 100644 --- a/torchgeo/trainers/moco.py +++ b/torchgeo/trainers/moco.py @@ -293,7 +293,7 @@ def configure_losses(self) -> None: def configure_optimizers( self, - ) -> 'lightning.pytorch.utilities.types.OptimizerLRSchedulerConfig': + ) -> 'lightning.pytorch.utilities.types.OptimizerLRScheduler': """Initialize the optimizer and learning rate scheduler. Returns: diff --git a/torchgeo/trainers/simclr.py b/torchgeo/trainers/simclr.py index 1cb05315f6..a0625f26eb 100644 --- a/torchgeo/trainers/simclr.py +++ b/torchgeo/trainers/simclr.py @@ -286,7 +286,7 @@ def predict_step(self, batch: Any, batch_idx: int, dataloader_idx: int = 0) -> N def configure_optimizers( self, - ) -> 'lightning.pytorch.utilities.types.OptimizerLRSchedulerConfig': + ) -> 'lightning.pytorch.utilities.types.OptimizerLRScheduler': """Initialize the optimizer and learning rate scheduler. .. versionchanged:: 0.6 From 4728f5ff30eb63cb4b6c2e05c09e5c127b9c14ea Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 23 Dec 2024 20:00:59 -0500 Subject: [PATCH 3/4] Ignore undocumented type --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 4078970c2e..f10adc56cb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -59,7 +59,7 @@ ('py:class', 'fiona.model.Feature'), ('py:class', 'kornia.augmentation._2d.intensity.base.IntensityAugmentationBase2D'), ('py:class', 'kornia.augmentation.base._AugmentationBase'), - ('py:class', 'lightning.pytorch.utilities.types.OptimizerLRSchedulerConfig'), + ('py:class', 'lightning.pytorch.utilities.types.OptimizerLRScheduler'), ('py:class', 'segmentation_models_pytorch.base.model.SegmentationModel'), ('py:class', 'timm.models.resnet.ResNet'), ('py:class', 'timm.models.vision_transformer.VisionTransformer'), From 56e95a33e9a6f46a3ad74946ea82bdbb08959cce Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 24 Dec 2024 14:39:04 -0500 Subject: [PATCH 4/4] Documented type is a combination of types --- docs/conf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index f10adc56cb..df1de39818 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -59,7 +59,9 @@ ('py:class', 'fiona.model.Feature'), ('py:class', 'kornia.augmentation._2d.intensity.base.IntensityAugmentationBase2D'), ('py:class', 'kornia.augmentation.base._AugmentationBase'), - ('py:class', 'lightning.pytorch.utilities.types.OptimizerLRScheduler'), + ('py:class', 'lightning.pytorch.utilities.types.LRSchedulerConfig'), + ('py:class', 'lightning.pytorch.utilities.types.OptimizerConfig'), + ('py:class', 'lightning.pytorch.utilities.types.OptimizerLRSchedulerConfig'), ('py:class', 'segmentation_models_pytorch.base.model.SegmentationModel'), ('py:class', 'timm.models.resnet.ResNet'), ('py:class', 'timm.models.vision_transformer.VisionTransformer'),