Former-commit-id: 95ea942bd32402018e7c5dc61d50153c602ab67a
This commit is contained in:
xingjun.wang 2023-12-12 11:47:59 +08:00
parent 596f496f19
commit b634e91c43

View File

@ -59,6 +59,13 @@ def get_dataset(
dataset_name=data_path,
subset_name=data_name,
).to_hf_dataset()
def map_func(example):
# do something to example
example['input'] = example['input'] or ''
return example
dataset = dataset.ds_instance.map(map_func)
else:
dataset = load_dataset(
path=data_path,