Skip to content

Commit f59bbb7

Browse files
committed
make fixup
1 parent 16c36dc commit f59bbb7

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

tests/models/encoder_decoder/test_modeling_encoder_decoder.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,10 @@ def check_encoder_decoder_model_output_attentions_from_config(
443443
decoder_attention_mask=decoder_attention_mask,
444444
)
445445
self.assertTrue(
446-
all(key not in outputs_encoder_decoder for key in ["encoder_attentions", "decoder_attentions", "cross_attentions"])
446+
all(
447+
key not in outputs_encoder_decoder
448+
for key in ["encoder_attentions", "decoder_attentions", "cross_attentions"]
449+
)
447450
)
448451

449452
config.output_attentions = True # inner model config -> will work

tests/models/encoder_decoder/test_modeling_tf_encoder_decoder.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,10 @@ def check_encoder_decoder_model_output_attentions_from_config(
345345
kwargs=kwargs,
346346
)
347347
self.assertTrue(
348-
all(key not in outputs_encoder_decoder for key in ["encoder_attentions", "decoder_attentions", "cross_attentions"])
348+
all(
349+
key not in outputs_encoder_decoder
350+
for key in ["encoder_attentions", "decoder_attentions", "cross_attentions"]
351+
)
349352
)
350353

351354
config.output_attentions = True # inner model config -> will work

0 commit comments

Comments
 (0)