def test_remove_dataloader_on_empty_config(self) -> None: """Test remove_dataloader on empty config.""" config = Config() config.remove_dataloader() self.assertIsNone(config.evaluation) self.assertIsNone(config.quantization)
def test_remove_dataloader(self) -> None: """Test remove_dataloader.""" config = Config(self.predefined_config) self.assertEqual("ImageRecord", config.evaluation.accuracy.dataloader.dataset.name) self.assertEqual("ImageRecord", config.evaluation.performance.dataloader.dataset.name) self.assertEqual( "ImageRecord", config.quantization.calibration.dataloader.dataset.name) config.remove_dataloader() self.assertIsNone(config.evaluation.accuracy.dataloader) self.assertIsNone(config.evaluation.performance.dataloader) self.assertIsNone(config.quantization.calibration.dataloader)