Skip to content

Commit 9748952

Browse files
committed
refactoring
1 parent 7dfcb8f commit 9748952

9 files changed

+8
-6
lines changed

pytorch_lightning/trainer/trainer.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1023,11 +1023,10 @@ def check_testing_model_configuration(self, model: LightningModule, test_dataloa
10231023
gave_test_loader = test_dataloader is not None
10241024

10251025
if gave_test_loader and not has_test_step:
1026-
raise MisconfigurationException('You passed in a `test_dataloader` but did not implement '
1027-
' `test_step()`')
1026+
raise MisconfigurationException('You passed in a `test_dataloader` but did not implement `test_step()`')
10281027

10291028
if has_test_step and not gave_test_loader:
1030-
raise MisconfigurationException('You defined `test_step()` but did not implement '
1029+
raise MisconfigurationException('You defined `test_step()` but did not implement'
10311030
' `test_dataloader` nor passed in `.fit(test_dataloaders`.')
10321031

10331032
if has_test_step and gave_test_loader and not has_test_epoch_end:

tests/base/eval_dataloaders.py tests/base/model_test_dataloaders.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from abc import ABC, abstractmethod
22

33

4-
class EvalDataloaderVariations(ABC):
4+
class TestDataloaderVariations(ABC):
55

66
@abstractmethod
77
def dataloader(self, train):

tests/base/eval_steps.py tests/base/model_test_steps.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
from abc import ABC
22
from collections import OrderedDict
3+
34
import torch
45

56

6-
class EvalStepVariations(ABC):
7+
class TestStepVariations(ABC):
78
"""
89
Houses all variations of test steps
910
"""

tests/base/train_dataloaders.py tests/base/model_train_dataloaders.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from abc import ABC, abstractmethod
22

3+
34
class TrainDataloaderVariations(ABC):
45

56
@abstractmethod
File renamed without changes.

tests/base/valid_dataloaders.py tests/base/model_valid_dataloaders.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from abc import ABC, abstractmethod
22

3+
34
class ValDataloaderVariations(ABC):
45

56
@abstractmethod
File renamed without changes.

tests/base/eval_epoch_ends.py tests/base/trainer_test_epoch_ends.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import torch
44

55

6-
class EvalEpochEndVariations(ABC):
6+
class TestEpochEndVariations(ABC):
77

88
def test_epoch_end(self, outputs):
99
"""
File renamed without changes.

0 commit comments

Comments
 (0)