From a92b940d0dfacfe31678b46e67186c9a2b7e8ef2 Mon Sep 17 00:00:00 2001 From: Yih-Dar <2521628+ydshieh@users.noreply.github.com> Date: Tue, 9 Aug 2022 14:33:41 +0200 Subject: [PATCH] Minor update of `run_call_with_unpacked_inputs` (#18541) Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> Co-authored-by: ydshieh --- src/transformers/modeling_tf_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transformers/modeling_tf_utils.py b/src/transformers/modeling_tf_utils.py index 703440d80ad71b..68ee4117a2f9db 100644 --- a/src/transformers/modeling_tf_utils.py +++ b/src/transformers/modeling_tf_utils.py @@ -398,7 +398,7 @@ def run_call_with_unpacked_inputs(self, *args, **kwargs): fn_args_and_kwargs.update(dict(zip(func.__code__.co_varnames[1:], args))) # Encoder Decoder models delegate the application of the configuration options to their inner models. - if "encoder_decoder" in str(self).lower(): + if "EncoderDecoder" in self.__class__.__name__: config = None else: config = self.config