def test_unweighted_mixture(self):
        """Mix train and test splits of the same dataset."""
        dataset_configs = [
            DatasetConfig(id=self.dataset_name, config=self.dataset_config, split="train", columns=None, weight=None),
            DatasetConfig(id=self.dataset_name, config=self.dataset_config, split="test", columns=None, weight=None),
        ]
        dataset_mixture = DatasetMixtureConfig(
            datasets=dataset_configs,
        )
        args = ScriptArguments(dataset_mixture=asdict(dataset_mixture))
        dataset = get_dataset(args)
        self.assertIsInstance(dataset, DatasetDict)
        self.assertIn("train", dataset)
        self.assertEqual(len(dataset["train"]), len(self.ref_dataset["train"]) + len(self.ref_dataset["test"]))
Mix train and test splits of the same dataset.
tests/utils/test_data.py