lightning/tests/base/model_valid_dataloaders.py

21 lines
530 B
Python
Raw Normal View History

from abc import ABC, abstractmethod
from tests.base.dataloaders import CustomInfDataloader
class ValDataloaderVariations(ABC):
@abstractmethod
def dataloader(self, train: bool):
"""placeholder"""
def val_dataloader(self):
return self.dataloader(train=False)
def val_dataloader__multiple(self):
return [self.dataloader(train=False),
self.dataloader(train=False)]
def val_dataloader__infinite(self):
return CustomInfDataloader(self.dataloader(train=False))