Skip to content

Commit

Permalink
Update UT code
Browse files Browse the repository at this point in the history
Signed-off-by: Cheng, Penghui <penghui.cheng@intel.com>
  • Loading branch information
PenghuiCheng committed Dec 18, 2023
1 parent 2e48edc commit b64eaa5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/neural_compressor/test_modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def test_compare_with_and_without_past_key_values(self):
self.assertEqual(outputs_model_with_pkv.shape[1], self.GENERATION_LENGTH)
self.assertEqual(outputs_model_without_pkv.shape[1], self.GENERATION_LENGTH)
self.assertTrue(
with_pkv_timer.elapsed / without_pkv_timer.elapsed > self.SPEEDUP_CACHE,
without_pkv_timer.elapsed / with_pkv_timer.elapsed > self.SPEEDUP_CACHE,
f"With pkv latency: {with_pkv_timer.elapsed:.3f} ms, without pkv latency: {without_pkv_timer.elapsed:.3f} ms,"
f" speedup: {without_pkv_timer.elapsed / with_pkv_timer.elapsed:.3f}",
)

0 comments on commit b64eaa5

Please sign in to comment.