[bart] minor test fixes (#35965)

fix tests
This commit is contained in:
Joao Gante
2025-01-30 10:00:11 +00:00
committed by GitHub
parent 19f2ec80cf
commit 8bc4c89ee9
2 changed files with 3 additions and 1 deletions

View File

@@ -4532,6 +4532,8 @@ class ModelTesterMixin:
config.max_position_embeddings = max_new_tokens + dummy_input.shape[1] + 1
model = model_class(config)
if "position_ids" not in inspect.signature(model.forward).parameters:
self.skipTest("Model does not support position_ids")
with tempfile.TemporaryDirectory() as tmpdirname:
model.save_pretrained(tmpdirname)