Skip to content

Commit

Permalink
Add new assert_equal test util based on torch.testing.assert_close (#…
Browse files Browse the repository at this point in the history
…3872)

Co-authored-by: Philip Meier <github.pmeier@posteo.de>
  • Loading branch information
NicolasHug and pmeier authored May 21, 2021
1 parent 231f80d commit 89cb908
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/_assert_utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"""This is a temporary module and should be removed as soon as torch.testing.assert_equal is supported."""
# TODO: remove this as soon torch.testing.assert_equal is supported

import functools

import torch.testing

__all__ = ["assert_equal"]


assert_equal = functools.partial(torch.testing.assert_close, rtol=0, atol=0)

0 comments on commit 89cb908

Please sign in to comment.