def test_set_quantization_dataloader_on_empty_config(self) -> None: """Test set_quantization_dataloader on empty config.""" config = Config() config.set_quantization_dataloader({ "name": "dataloader_name", }, ) self.assertIsNone(config.quantization)
def test_set_quantization_dataloader(self) -> None: """Test set_quantization_dataloader.""" config = Config(self.predefined_config) config.set_quantization_dataloader({ "name": "dataloader_name", }, ) self.assertEqual( "dataloader_name", config.quantization.calibration.dataloader.dataset.name, )