def set_dataset(self, dataset: ClassyDataset, phase_type: str):
    'Set dataset for phase type on task\n\n        Args:\n            dataset: ClassyDataset for returning samples.\n            phase_type: str must be one of "train" or "test"\n        '
    assert (phase_type in ['train', 'test']), "phase_type must be in ['train', 'test']"
    self.datasets[phase_type] = dataset
    if (phase_type == 'train'):
        self.train_phases_per_epoch = getattr(dataset, 'phases_per_epoch', 1)
    else:
        self._train_only = False
    return self
Set dataset for phase type on task

Args:
    dataset: ClassyDataset for returning samples.
    phase_type: str must be one of "train" or "test"
def set_dataset(self, dataset: ClassyDataset, phase_type: str):
    'Set dataset for phase type on task\n\n        Args:\n            dataset: ClassyDataset for returning samples.\n            phase_type: str must be one of "train" or "test"\n        '
    assert (phase_type in ['train', 'test']), "phase_type must be in ['train', 'test']"
    self.datasets[phase_type] = dataset
    if (phase_type == 'train'):
        self.train_phases_per_epoch = getattr(dataset, 'phases_per_epoch', 1)
    else:
        self._train_only = False
    return self