Skip to content

Commit

Permalink
operator_cache_hit testing
Browse files Browse the repository at this point in the history
  • Loading branch information
StanChan03 committed Dec 27, 2024
1 parent 3955735 commit 4386b7c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/tests/lm_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ def test_operator_cache(setup_models, model):
first_responses = lm(batch).outputs
assert lm.stats.total_usage.operator_cache_hits == 0
second_responses = lm(batch).outputs
lotus.logger.debug(f"Operator Cache hits: {lm.stats.total_usage.operator_cache_hits}")
assert lm.stats.total_usage.operator_cache_hits == 2
assert first_responses == second_responses

Expand All @@ -509,5 +510,6 @@ def test_disable_operator_cache(setup_models, model):
first_responses = lm(batch).outputs
assert lm.stats.total_usage.operator_cache_hits == 0
second_responses = lm(batch).outputs
lotus.logger.debug(f"Operator Cache hits: {lm.stats.total_usage.operator_cache_hits}")
assert lm.stats.total_usage.operator_cache_hits == 2
assert first_responses == second_responses

0 comments on commit 4386b7c

Please sign in to comment.