Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/datasets/splits.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ def __getitem__(self, slice_value):
return split_instruction

def get_list_sliced_split_info(self):
return list(sorted(self._splits.values(), key=lambda x: x.split_info.name))
return list(self._splits.values())


class SplitDict(dict):
Expand Down Expand Up @@ -567,9 +567,8 @@ def from_split_dict(cls, split_infos: Union[List, Dict], dataset_name: Optional[

def to_split_dict(self):
"""Returns a list of SplitInfo protos that we have."""
# Return the SplitInfo, sorted by name
out = []
for split_name, split_info in sorted(self.items()):
for split_name, split_info in self.items():
split_info = copy.deepcopy(split_info)
split_info.name = split_name
out.append(split_info)
Expand Down