Skip to content

Give every model-parametrized test case a consistent id - #8563

Merged
qgallouedec merged 7 commits into
mainfrom
consistent-test-param-ids
Nov 25, 2026
Merged

qgallouedec merged 7 commits into
mainfrom
consistent-test-param-ids

Conversation

@qgallouedec

@qgallouedec qgallouedec commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Model-parametrized tests now give every case an explicit id, and a model has the same id in every test. Before, some cases had no id (test_train[trl-internal-testing/tiny-Qwen2ForCausalLM-2.5]) and the same model went by several names (qwen38, qwen38_v2, qwen3.8-v2; llama32, llama3.2; glm4moe, glm4-moe).

  • ids are the model name in lowercase, hyphen-separated, version attached: qwen2.5, qwen2.5-vl, qwen3.5-think, deepseek-v3-0528. Chat template variants follow the same form: qwen3.8-v2, deepseek-v3-v4.
  • AGENTS.md states the rule. Test ids change, test count doesn't (4887 collected before and after).
pytest tests/test_sft_trainer.py -k "qwen3.5-nothink" --collect-only -q

Note

Low Risk
Test-only parametrization and AGENTS.md documentation; no runtime or trainer logic changes.

Overview
Standardizes how model- and template-parametrized tests appear in pytest by giving every case an explicit pytest.param(..., id="...") and aligning ids across the suite (e.g. qwen2.5, qwen3.5-think, deepseek-v3-0528, qwen3.8-v2 for chat-template variants). Previously some cases used long Hub paths or inconsistent ids (qwen38 vs qwen3.8-v2, glm4moe vs glm4-moe).

.ai/AGENTS.md now documents the naming rule so new parametrizations stay consistent.

Touched files are mostly under tests/ (trainers, chat templates, data utils, experimental trainers): plain string/tuple parametrization entries are converted to pytest.param with ids; multi-argument cases (e.g. qwen2.5-instantiated, MoE LoRA matrix ids) get descriptive suffixes where needed. No test behavior or production code changes—only collection names and contributor guidance.

Reviewed by Cursor Bugbot for commit b89b9f2. Bugbot is set up for automated code reviews on this repo. Configure here.

Each model keeps the same pytest id in every test (qwen2.5, llama3.2, qwen3.5-think,
deepseek-v3-0528, ...), and chat template variants follow the same form (qwen3.8-v2).
Bare repo strings and tuples become pytest.param with an id. AGENTS.md states the rule.
…-ids

# Conflicts:
#	tests/test_chat_template_utils.py
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T12:02:01.988037Z 62099c8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@bot-ci-comment

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@albertvillanova albertvillanova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

  • tests/test_sft_trainer.py conflicts with main after #8536: keep id="qwen3-vl" with main's marks=.
  • Nit: AGENTS.md could say that chat-template cases are named after the template (qwen3.8-v2), since one model can carry several template ids.

@qgallouedec

Copy link
Copy Markdown
Member Author

Thanks! Both done: the conflict kept id="qwen3-vl" with main's marks= (11bf0c8), and AGENTS.md now says that a case setting a chat template is named after the template (b89b9f2).

@qgallouedec
qgallouedec merged commit 04a0c0d into main Nov 25, 2026
12 of 13 checks passed
@qgallouedec
qgallouedec deleted the consistent-test-param-ids branch November 25, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants