Skip to content

Commit

Permalink
remove deprecated callbacks (#3979)
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda authored Oct 8, 2020
1 parent 0719dd7 commit 36f0c8a
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 33 deletions.
4 changes: 0 additions & 4 deletions pytorch_lightning/callbacks/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
from pytorch_lightning.callbacks.base import Callback
from pytorch_lightning.callbacks.early_stopping import EarlyStopping
from pytorch_lightning.callbacks.gpu_stats_monitor import GPUStatsMonitor
from pytorch_lightning.callbacks.gpu_usage_logger import GpuUsageLogger
from pytorch_lightning.callbacks.gradient_accumulation_scheduler import GradientAccumulationScheduler
from pytorch_lightning.callbacks.lr_logger import LearningRateLogger
from pytorch_lightning.callbacks.lr_monitor import LearningRateMonitor
from pytorch_lightning.callbacks.model_checkpoint import ModelCheckpoint
from pytorch_lightning.callbacks.progress import ProgressBar, ProgressBarBase
Expand All @@ -13,9 +11,7 @@
'Callback',
'EarlyStopping',
'GPUStatsMonitor',
'GpuUsageLogger',
'GradientAccumulationScheduler',
'LearningRateLogger',
'LearningRateMonitor',
'ModelCheckpoint',
'ProgressBar',
Expand Down
7 changes: 0 additions & 7 deletions pytorch_lightning/callbacks/early_stopping.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,3 @@ def _run_early_stopping_check(self, trainer, pl_module):
# stop every ddp process if any world process decides to stop
should_stop = trainer.accelerator_backend.early_stopping_should_stop(pl_module)
trainer.should_stop = should_stop

def on_train_end(self, trainer, pl_module):
if self.stopped_epoch > 0 and self.verbose > 0:
# todo: remove this old warning
rank_zero_warn('Displayed epoch numbers by `EarlyStopping` start from "1" until v0.6.x,'
' but will start from "0" in v0.8.0.', DeprecationWarning)
log.info(f'Epoch {self.stopped_epoch + 1:05d}: early stopping triggered.')
9 changes: 0 additions & 9 deletions pytorch_lightning/callbacks/gpu_usage_logger.py

This file was deleted.

9 changes: 0 additions & 9 deletions pytorch_lightning/callbacks/lr_logger.py

This file was deleted.

4 changes: 0 additions & 4 deletions tests/test_deprecated.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
"""Test deprecated functionality which will be removed in vX.Y.Z"""
import random
import sys

import pytest
import torch

from pytorch_lightning import Trainer
from pytorch_lightning.callbacks import GpuUsageLogger, LearningRateLogger
from tests.base import EvalModelTemplate


Expand Down

0 comments on commit 36f0c8a

Please sign in to comment.