Skip to content
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

remove deprecated callbacks #3979

Merged
merged 1 commit into from
Oct 8, 2020
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
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