Skip to content

[tests] Fix tiny-random tests with newer transformers#3829

Merged
tomaarsen merged 2 commits into
huggingface:mainfrom
tomaarsen:fix/tests_tiny_random
Jun 18, 2026
Merged

[tests] Fix tiny-random tests with newer transformers#3829
tomaarsen merged 2 commits into
huggingface:mainfrom
tomaarsen:fix/tests_tiny_random

Conversation

@tomaarsen

Copy link
Copy Markdown
Member

Hello!

Pull Request overview

  • Fix tiny-random tests with newer transformers

Details

I loaded more tiny-random models and reran the extended test suite on newer transformers. There were a few issues, largely due to issues with the tiny-random model checkpoints themselves. I resolved them here, plus a small improvement where I also pass the "duration" down to transformers.

  • Tom Aarsen

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the tiny-random transformer test matrix and related test utilities to keep the extended test suite passing on newer transformers, including adjustments for newly added/changed model architectures and improved video metadata propagation.

Changes:

  • Expanded/updated the tiny model mapping (including new architectures and revised checkpoints such as nemotron_h).
  • Updated multimodal inference tests to account for expected audio-specific failures for certain architectures.
  • Improved video handling by passing "duration" in video metadata and adding a session fixture to coerce torchcodec frame indices to int64 on Windows.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/base/modules/transformer/transformers_tiny_models.json Updates the architecture→tiny-checkpoint mapping used to parameterize transformer tests.
tests/base/modules/transformer/test_text_generation.py Adds audio-specific expected-failure handling in modality and pair-modality inference tests.
tests/base/modules/transformer/test_feature_extraction.py Adds audio-specific expected-failure handling and fixes tuple-part consistency logic for message.
tests/base/modules/transformer/test_any_to_any.py Adds audio-specific expected-failure handling in modality and pair-modality inference tests.
tests/base/modules/transformer/conftest.py Adds EXPECT_AUDIO_FAILURE, patches torchcodec indices on Windows, enriches video metadata with duration, and adjusts config token-id handling.
sentence_transformers/base/modality.py Includes video "duration" in metadata passed through preprocessing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/base/modules/transformer/conftest.py
@tomaarsen
tomaarsen merged commit 28e7946 into huggingface:main Jun 18, 2026
17 of 18 checks passed
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