From 2085f2090121c8e33c2d174d522569955db728b1 Mon Sep 17 00:00:00 2001 From: matt Date: Tue, 18 Jan 2022 17:33:38 +0000 Subject: [PATCH] Fix a sneaky reference to compute_loss in the tests --- tests/test_modeling_tf_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_modeling_tf_common.py b/tests/test_modeling_tf_common.py index 2c7e8fb103..dda3c244c5 100644 --- a/tests/test_modeling_tf_common.py +++ b/tests/test_modeling_tf_common.py @@ -1064,7 +1064,7 @@ class TFModelTesterMixin: config, inputs_dict = self.model_tester.prepare_config_and_inputs_for_common() for model_class in self.all_model_classes: model = model_class(config) - if getattr(model, "compute_loss", None): + if getattr(model, "hf_compute_loss", None): # The number of elements in the loss should be the same as the number of elements in the label prepared_for_class = self._prepare_for_class(inputs_dict.copy(), model_class, return_labels=True) added_label = prepared_for_class[