FX symbolic_trace: do not test decoder_inputs_embeds (#31840)

only test input_embeds, not decoder_input_embeds
This commit is contained in:
fxmarty
2024-07-09 08:07:46 +02:00
committed by GitHub
parent 952dfd4867
commit 0abf5e8eae

View File

@@ -1215,7 +1215,7 @@ class ModelTesterMixin:
(past_mask, inputs_to_test[1]["attention_mask"]), dim=1 (past_mask, inputs_to_test[1]["attention_mask"]), dim=1
) )
if "inputs_embeds" in inspect.signature(model.forward).parameters: if "inputs_embeds" in inspect.signature(model.forward).parameters and not model.config.is_encoder_decoder:
inputs_to_test.append( inputs_to_test.append(
{ {
"inputs_embeds": torch.rand( "inputs_embeds": torch.rand(