1
0
mirror of https://github.com/QData/TextAttack.git synced 2021-10-13 00:05:06 +03:00

Merge pull request #533 from QData/fix-dataset-split-bug

Fix dataset-split bug
This commit is contained in:
Yanjun Qi / Jane
2021-10-05 16:56:59 -04:00
committed by GitHub

View File

@@ -275,7 +275,9 @@ class DatasetArgs:
dataset_args = (dataset_args,)
if args.dataset_split:
if len(dataset_args) > 1:
dataset_args[2] = args.dataset_split
dataset_args = (
dataset_args[:1] + (args.dataset_split,) + dataset_args[2:]
)
dataset = textattack.datasets.HuggingFaceDataset(
*dataset_args, shuffle=False
)