Skip to content

Commit

Permalink
relax unit test to 1e-05
Browse files Browse the repository at this point in the history
  • Loading branch information
FDecaYed committed Apr 19, 2023
1 parent c8d4320 commit 4e7d4e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def run_and_test(self, ref_model, ref_inputs, test_model, test_inputs):

for ref_w, test_w in zip(ref_weights, test_weights):
# assert close here since order of accumulations(inputs and batch dim) might have changed
self.assertAllClose(tf.convert_to_tensor(ref_w), tf.convert_to_tensor(test_w))
self.assertAllClose(tf.convert_to_tensor(ref_w), tf.convert_to_tensor(test_w), 1e-05, 1e-05)

def test_broadcast(self):
tf.keras.utils.set_random_seed(int(time.time()) + self.hvd_rank)
Expand Down
2 changes: 1 addition & 1 deletion tests/dist_model_parallel_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def run_and_test(self, ref_model, ref_inputs, test_model, test_inputs):

for ref_w, test_w in zip(ref_weights, test_weights):
# assert close here since order of accumulations(inputs and batch dim) might have changed
self.assertAllClose(tf.convert_to_tensor(ref_w), tf.convert_to_tensor(test_w))
self.assertAllClose(tf.convert_to_tensor(ref_w), tf.convert_to_tensor(test_w), 1e-05, 1e-05)

def test_broadcast(self):
tf.keras.utils.set_random_seed(int(time.time()) + self.hvd_rank)
Expand Down

0 comments on commit 4e7d4e8

Please sign in to comment.