Skip to content

Commit 6bea7b8

Browse files
ydshiehsgugger
andauthored
Minor update of run_call_with_unpacked_inputs (#18541)
Co-authored-by: Sylvain Gugger <[email protected]> Co-authored-by: ydshieh <[email protected]>
1 parent 8cb5ecd commit 6bea7b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/transformers/modeling_tf_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ def run_call_with_unpacked_inputs(self, *args, **kwargs):
398398
fn_args_and_kwargs.update(dict(zip(func.__code__.co_varnames[1:], args)))
399399

400400
# Encoder Decoder models delegate the application of the configuration options to their inner models.
401-
if "encoder_decoder" in str(self).lower():
401+
if "EncoderDecoder" in self.__class__.__name__:
402402
config = None
403403
else:
404404
config = self.config

0 commit comments

Comments
 (0)