Fix equalized split handling of num_splits == num_blocks case. (#23191)

This commit is contained in:
Clark Zinzow 2022-03-15 12:23:50 -07:00 committed by GitHub
parent 72713e815b
commit 1d5f18fe0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -632,7 +632,7 @@ class Dataset(Generic[T]):
This assume that the given splits are sorted in ascending order.
"""
if target_size == 0:
return splits
return splits, []
new_splits = []
leftovers = []
for split in splits: