Skip to content

[serge] Fix 6 integration tests for model seamless_m4t_v2 failing with other (other (6)) - #48425

Merged
tarekziade merged 2 commits into
mainfrom
serge/fix/itf-db366a7a13d4-f50c5e85
Aug 31, 2026
Merged

tarekziade merged 2 commits into
mainfrom
serge/fix/itf-db366a7a13d4-f50c5e85

Conversation

@sergereview

@sergereview sergereview Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

CPU CI GPU run-slow

Original CI failure

  • Failure group: 6 integration tests for model seamless_m4t_v2failing withother (other (6))
  • tests/models/seamless_m4t_v2/test_modeling_seamless_m4t_v2.py::SeamlessM4Tv2ModelIntegrationTest::test_speech_to_speech_model [multi-gpu] (other, seen 6/7)
CI traceback — tests/models/seamless_m4t_v2/test_modeling_seamless_m4t_v2.py::SeamlessM4Tv2ModelIntegrationTest::test_speech_to_speech_model
(line 421)  ValueError: Invalid input type. Must be a single audio or a list of audio

Where to watch it:

Relates to #48423

The SeamlessM4Tv2ModelIntegrationTest speech integration tests crash in audio_utils.make_list_of_audio because the input_audio fixture wraps the batch of audio samples in an extra list, producing a triply-nested [[[float]]] structure that the audio validation helpers reject.

Root cause: audio=[input_features.tolist()] creates an invalid audio input shape.

Fix: remove the extra list wrapping so the processor receives a proper list of two mono audio samples (audio=input_features.tolist()).


✅ Verified on GPU

serge ran the targeted @slow test(s) on a GPU runner and opened this PR only after they passed with this patch. Each targeted test was run 5× on both the pre-patch and patched trees to rule out flakiness — the result held on every run.

Possibly related

Existing issues/PRs mentioning test_speech_to_speech_model (keyword match — not verified to share a root cause):

  • #42377 — Remove unnecessary tied weights for Seamless M4T? (PR, closed, updated 2025-12-01)
  • #42326 — Fix processor usage + add chat_template support to TTS pipeline, and shift common chat template logic to base class. (PR, closed, updated 2025-11-27)

This change was produced automatically by serge from a CI failure report. The patch was generated by an LLM and applied by serge; review before merging.

serge v0.1.0 · model: moonshotai/Kimi-K2.7-Code · 28 LLM turns · 30 tool calls · 68.6s · 898719 in / 13877 out tokens

@sergereview
sergereview Bot marked this pull request as ready for review August 31, 2026 07:46
@github-actions
github-actions Bot requested a review from ydshieh August 31, 2026 07:46
@HuggingFaceDocBuilderDev

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.

@eustlb eustlb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!
I've added the change from input_features to audio_array since the name was misleading !

@github-actions

Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: seamless_m4t_v2

@github-actions

Copy link
Copy Markdown
Contributor

CI recap

Dashboard: View test results in Grafana
Latest run: 33369838292:1
Result: success | Jobs: 3 | Tests: 353 | Failures: 0 | Duration: 5m 23s

@tarekziade
tarekziade enabled auto-merge August 31, 2026 09:12
@tarekziade
tarekziade added this pull request to the merge queue Aug 31, 2026
Merged via the queue into main with commit dea7065 Aug 31, 2026
39 checks passed
@tarekziade
tarekziade deleted the serge/fix/itf-db366a7a13d4-f50c5e85 branch August 31, 2026 09:23
tarekziade added a commit that referenced this pull request Sep 7, 2026
`test_to_rus_speech` did not fail because of a `squeeze()` quirk: #48425 changed the
`input_audio` fixture from `audio=[input_features.tolist()]` (one 2-channel sample,
batch size 1) to `audio=audio_array.tolist()` (two mono samples, batch size 2), so
`output.sequences` became `[2, N]` and `tolist()` nested. Flattening cannot make the
test pass -- it produces 2N tokens against an 8-token expectation -- and the two
following assertions on `unit_sequences` and `waveform` stay nested as well.

Restore the batch-1 input the expected values were computed with. The sample is passed
as a tensor because `make_list_of_audio` (the validation that made #48425 necessary)
only accepts arrays, tensors or lists of floats, not a triply-nested list. The
resulting `input_features` are bit-identical to the pre-#48425 ones (verified: both
`(1, 62, 160)`, `torch.equal` on features and attention mask).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
tarekziade added a commit to huggingface/serge that referenced this pull request Sep 7, 2026
…ecker list (#117)

Three gaps behind the 2026-09-04..06 task PRs on transformers.

### `expectation_guard`: an assertion rewrite wearing a method call

Rule 2 asks whether removing literals leaves both sides identical, so a
*new identifier* reads as a real code change.
[transformers#48553](huggingface/transformers#48553)
added `.flatten()` to `output.sequences.squeeze().tolist()` and was
therefore classified a real fix, keeping its verification claim — for a
patch that cannot make the test pass.

A residue difference explained entirely by shape/ordering operations
appearing on one side is now `expectation_only`, with its own sentence
in `reason()` ("rewrites how an assertion compares its values… a shape
or ordering difference is a sign the inputs changed"). `.to(...)`,
`.cpu()`, `.float()` are deliberately **not** in the set: those change
the value rather than its shape, so a patch adding one keeps its claim.
The module stays a label, not a blocker.

### `verify`: the gate cannot see what it does not run

`extract_verify_targets` returns the failure group's own node-ids, which
is full coverage for a patch confined to those tests and none at all for
one that edits scaffolding they share.
[transformers#48425](huggingface/transformers#48425)
changed the `input_audio` `cached_property` from one 2-channel sample to
two mono samples, verified its 6 targeted tests green, and left
`test_to_rus_speech` — same class, same fixture — comparing a nested
list against a flat expectation. #48553 then tried to paper over that.

`patch_needs_collateral(patch, node_ids)` spots a hunk that shows
scaffolding (`setUp`, `tearDown`, `setUpClass`, `@cached_property`,
`@classmethod`, `@property`) or a `def` that is not one of the targeted
tests, and `_make_verify_gate` turns the collateral suite on for that
run even when `VERIFY_RUN_COLLATERAL` is off. The mechanism already
existed; it just had to be asked for.

It is judged from the hunk text alone — the patch is the model's
proposal, so its `@@` headers carry no function context to trust. A
change inside a targeted test's body, or an expectation hunk whose
context shows no `def`, does not trigger it.

### `prod.yaml`: the checker list had drifted

`TASK_NORMALIZE_COMMAND` spelled out 23 checker names instead of calling
`make fix-repo`, and was missing `noisy_comments`, `reviewers` and
`add_dates` — all three of which transformers' CI runs. A patch could
clear this gate and still land a red `check-code-quality` / `Check
repository consistency`. (`noisy_comments` is the one that stings: it
flags comments that restate the code, which is exactly what an LLM patch
adds.)

transformers' Makefile derives `fix-repo` from the CI sets *precisely so
the list cannot drift*, and its `utils/checkers-requirements.txt` is
already written for this `--network none` sandbox (per-checker opt-in).
`TRANSFORMERS_SKIP_CHECKER_REQUIREMENTS=1` keeps even those installs
from burning retries. `make` is guaranteed by
`docker/Dockerfile.task-runner`.

`948 passed, 3 skipped` (`tests/test_app.py` deselected — it needs
`flask`, absent from my local env and unrelated).

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
sbucaille pushed a commit to sbucaille/transformers that referenced this pull request Sep 16, 2026
…ith `other` (other (6)) (huggingface#48425)

* [serge] Fix 6 integration tests for model `seamless_m4t_v2` failing with `other` (other (6))

* input_features is a misleading name here!

---------

Co-authored-by: serge[bot] <serge[bot]@users.noreply.github.com>
Co-authored-by: eustlb <94853470+eustlb@users.noreply.github.com>
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.

3 participants