Skip to content

Commit

Permalink
Remove configure_callbacks (#1647)
Browse files Browse the repository at this point in the history
* Remove configure_callbacks

* Remove unused imports
  • Loading branch information
robmarkcole authored and nilsleh committed Nov 6, 2023
1 parent d1e5a0e commit 7a91236
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions torchgeo/trainers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import lightning
from lightning.pytorch import LightningModule
from lightning.pytorch.callbacks import Callback, EarlyStopping, ModelCheckpoint
from torch.optim import AdamW
from torch.optim.lr_scheduler import ReduceLROnPlateau

Expand Down Expand Up @@ -36,17 +35,6 @@ def __init__(self) -> None:
self.configure_metrics()
self.configure_models()

def configure_callbacks(self) -> list[Callback]:
"""Initialize model-specific callbacks.
Returns:
List of callbacks to apply.
"""
return [
ModelCheckpoint(monitor=self.monitor, mode=self.mode),
EarlyStopping(monitor=self.monitor, mode=self.mode),
]

def configure_losses(self) -> None:
"""Initialize the loss criterion."""

Expand Down

0 comments on commit 7a91236

Please sign in to comment.