Skip to content

Commit

Permalink
Merge pull request #655 from QData/clean-tests-
Browse files Browse the repository at this point in the history
comment out the slow tests
  • Loading branch information
qiyanjun committed Jun 6, 2022
2 parents ce16561 + 8c6de4e commit 578367d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
19 changes: 10 additions & 9 deletions tests/test_command_line/test_attack.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,16 @@
),
# fmt: on
#
# test: run_attack on LSTM MR using word embedding transformation and genetic algorithm. Simulate alzantot recipe without using expensive LM
(
"run_attack_faster_alzantot_recipe",
(
"textattack attack --model lstm-mr --recipe faster-alzantot --num-examples 3 "
"--num-examples-offset 32 "
),
"tests/sample_outputs/run_attack_faster_alzantot_recipe.txt",
),
# # test: run_attack on LSTM MR using word embedding transformation and genetic algorithm.
## Simulate alzantot recipe without using expensive LM (still too slow)
# (
# "run_attack_faster_alzantot_recipe",
# (
# "textattack attack --model lstm-mr --recipe faster-alzantot --num-examples 3 "
# "--num-examples-offset 32 "
# ),
# "tests/sample_outputs/run_attack_faster_alzantot_recipe.txt",
# ),
#
# test: run_attack with kuleshov recipe and sst-2 cnn
#
Expand Down
2 changes: 1 addition & 1 deletion tests/test_command_line/test_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


def test_train_tiny():
command = "textattack train --model distilbert-base-uncased --attack textfooler --dataset rotten_tomatoes --model-max-length 64 --num-epochs 2 --num-clean-epochs 1 --num-train-adv-examples 10"
command = "textattack train --model distilbert-base-uncased --attack textfooler --dataset rotten_tomatoes --model-max-length 64 --num-epochs 1 --num-clean-epochs 0 --num-train-adv-examples 5"

# Run command and validate outputs.
result = run_command_and_get_result(command)
Expand Down

0 comments on commit 578367d

Please sign in to comment.