37f58cc580da8735ae5a259d4cb4ba0b8701e78e,tests/test_seq2seq.py,TestSeq2Seq,test_beamsearch,#TestSeq2Seq#,93
Before Change
def test_beamsearch(self):
Ensures beam search can generate the correct response
stdout, valid, test = _mock_train(
task="integration_tests:NocandidateTeacher",
model="seq2seq",
lr=LR,
batchsize=BATCH_SIZE,
num_epochs=NUM_EPOCHS,
numthreads=1,
no_cuda=True,
embeddingsize=16,
hiddensize=16,
rnn_class="gru",
attention="general",
gradient_clip=1.0,
dropout=0.0,
lookuptable="all",
beam_size=4,
)
self.assertTrue(
valid["bleu"] > 0.95,
"valid bleu = {}\nLOG:\n{}".format(valid["bleu"], stdout)
After Change
@testing_utils.retry(ntries=3)
def test_beamsearch(self):
Ensures beam search can generate the correct response
stdout, valid, test = testing_utils.train_model(dict(
task="integration_tests:nocandidate",
model="seq2seq",
lr=LR,
batchsize=BATCH_SIZE,
num_epochs=NUM_EPOCHS,
numthreads=1,
no_cuda=True,
embeddingsize=16,
hiddensize=16,
rnn_class="gru",
attention="general",
gradient_clip=1.0,
dropout=0.0,
lookuptable="all",
beam_size=4,
))
self.assertTrue(
valid["bleu"] > 0.95,
"valid bleu = {}\nLOG:\n{}".format(valid["bleu"], stdout)
In pattern: SUPERPATTERN
Frequency: 6
Non-data size: 4
Instances
Project Name: facebookresearch/ParlAI
Commit Name: 37f58cc580da8735ae5a259d4cb4ba0b8701e78e
Time: 2019-02-08
Author: roller@fb.com
File Name: tests/test_seq2seq.py
Class Name: TestSeq2Seq
Method Name: test_beamsearch
Project Name: facebookresearch/ParlAI
Commit Name: 37f58cc580da8735ae5a259d4cb4ba0b8701e78e
Time: 2019-02-08
Author: roller@fb.com
File Name: tests/test_seq2seq.py
Class Name: TestHogwildSeq2seq
Method Name: test_generation_multi
Project Name: facebookresearch/ParlAI
Commit Name: 37f58cc580da8735ae5a259d4cb4ba0b8701e78e
Time: 2019-02-08
Author: roller@fb.com
File Name: tests/test_seq2seq.py
Class Name: TestSeq2Seq
Method Name: test_generation
Project Name: facebookresearch/ParlAI
Commit Name: 37f58cc580da8735ae5a259d4cb4ba0b8701e78e
Time: 2019-02-08
Author: roller@fb.com
File Name: tests/test_memnn.py
Class Name: TestMemnn
Method Name: test_labelcands_multi
Project Name: facebookresearch/ParlAI
Commit Name: 37f58cc580da8735ae5a259d4cb4ba0b8701e78e
Time: 2019-02-08
Author: roller@fb.com
File Name: tests/test_memnn.py
Class Name: TestMemnn
Method Name: test_labelcands_nomemnn
Project Name: facebookresearch/ParlAI
Commit Name: 37f58cc580da8735ae5a259d4cb4ba0b8701e78e
Time: 2019-02-08
Author: roller@fb.com
File Name: tests/test_seq2seq.py
Class Name: TestSeq2Seq
Method Name: test_ranking