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

remove snli and update tests for good tokenizer

This commit is contained in:
Jack Morris
2020-06-19 14:48:05 -04:00
parent 2c12a65f4e
commit 324c9b99fd
12 changed files with 49 additions and 111 deletions

View File

@@ -168,14 +168,6 @@ TEXTATTACK_DATASET_BY_MODEL = {
),
"cnn-mr": ("models/classification/cnn/mr", ("rotten_tomatoes", None, "test"),),
#
# Textual entailment models
#
# BERT models
"bert-base-uncased-snli": (
("models/entailment/bert/snli-uncased", 3),
("snli", None, "test", [1, 2, 0]),
),
#
# Text classification models
#
"bert-base-uncased-mr": (

View File

@@ -11,8 +11,7 @@ import numpy as np
import torch
import textattack
from .attack_args import *
from textattack.shared.scripts.attack_args import *
def set_seed(random_seed):
@@ -521,6 +520,7 @@ def parse_dataset_from_args(args):
dataset = textattack.datasets.HuggingFaceNLPDataset(
*dataset_args, shuffle=args.shuffle
)
dataset.examples = dataset.examples[args.num_examples_offset :]
else:
raise ValueError("Must supply pretrained model or dataset")
return dataset