forked from mindspore-Ecosystem/mindspore
!1590 dataset: fix some format problem in take and split
Merge pull request !1590 from ms_yan/r0.3_format
This commit is contained in:
commit
00a4e188b7
|
@ -590,7 +590,7 @@ class Dataset:
|
|||
# here again
|
||||
dataset_size = self.get_dataset_size()
|
||||
|
||||
if(dataset_size is None or dataset_size <= 0):
|
||||
if dataset_size is None or dataset_size <= 0:
|
||||
raise RuntimeError("dataset size unknown, unable to split.")
|
||||
|
||||
all_int = all(isinstance(item, int) for item in sizes)
|
||||
|
@ -1173,6 +1173,7 @@ class SourceDataset(Dataset):
|
|||
def is_sharded(self):
|
||||
raise NotImplementedError("SourceDataset must implement is_sharded.")
|
||||
|
||||
|
||||
class MappableDataset(SourceDataset):
|
||||
"""
|
||||
Abstract class to represent a source dataset which supports use of samplers.
|
||||
|
|
Loading…
Reference in New Issue