From 48968150672662081830d8c11c9fbd88d66d0e64 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Fri, 6 Mar 2020 22:11:05 +0100 Subject: [PATCH] remove deprecated `data_loader` (#1077) * change version in CHangelog * warning * remove der data_loader Co-authored-by: William Falcon --- CHANGELOG.md | 2 +- pl_examples/basic_examples/lightning_module_template.py | 2 -- pl_examples/domain_templates/gan.py | 1 - pytorch_lightning/__init__.py | 5 ++--- pytorch_lightning/core/__init__.py | 3 +-- tests/test_cpu_models.py | 2 +- 6 files changed, 5 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 521f9981..cdfeb15d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). -## [Unreleased] +## [0.7.0] - 2020-03-06 ### Added diff --git a/pl_examples/basic_examples/lightning_module_template.py b/pl_examples/basic_examples/lightning_module_template.py index 32311bcb..bc1b85ba 100644 --- a/pl_examples/basic_examples/lightning_module_template.py +++ b/pl_examples/basic_examples/lightning_module_template.py @@ -12,11 +12,9 @@ import torch.nn.functional as F import torchvision.transforms as transforms from torch import optim from torch.utils.data import DataLoader -from torch.utils.data.distributed import DistributedSampler from torchvision.datasets import MNIST from pytorch_lightning.core import LightningModule -from pytorch_lightning.core import data_loader class LightningTemplateModel(LightningModule): diff --git a/pl_examples/domain_templates/gan.py b/pl_examples/domain_templates/gan.py index 6214dc03..0d7f7834 100644 --- a/pl_examples/domain_templates/gan.py +++ b/pl_examples/domain_templates/gan.py @@ -20,7 +20,6 @@ from torch.utils.data import DataLoader from torchvision.datasets import MNIST from pytorch_lightning.core import LightningModule -from pytorch_lightning.core import data_loader from pytorch_lightning.trainer import Trainer diff --git a/pytorch_lightning/__init__.py b/pytorch_lightning/__init__.py index af0b8104..dc44c380 100644 --- a/pytorch_lightning/__init__.py +++ b/pytorch_lightning/__init__.py @@ -1,6 +1,6 @@ """Root package info.""" -__version__ = '0.6.3.dev' +__version__ = '0.6.4.dev' __author__ = 'William Falcon et al.' __author_email__ = 'waf2107@columbia.edu' __license__ = 'Apache-2.0' @@ -24,7 +24,7 @@ if __LIGHTNING_SETUP__: # We are not importing the rest of the scikit during the build # process, as it may not be compiled yet else: - from .core import data_loader, LightningModule + from .core import LightningModule from .trainer import Trainer from .callbacks import Callback @@ -32,6 +32,5 @@ else: 'Trainer', 'LightningModule', 'Callback', - 'data_loader', ] # __call__ = __all__ diff --git a/pytorch_lightning/core/__init__.py b/pytorch_lightning/core/__init__.py index fac76ffd..a15ec90b 100644 --- a/pytorch_lightning/core/__init__.py +++ b/pytorch_lightning/core/__init__.py @@ -312,8 +312,7 @@ LightningModule Class """ -from .decorators import data_loader from .lightning import LightningModule -__all__ = ['LightningModule', 'data_loader'] +__all__ = ['LightningModule'] # __call__ = __all__ diff --git a/tests/test_cpu_models.py b/tests/test_cpu_models.py index 193e5632..1d0b1d13 100644 --- a/tests/test_cpu_models.py +++ b/tests/test_cpu_models.py @@ -3,7 +3,7 @@ import warnings import torch import tests.models.utils as tutils -from pytorch_lightning import Trainer, data_loader +from pytorch_lightning import Trainer from pytorch_lightning.callbacks import ( EarlyStopping, )