Skip to content

Commit 058a43a

Browse files
kev123456wangkaifu
andauthored
fix bug: 'dict_keys' object is not subscriptable when 'load_from_hf' in 'load_dataset' (#2364)
* fix bug: NPTag postprocess * fix bug: 'dict_keys' object is not subscriptable when load_dataset(path) Co-authored-by: wangkaifu <[email protected]>
1 parent 9a80a9c commit 058a43a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paddlenlp/datasets/dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def load_from_hf(path, name=None, splits=None, **kwargs):
121121
else:
122122
label_list = []
123123
if isinstance(hf_datasets, DatasetDict):
124-
datasets = DatasetTuple(hf_datasets.keys())
124+
datasets = DatasetTuple(list(hf_datasets.keys()))
125125
for split, ds in hf_datasets.items():
126126
for feature in ds.features.values():
127127
if isinstance(feature, ClassLabel):

0 commit comments

Comments
 (0)