Skip to content
This repository was archived by the owner on Aug 25, 2024. It is now read-only.

Commit 90f1aaa

Browse files
committed
model: transformers: example: Fix accuracy assertion
Fixes: #497 Signed-off-by: John Andersen <[email protected]>
1 parent 50a3dab commit 90f1aaa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

model/transformers/examples/ner/test_ner_model.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ def python_test(self, filename):
3131
stdout = subprocess.check_output([sys.executable, filepath])
3232
lines = stdout.decode().split("\n")
3333
# Check the Accuracy
34-
self.assertIn("Accuracy: 0.0", lines)
34+
if not list(filter(lambda line: line.startswith("Accuracy: "), lines)):
35+
raise AssertionError(f"Accuracy not found in: {lines}")
3536
# Check the predicted tag
3637
for line in lines:
3738
try:

0 commit comments

Comments
 (0)