mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-11 12:50:09 +08:00
* refactor default model * drop redundant seeds * refactor dataloaders tests * fix multiple * fix conf * flake8 * Apply suggestions from code review Co-authored-by: William Falcon <waf2107@columbia.edu> Co-authored-by: William Falcon <waf2107@columbia.edu>
23 lines
582 B
Python
23 lines
582 B
Python
from abc import ABC, abstractmethod
|
|
|
|
from tests.base.eval_model_utils import CustomInfDataloader
|
|
|
|
|
|
class TestDataloaderVariations(ABC):
|
|
|
|
@abstractmethod
|
|
def dataloader(self, train: bool):
|
|
"""placeholder"""
|
|
|
|
def test_dataloader(self):
|
|
return self.dataloader(train=False)
|
|
|
|
def test_dataloader__infinite(self):
|
|
return CustomInfDataloader(self.dataloader(train=False))
|
|
|
|
def test_dataloader__empty(self):
|
|
return None
|
|
|
|
def test_dataloader__multiple(self):
|
|
return [self.dataloader(train=False), self.dataloader(train=False)]
|