From f5d3b467eb812e95fd946a9540a65d0f662d9967 Mon Sep 17 00:00:00 2001 From: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com> Date: Fri, 11 Sep 2026 15:30:26 +0200 Subject: [PATCH] Use the canonical id for the tiny GPTNeoX sequence classification model `tests/test_chat_template_utils.py` spelled the model `trl-internal-testing/tiny-GptNeoXForSequenceClassification`, while the repository is `trl-internal-testing/tiny-GPTNeoXForSequenceClassification`. The Hub resolves the first with a redirect, so the tests pass either way. `apply_model_revisions` in `tests/conftest.py` looks the model id up by exact string, so a `MODEL_REVISIONS` entry written with the canonical id would not have matched these three call sites: the tests would have loaded the default branch and passed, reporting a tiny model PR as tested when it was not. --- tests/test_chat_template_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_chat_template_utils.py b/tests/test_chat_template_utils.py index 67a76f9d2fc..0d7b3e59619 100644 --- a/tests/test_chat_template_utils.py +++ b/tests/test_chat_template_utils.py @@ -103,9 +103,9 @@ def test_apply_new_chat_template(self): def test_clone_with_sequence_classification_model(self): # This tokenizer doesn't have a chat_template by default - tokenizer = AutoTokenizer.from_pretrained("trl-internal-testing/tiny-GptNeoXForSequenceClassification") + tokenizer = AutoTokenizer.from_pretrained("trl-internal-testing/tiny-GPTNeoXForSequenceClassification") model = AutoModelForSequenceClassification.from_pretrained( - "trl-internal-testing/tiny-GptNeoXForSequenceClassification" + "trl-internal-testing/tiny-GPTNeoXForSequenceClassification" ) # This one has a chat_template by default source = "trl-internal-testing/tiny-Qwen3ForCausalLM" @@ -401,7 +401,7 @@ def test_supports_tool_calling(self, model_id): pytest.param("trl-internal-testing/tiny-BloomForCausalLM", id="bloom"), pytest.param("trl-internal-testing/tiny-GPT2LMHeadModel", id="gpt2"), pytest.param("trl-internal-testing/tiny-GPTNeoXForCausalLM", id="gptneox"), - pytest.param("trl-internal-testing/tiny-GptNeoXForSequenceClassification", id="gptneox-seq"), + pytest.param("trl-internal-testing/tiny-GPTNeoXForSequenceClassification", id="gptneox-seq"), pytest.param("trl-internal-testing/tiny-OPTForCausalLM", id="opt"), pytest.param("trl-internal-testing/tiny-T5ForConditionalGeneration", id="t5"), # TemplateError: rejects tool role sequence