CI: avoid human error, automatically infer generative models (#33212)

* tmp commit

* move tests to the right class

* remove ALL all_generative_model_classes = ...

* skip tf roberta

* skip InstructBlipForConditionalGenerationDecoderOnlyTest

* videollava

* reduce diff

* reduce diff

* remove  on vlms

* fix a few more

* manual rebase bits

* more manual rebase

* remove all manual generative model class test entries

* fix up to ernie

* a few more removals

* handle remaining cases

* recurrent gemma

* it's better here

* make fixup

* tf idefics is broken

* tf bert + generate is broken

* don't touch tf :()

* don't touch tf :(

* make fixup

* better comments for test skips

* revert tf changes

* remove empty line removal

* one more

* missing one
This commit is contained in:
Joao Gante
2025-02-13 15:27:11 +00:00
committed by GitHub
parent 06231fdfc7
commit 62c7ea0201
162 changed files with 50 additions and 198 deletions

View File

@@ -66,7 +66,6 @@ def random_attention_mask(shape, rng=None):
@require_flax
class FlaxGenerationTesterMixin:
model_tester = None
all_generative_model_classes = ()
def _get_input_ids_and_config(self):
config, inputs = self.model_tester.prepare_config_and_inputs_for_common()

View File

@@ -28,7 +28,7 @@ import pytest
from packaging import version
from parameterized import parameterized
from transformers import AutoConfig, is_torch_available, pipeline
from transformers import AutoConfig, AutoProcessor, AutoTokenizer, is_torch_available, pipeline
from transformers.testing_utils import (
is_flaky,
require_accelerate,
@@ -61,8 +61,6 @@ if is_torch_available():
AutoModelForSeq2SeqLM,
AutoModelForSpeechSeq2Seq,
AutoModelForVision2Seq,
AutoProcessor,
AutoTokenizer,
BartForConditionalGeneration,
BartTokenizer,
GPT2LMHeadModel,
@@ -119,7 +117,6 @@ from transformers.utils import is_sklearn_available
class GenerationTesterMixin:
input_name = "input_ids"
model_tester = None
all_generative_model_classes = ()
max_new_tokens = 3
def prepare_config_and_inputs_for_generate(self, batch_size=2):