def _to_yaml_list(self) -> list:
        out = [asdict(s) for s in self.to_split_dict()]
        # we don't need the shard lengths in YAML, since it depends on max_shard_size and num_proc
        for split_info_dict in out:
            split_info_dict.pop("shard_lengths", None)
        # we don't need the dataset_name attribute that is deprecated
        for split_info_dict in out:
            split_info_dict.pop("dataset_name", None)
        return out

    @classmethod
    def _from_yaml_list(cls, yaml_data: list) -> "SplitDict":
        return cls.from_split_dict(yaml_data)