Skip to content

Commit

Permalink
Merge pull request #533 from QData/fix-dataset-split-bug
Browse files Browse the repository at this point in the history
Fix dataset-split bug
  • Loading branch information
qiyanjun committed Oct 5, 2021
2 parents 0f6401d + 9ba7d9c commit caacc1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion textattack/dataset_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@ def _create_dataset_from_args(cls, args):
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
)
Expand Down

0 comments on commit caacc1c

Please sign in to comment.