Skip to content

Commit

Permalink
Bump lightning[pytorch-extra] from 2.0.9.post0 to 2.1.0 in /requireme…
Browse files Browse the repository at this point in the history
…nts (#1662)

* Bump lightning[pytorch-extra] from 2.0.9.post0 to 2.1.0 in /requirements

Bumps [lightning[pytorch-extra]](https://github.com/Lightning-AI/lightning) from 2.0.9.post0 to 2.1.0.
- [Release notes](https://github.com/Lightning-AI/lightning/releases)
- [Commits](Lightning-AI/pytorch-lightning@2.0.9.post0...2.1.0)

---
updated-dependencies:
- dependency-name: lightning[pytorch-extra]
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Remove type ignores

* Capture more warnings

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Caleb Robinson <[email protected]>
Co-authored-by: Adam J. Stewart <[email protected]>
  • Loading branch information
3 people authored and nilsleh committed Nov 10, 2023
1 parent e0917ca commit 01de750
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ filterwarnings = [

# Expected warnings
# Lightning warns us about using num_workers=0, but it's faster on macOS
"ignore:The dataloader, .*, does not have many workers which may be a bottleneck:UserWarning",
"ignore:The .*dataloader.* does not have many workers which may be a bottleneck:UserWarning:lightning",
"ignore:The .*dataloader.* does not have many workers which may be a bottleneck:lightning.fabric.utilities.warnings.PossibleUserWarning:lightning",
# Lightning warns us about using the CPU when GPU/MPS is available
"ignore:GPU available but not used.:UserWarning",
"ignore:MPS available but not used.:UserWarning",
Expand Down
12 changes: 6 additions & 6 deletions torchgeo/trainers/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def training_step(
loss: Tensor = self.criterion(y_hat, y)
self.log("train_loss", loss)
self.train_metrics(y_hat_hard, y)
self.log_dict(self.train_metrics) # type: ignore[arg-type]
self.log_dict(self.train_metrics)

return loss

Expand All @@ -185,7 +185,7 @@ def validation_step(
loss = self.criterion(y_hat, y)
self.log("val_loss", loss)
self.val_metrics(y_hat_hard, y)
self.log_dict(self.val_metrics) # type: ignore[arg-type]
self.log_dict(self.val_metrics)

if (
batch_idx < 10
Expand Down Expand Up @@ -226,7 +226,7 @@ def test_step(self, batch: Any, batch_idx: int, dataloader_idx: int = 0) -> None
loss = self.criterion(y_hat, y)
self.log("test_loss", loss)
self.test_metrics(y_hat_hard, y)
self.log_dict(self.test_metrics) # type: ignore[arg-type]
self.log_dict(self.test_metrics)

def predict_step(
self, batch: Any, batch_idx: int, dataloader_idx: int = 0
Expand Down Expand Up @@ -288,7 +288,7 @@ def training_step(
loss: Tensor = self.criterion(y_hat, y.to(torch.float))
self.log("train_loss", loss)
self.train_metrics(y_hat_hard, y)
self.log_dict(self.train_metrics) # type: ignore[arg-type]
self.log_dict(self.train_metrics)

return loss

Expand All @@ -309,7 +309,7 @@ def validation_step(
loss = self.criterion(y_hat, y.to(torch.float))
self.log("val_loss", loss)
self.val_metrics(y_hat_hard, y)
self.log_dict(self.val_metrics) # type: ignore[arg-type]
self.log_dict(self.val_metrics)

if (
batch_idx < 10
Expand Down Expand Up @@ -349,7 +349,7 @@ def test_step(self, batch: Any, batch_idx: int, dataloader_idx: int = 0) -> None
loss = self.criterion(y_hat, y.to(torch.float))
self.log("test_loss", loss)
self.test_metrics(y_hat_hard, y)
self.log_dict(self.test_metrics) # type: ignore[arg-type]
self.log_dict(self.test_metrics)

def predict_step(
self, batch: Any, batch_idx: int, dataloader_idx: int = 0
Expand Down
6 changes: 3 additions & 3 deletions torchgeo/trainers/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def training_step(
loss: Tensor = self.criterion(y_hat, y)
self.log("train_loss", loss)
self.train_metrics(y_hat, y)
self.log_dict(self.train_metrics) # type: ignore[arg-type]
self.log_dict(self.train_metrics)

return loss

Expand All @@ -180,7 +180,7 @@ def validation_step(
loss = self.criterion(y_hat, y)
self.log("val_loss", loss)
self.val_metrics(y_hat, y)
self.log_dict(self.val_metrics) # type: ignore[arg-type]
self.log_dict(self.val_metrics)

if (
batch_idx < 10
Expand Down Expand Up @@ -226,7 +226,7 @@ def test_step(self, batch: Any, batch_idx: int, dataloader_idx: int = 0) -> None
loss = self.criterion(y_hat, y)
self.log("test_loss", loss)
self.test_metrics(y_hat, y)
self.log_dict(self.test_metrics) # type: ignore[arg-type]
self.log_dict(self.test_metrics)

def predict_step(
self, batch: Any, batch_idx: int, dataloader_idx: int = 0
Expand Down
6 changes: 3 additions & 3 deletions torchgeo/trainers/segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def training_step(
loss: Tensor = self.criterion(y_hat, y)
self.log("train_loss", loss)
self.train_metrics(y_hat_hard, y)
self.log_dict(self.train_metrics) # type: ignore[arg-type]
self.log_dict(self.train_metrics)
return loss

def validation_step(
Expand All @@ -240,7 +240,7 @@ def validation_step(
loss = self.criterion(y_hat, y)
self.log("val_loss", loss)
self.val_metrics(y_hat_hard, y)
self.log_dict(self.val_metrics) # type: ignore[arg-type]
self.log_dict(self.val_metrics)

if (
batch_idx < 10
Expand Down Expand Up @@ -281,7 +281,7 @@ def test_step(self, batch: Any, batch_idx: int, dataloader_idx: int = 0) -> None
loss = self.criterion(y_hat, y)
self.log("test_loss", loss)
self.test_metrics(y_hat_hard, y)
self.log_dict(self.test_metrics) # type: ignore[arg-type]
self.log_dict(self.test_metrics)

def predict_step(
self, batch: Any, batch_idx: int, dataloader_idx: int = 0
Expand Down

0 comments on commit 01de750

Please sign in to comment.