Skip to content

Commit

Permalink
#0: Change assert
Browse files Browse the repository at this point in the history
  • Loading branch information
mtairum committed Dec 10, 2024
1 parent f05f253 commit c460dc3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions models/demos/llama3/tests/test_llama_accuracy.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,5 +390,9 @@ def test_tt_model_accuracy(
)

logger.info(f"Top-1: {total_top1_acc:.0f}% | Top-5: {total_top5_acc:.0f}%")
assert total_top1_acc > min_top1_acc, f"Top-1 accuracy {total_top1_acc:.1f}% is too low (expected >{min_top1_acc}%)"
assert total_top5_acc > min_top5_acc, f"Top-5 accuracy {total_top5_acc:.1f}% is too low (expected >{min_top5_acc}%)"
assert (
total_top1_acc >= min_top1_acc
), f"Top-1 accuracy {total_top1_acc:.1f}% is too low (expected >={min_top1_acc}%)"
assert (
total_top5_acc >= min_top5_acc
), f"Top-5 accuracy {total_top5_acc:.1f}% is too low (expected >={min_top5_acc}%)"

0 comments on commit c460dc3

Please sign in to comment.