File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,6 +112,10 @@ def load_dataset(
112112 if (not datafile ) and (not datasetconfig ):
113113 raise ValueError ("Either datafile or datasetconfig must be set" )
114114
115+ effective_split = (
116+ splitName or datasetconfig .dataset_split_name if datasetconfig else None
117+ )
118+
115119 def _load_dataset (
116120 data_path = None ,
117121 builder = None ,
@@ -133,8 +137,8 @@ def _load_dataset(
133137 """
134138
135139 load_kwargs = {** kwargs }
136- if splitName is not None :
137- load_kwargs ["split" ] = splitName
140+ if effective_split is not None :
141+ load_kwargs ["split" ] = effective_split
138142 if data_dir is not None :
139143 load_kwargs ["data_dir" ] = data_dir
140144 if data_files is not None :
@@ -472,9 +476,7 @@ def _prepare_processed_datasets(
472476 logger .info ("Loading the dataset - %s" , d .name )
473477
474478 # In future the streaming etc go as kwargs of this function
475- loaded_dataset = self .load_dataset (
476- d , self .processor_config .streaming , splitName = d .dataset_split_name
477- )
479+ loaded_dataset = self .load_dataset (d , self .processor_config .streaming )
478480 logger .info ("Loaded raw dataset : %s" , str (loaded_dataset ))
479481
480482 if d .split is not None :
You can’t perform that action at this time.
0 commit comments