Skip to content

Commit

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

Summary: Co-authored-by: Philip Meier <github.pmeier@posteo.de>

Reviewed By: vincentqb, cpuhrsch

Differential Revision: D28679980

fbshipit-source-id: 7fe453c40e375a12a908dbb4ac42263755f2f8c9
  • Loading branch information
datumbox authored and facebook-github-bot committed May 25, 2021
1 parent 49c4a63 commit fdaa46c
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 fdaa46c

Please sign in to comment.