    def load_dataset(
        self, split: str, epoch=1, combine=False, **kwargs
    ) -> SpeechDLMDataset:
        """Load a given dataset split.

        Args:
            split (str): name of the split (e.g., train, valid, test)
        """
        paths = utils.split_paths(self.args.data)
        assert len(paths) > 0

        data_path = paths[(epoch - 1) % len(paths)]

        channel_datasets = {}
        for channel in self.channels:
            split_path = os.path.join(data_path, split + "." + channel)
            dictionary = self.dicts[channel]
            output_dictionary = self.output_dicts[channel]

            dataset = data_utils.load_indexed_dataset(
                split_path, dictionary, self.args.dataset_impl, combine=combine
            )

            if dataset is None:
                raise FileNotFoundError(
                    "[{}] Dataset not found: {} ({})".format(channel, split, split_path)
                )

            dataset = maybe_shorten_dataset(
                dataset,
                split,
                self.args.shorten_data_split_list,
                self.args.shorten_method,
                self.args.tokens_per_sample,
                self.args.seed,
            )

            dataset = TokenBlockDataset(
                dataset,
                dataset.sizes,
                self.args.tokens_per_sample,
                pad=dictionary.pad(),
                eos=dictionary.eos(),
                break_mode=self.args.sample_break_mode,
                include_targets=True,
            )

            add_eos_for_other_targets = (
                self.args.sample_break_mode is not None
                and self.args.sample_break_mode != "none"
            )

            channel_datasets[channel] = MonolingualDataset(
                dataset=dataset,
                sizes=dataset.sizes,
                src_vocab=dictionary,
                tgt_vocab=output_dictionary,
                add_eos_for_other_targets=add_eos_for_other_targets,
                shuffle=False,
                targets=["future"],
                add_bos_token=self.args.add_bos_token,
            )

        self.datasets[split] = SpeechDLMDataset(
            datasets=channel_datasets,
            targets=self.targets,
            max_target_durations=self.max_target_durations,
            shuffle=True,
        )
Load a given dataset split.

Args:
split (str): name of the split (e.g., train, valid, test)
fairseq/tasks/speech_dlm_task.py