[tests] Fix tiny-random tests with newer transformers#3829
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello!
Pull Request overview
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 totransformers.