From 69d772b80705a073d31ab416a0270a566e8a5ef2 Mon Sep 17 00:00:00 2001 From: Jarrett Ye Date: Mon, 9 Dec 2024 16:24:18 +0800 Subject: [PATCH] update unit tests --- tests/model_test.py | 2 +- tests/simulator_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/model_test.py b/tests/model_test.py index 8b5180e..7470f82 100644 --- a/tests/model_test.py +++ b/tests/model_test.py @@ -65,7 +65,7 @@ def test_forward(self): difficulty = state[:, 1] assert torch.allclose( stability, - torch.tensor([0.2619, 1.7073, 5.8691, 25.0123, 0.3403, 2.1482]), + torch.tensor([0.2619, 1.7074, 5.8691, 25.0124, 0.2859, 2.1482]), atol=1e-4, ) assert torch.allclose( diff --git a/tests/simulator_test.py b/tests/simulator_test.py index 3da1aba..13e6abf 100644 --- a/tests/simulator_test.py +++ b/tests/simulator_test.py @@ -11,7 +11,7 @@ def test_simulate(self): cost_per_day, revlogs, ) = simulate(w=DEFAULT_PARAMETER, request_retention=0.9) - assert memorized_cnt_per_day[-1] == 5875.025236206539 + assert memorized_cnt_per_day[-1] == 5880.482440745369 def test_optimal_retention(self): default_params = {