From 1d4a35b396f2121c039d940f2e58655059b4cf04 Mon Sep 17 00:00:00 2001 From: Patrick von Platen Date: Fri, 17 Apr 2020 17:26:16 +0200 Subject: [PATCH] Higher tolerance for past testing in TF T5 (#3844) --- tests/test_modeling_tf_t5.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_modeling_tf_t5.py b/tests/test_modeling_tf_t5.py index de2ee07930..cad0aceb1c 100644 --- a/tests/test_modeling_tf_t5.py +++ b/tests/test_modeling_tf_t5.py @@ -177,7 +177,7 @@ class TFT5ModelTest(TFModelTesterMixin, unittest.TestCase): output_from_past_slice = output_from_past[:, 0, random_slice_idx] # test that outputs are equal for slice - tf.debugging.assert_near(output_from_past_slice, output_from_no_past_slice, rtol=1e-6) + tf.debugging.assert_near(output_from_past_slice, output_from_no_past_slice, rtol=1e-3) def create_and_check_t5_decoder_model_attention_mask_past( self, config, input_ids, decoder_input_ids, attention_mask @@ -221,7 +221,7 @@ class TFT5ModelTest(TFModelTesterMixin, unittest.TestCase): output_from_past_slice = output_from_past[:, 0, random_slice_idx] # test that outputs are equal for slice - tf.debugging.assert_near(output_from_past_slice, output_from_no_past_slice, rtol=1e-6) + tf.debugging.assert_near(output_from_past_slice, output_from_no_past_slice, rtol=1e-3) def prepare_config_and_inputs_for_common(self): config_and_inputs = self.prepare_config_and_inputs()