瀏覽代碼

Fix flaky test_remote_module_call (#144)

* fix flappy test

increase tolerance to 1e-5

* Update test_moe.py

* Update test_moe.py

Co-authored-by: justheuristic <justheuristic@gmail.com>
MaximKsh 4 年之前
父節點
當前提交
b8e794b92d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tests/test_moe.py

+ 1 - 1
tests/test_moe.py

@@ -88,7 +88,7 @@ def test_remote_module_call():
         out3 = real_expert(dummy_x)
         assert out3.shape == (3, 1024)
         out3_again = real_expert(dummy_x[1:])
-        assert torch.allclose(out3_again, out3[1:], atol=1e-6, rtol=0)
+        assert torch.allclose(out3_again, out3[1:], atol=1e-5, rtol=0)
         out3_again.norm().backward()
         assert dummy_x.grad is not None and dummy_x.grad.norm() > 0