未验证 提交 cb0b53cb 编写于 作者: H hong 提交者: GitHub

fix auto tune unitest assert (#45421)

上级 c8955d0d
...@@ -90,9 +90,9 @@ class TestAutoTune(unittest.TestCase): ...@@ -90,9 +90,9 @@ class TestAutoTune(unittest.TestCase):
for key in status.keys(): for key in status.keys():
v = status[key] v = status[key]
if key == "cache_hit_rate": if key == "cache_hit_rate":
self.assertTrue(np.allclose(v, expected_res[key])) np.testing.assert_allclose(v, expected_res[key])
else: else:
self.assertEqual(v, expected_res[key]) np.testing.assert_array_equal(v, expected_res[key])
class TestDygraphAutoTuneStatus(TestAutoTune): class TestDygraphAutoTuneStatus(TestAutoTune):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册