From 7f006cdd875799d7d66a8bda964ab90b0f7ed3f4 Mon Sep 17 00:00:00 2001 From: LysandreJik Date: Fri, 30 Aug 2019 23:58:49 -0400 Subject: [PATCH] Set seed for head_masking test --- pytorch_transformers/tests/modeling_common_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pytorch_transformers/tests/modeling_common_test.py b/pytorch_transformers/tests/modeling_common_test.py index 29f41be7de..8b9a2ffd17 100644 --- a/pytorch_transformers/tests/modeling_common_test.py +++ b/pytorch_transformers/tests/modeling_common_test.py @@ -163,6 +163,7 @@ class CommonTestCases: if not self.test_head_masking: return + torch.manual_seed(42) config, inputs_dict = self.model_tester.prepare_config_and_inputs_for_common() config.output_attentions = True