Exemplo n.º 1
0
    def test_set_evaluation_dataloader_on_empty_config(self) -> None:
        """Test set_evaluation_dataloader on empty config."""
        config = Config()

        config.set_evaluation_dataloader({
            "name": "dataloader_name",
        }, )

        self.assertIsNone(config.evaluation)
Exemplo n.º 2
0
    def test_set_evaluation_dataloader(self) -> None:
        """Test set_evaluation_dataloader."""
        config = Config(self.predefined_config)

        config.set_evaluation_dataloader({
            "name": "dataloader_name",
        }, )

        self.assertEqual("dataloader_name",
                         config.evaluation.accuracy.dataloader.dataset.name)
        self.assertEqual("dataloader_name",
                         config.evaluation.performance.dataloader.dataset.name)