diff --git a/regression_tests/test_gector_roberta.py b/regression_tests/test_gector_roberta.py index 3c9951d..9c83aac 100644 --- a/regression_tests/test_gector_roberta.py +++ b/regression_tests/test_gector_roberta.py @@ -59,7 +59,6 @@ def predict_for_file(input_file, temp_file, model, batch_size=32): test_data = read_lines(input_file) predictions = [] - cnt_corrections = 0 batch = [] for sent in test_data: batch.append(sent.split()) @@ -71,15 +70,12 @@ def predict_for_file(input_file, temp_file, model, batch_size=32): if batch: preds, cnt = model.handle_batch(batch) predictions.extend(preds) - cnt_corrections += cnt result_lines = [" ".join(pred) for pred in predictions] with open(temp_file.name, "w") as f: f.write("\n".join(result_lines) + "\n") - return cnt_corrections - def compare_files(filename, gold_file, temp_file): """ diff --git a/tests/test_tokenization.py b/tests/test_tokenization.py index ba50bc3..bc40040 100644 --- a/tests/test_tokenization.py +++ b/tests/test_tokenization.py @@ -5,7 +5,7 @@ from allennlp.common.testing import AllenNlpTestCase -class TokenizationTests(AllenNlpTestCase): +class TestTokenization(AllenNlpTestCase): """A test class that tests the GECToR custom tokenization utilities.""" def test_get_bpe_groups(self):