-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from QData/config
minor fixes: config.json, tests, travis
- Loading branch information
Showing
15 changed files
with
293 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
language: python | ||
python: '3.7' | ||
python: '3.8' | ||
before_install: | ||
- python --version | ||
- pip install -U pip | ||
- pip install -U pytest | ||
- pip install git+https://github.com/jxmorris12/language-check | ||
install: | ||
- pip install -e . | ||
script: pytest tests # run tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
colored | ||
colored |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
local_tests/sample_outputs/run_attack_nonoverlapping_t5ende_editdistance_bleu.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
GreedyWordSwap( | ||
(goal_function): NonOverlappingOutput | ||
(transformation): WordSwapRandomCharacterSubstitution( | ||
(replace_stopwords): False | ||
) | ||
(constraints): | ||
(0): LevenshteinEditDistance( | ||
(max_edit_distance): 12 | ||
) | ||
(1): WordsPerturbed( | ||
(max_percent): 0.75 | ||
) | ||
(is_black_box): True | ||
) | ||
|
||
Load time: /.*/s | ||
--------------------------------------------- Result 1 --------------------------------------------- | ||
Eine republikanische Strategie, um der Wiederwahl Obamas entgegenzuwirken-->[91m[FAILED][0m | ||
A Republican strategy to counter the re-election of Obama | ||
|
||
|
||
--------------------------------------------- Result 2 --------------------------------------------- | ||
Die republikanischen Führer rechtfertigten ihre Politik durch die Not-->[91m[FAILED][0m | ||
Republican leaders justified their policy by the need to combat electoral fraud. | ||
|
||
|
||
--------------------------------------------- Result 3 --------------------------------------------- | ||
Das Brennan-Zentrum betrachtet dies jedoch als Mythos und behaupt-->Allerdings hält das Brennan Centre dies für einen Mythos, indem e | ||
However, the Brennan Centre [91mconsiders[0m this a myth, stating that electoral fraud is rarer in the United States than the number of people killed by lightning. | ||
However, the Brennan Centre [94mcTnsiders[0m this a myth, stating that electoral fraud is rarer in the United States than the number of people killed by lightning. | ||
|
||
|
||
--------------------------------------------- Result 4 --------------------------------------------- | ||
Tatsächlich identifizierten republikanische Anwälte-->In einer DecOde identifizierten republikanische Anwält | ||
[91mIndeed[0m, Republican lawyers identified only 300 cases of electoral fraud in the United [91mStates[0m in a [91mdecade[0m. | ||
[94mIndedd[0m, Republican lawyers identified only 300 cases of electoral fraud in the United [94mTtates[0m in a [94mdecOde[0m. | ||
|
||
|
||
--------------------------------------------- Result 5 --------------------------------------------- | ||
Eines ist sicher: Diese neuen Bestimmungen werden sich negativ auf die Wahlbeteiligung aus-->Ein Hhing ist sicher: Diese neuen Bestimmungen werden sich negativ auf die Wahlbeteil | ||
One [91mthing[0m is certain: these new provisions will have a negative impact on voter turn-out. | ||
One [94mHhing[0m is certain: these new provisions will have a negative impact on voter turn-out. | ||
|
||
|
||
--------------------------------------------- Result 6 --------------------------------------------- | ||
In diesem Sinne werden die Maßnahmen das demokratische System der USA teilweise untergraben-->[91m[FAILED][0m | ||
In this sense, the measures will partially undermine the American democratic system. | ||
|
||
|
||
|
||
(0lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwqqqqqqqqk(B | ||
(0x(B Attack Results (0x(B (0x(B | ||
(0tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqnqqqqqqqqu(B | ||
(0x(B Number of successful attacks: (0x(B 3 (0x(B | ||
(0x(B Number of failed attacks: (0x(B 3 (0x(B | ||
(0x(B Number of skipped attacks: (0x(B 0 (0x(B | ||
(0x(B Original accuracy: (0x(B 100.0% (0x(B | ||
(0x(B Accuracy under attack: (0x(B 50.0% (0x(B | ||
(0x(B Attack success rate: (0x(B 50.0% (0x(B | ||
(0x(B Average perturbed word %: (0x(B 9.62% (0x(B | ||
(0x(B Average num. words per input: (0x(B 15.33 (0x(B | ||
(0x(B Avg num queries: (0x(B 23.67 (0x(B | ||
(0mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqvqqqqqqqqj(B | ||
Attack time: /.*/s |
Empty file.
65 changes: 65 additions & 0 deletions
65
...run_attack_targetedclassification2_wordnet_langtool_enable_csv_beamsearch2_attack_n_4.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
BeamSearch( | ||
(goal_function): TargetedClassification( | ||
(target_class): 2 | ||
) | ||
(transformation): WordSwapWordNet( | ||
(replace_stopwords): False | ||
) | ||
(constraints): | ||
(0): LanguageTool( | ||
(grammar_error_threshold): 0 | ||
) | ||
(is_black_box): True | ||
) | ||
|
||
Logging to CSV at path /.*/csv. | ||
Load time: /.*/s | ||
--------------------------------------------- Result 1 --------------------------------------------- | ||
[91m0[0m-->[94m2[0m | ||
In Temple Bar , the bookshop at the [91mGallery[0m of Photography carries a large selection of photographic publications , and the Flying Pig is a secondhand bookshop . | ||
|
||
There is a bookshop at the gallery . | ||
In Temple Bar , the bookshop at the [94mdrift[0m of Photography carries a large selection of photographic publications , and the Flying Pig is a secondhand bookshop . | ||
|
||
There is a bookshop at the gallery . | ||
|
||
|
||
--------------------------------------------- Result 2 --------------------------------------------- | ||
[91m0[0m-->[91m[FAILED][0m | ||
On Naxos , you can walk through the pretty villages of the Tragea Valley and the foothills of Mount Zas , admiring Byzantine churches and exploring olive groves at your leisure . | ||
|
||
Naxos is a place with beautiful scenery for leisure . | ||
|
||
|
||
--------------------------------------------- Result 3 --------------------------------------------- | ||
[92m1[0m-->[91m[FAILED][0m | ||
Impossible . | ||
|
||
Impossible , unless circumstances are met . | ||
|
||
|
||
--------------------------------------------- Result 4 --------------------------------------------- | ||
[91m0[0m-->[94m2[0m | ||
Expenses included in calculating net cost for education and training programs that are intended to increase or maintain national economic productive capacity shall be reported as investments in human capital as required supplementary stewardship information accompanying the financial statements of the Federal Government and its component units . | ||
|
||
Net cost for education programs can be calculated as a way to [91mincrease[0m productivity . | ||
Expenses included in calculating net cost for education and training programs that are intended to increase or maintain national economic productive capacity shall be reported as investments in human capital as required supplementary stewardship information accompanying the financial statements of the Federal Government and its component units . | ||
|
||
Net cost for education programs can be calculated as a way to [94mincrement[0m productivity . | ||
|
||
|
||
|
||
(0lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwqqqqqqqqk(B | ||
(0x(B Attack Results (0x(B (0x(B | ||
(0tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqnqqqqqqqqu(B | ||
(0x(B Number of successful attacks: (0x(B 2 (0x(B | ||
(0x(B Number of failed attacks: (0x(B 2 (0x(B | ||
(0x(B Number of skipped attacks: (0x(B 0 (0x(B | ||
(0x(B Original accuracy: (0x(B 100.0% (0x(B | ||
(0x(B Accuracy under attack: (0x(B 50.0% (0x(B | ||
(0x(B Attack success rate: (0x(B 50.0% (0x(B | ||
(0x(B Average perturbed word %: (0x(B 2.38% (0x(B | ||
(0x(B Average num. words per input: (0x(B 34.25 (0x(B | ||
(0x(B Avg num queries: (0x(B 278.5 (0x(B | ||
(0mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqvqqqqqqqqj(B | ||
Attack time: /.*/s |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
{ | ||
"CACHE_DIR": "~/.cache/textattack/" | ||
"CACHE_DIR": "~/.cache/textattack/", | ||
"CONSTRAINT_CACHE_SIZE": 262144, | ||
"MODEL_BATCH_SIZE": 32, | ||
"MODEL_CACHE_SIZE": 262144 | ||
} |
Oops, something went wrong.