Skip to content

Commit bd680cf

Browse files
committed
Updated param call
Signed-off-by: romit <romit@ibm.com>
1 parent f978cdd commit bd680cf

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

tuning/data/data_processors.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff 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:

0 commit comments

Comments
 (0)