[ROCm][CI] Gate incompatible HF references on Transformers v5 (#41532)
Signed-off-by: Andreas Karatzas <akaratza@amd.com>
This commit is contained in:
+24
-10
@@ -145,22 +145,28 @@ class _HfExamplesInfo:
|
||||
# Only check the base version for the min/max version, otherwise preview
|
||||
# models cannot be run because `x.yy.0.dev0`<`x.yy.0`
|
||||
if min_version and Version(cur_base_version) < Version(min_version):
|
||||
is_version_valid = not check_min_version
|
||||
is_version_valid = False
|
||||
should_check_version = check_min_version
|
||||
msg += f">={min_version}` is required to run this model."
|
||||
elif max_version and Version(cur_base_version) > Version(max_version):
|
||||
is_version_valid = not check_max_version
|
||||
is_version_valid = False
|
||||
should_check_version = check_max_version
|
||||
msg += f"<={max_version}` is required to run this model."
|
||||
else:
|
||||
is_version_valid = True
|
||||
should_check_version = False
|
||||
|
||||
# check if Transformers version breaks the corresponding model runner,
|
||||
# skip test when model runner not compatible
|
||||
is_reason_valid = not (
|
||||
check_version_reason
|
||||
and self.transformers_version_reason
|
||||
# Reasons explain a known incompatibility with a violated version
|
||||
# bound. They should not skip models when the installed version is
|
||||
# already within the requested range.
|
||||
is_reason_applicable = (
|
||||
not is_version_valid
|
||||
and self.transformers_version_reason is not None
|
||||
and check_version_reason in self.transformers_version_reason
|
||||
)
|
||||
is_transformers_valid = is_version_valid and is_reason_valid
|
||||
is_transformers_valid = is_version_valid or (
|
||||
not should_check_version and not is_reason_applicable
|
||||
)
|
||||
if is_transformers_valid:
|
||||
return None
|
||||
elif self.transformers_version_reason:
|
||||
@@ -405,7 +411,15 @@ _TEXT_GENERATION_EXAMPLE_MODELS = {
|
||||
"openbmb/MiniCPM3-4B", trust_remote_code=True
|
||||
),
|
||||
"MiniCPM4ForCausalLM": _HfExamplesInfo(
|
||||
"openbmb/MiniCPM4.1-8B", trust_remote_code=True
|
||||
"openbmb/MiniCPM4.1-8B",
|
||||
min_transformers_version="4.56",
|
||||
max_transformers_version="4.57",
|
||||
transformers_version_reason={
|
||||
"hf": "HF remote code imports removed `is_torch_fx_available`; "
|
||||
"the upstream compatibility shim request was closed as not planned: "
|
||||
"https://github.com/huggingface/transformers/issues/44561"
|
||||
},
|
||||
trust_remote_code=True,
|
||||
),
|
||||
"MiniMaxForCausalLM": _HfExamplesInfo("MiniMaxAI/MiniMax-Text-01-hf"),
|
||||
"MiniMaxText01ForCausalLM": _HfExamplesInfo(
|
||||
@@ -786,7 +800,7 @@ _MULTIMODAL_EXAMPLE_MODELS = {
|
||||
),
|
||||
"MusicFlamingoForConditionalGeneration": _HfExamplesInfo(
|
||||
"nvidia/music-flamingo-2601-hf",
|
||||
min_transformers_version="5.3.0",
|
||||
min_transformers_version="5.5.0",
|
||||
transformers_version_reason={
|
||||
"vllm": "Needs https://github.com/huggingface/transformers/pull/43538"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user