Skip to content

Comments

fix(testing): Fix BLOOM tokenizer, CLAP audio features, and CLVP text tester usage in tests#43798

Merged
Rocketknight1 merged 1 commit intohuggingface:mainfrom
harshaljanjani:fix/tokenizers-clap-clvp-api-regressions
Feb 6, 2026
Merged

fix(testing): Fix BLOOM tokenizer, CLAP audio features, and CLVP text tester usage in tests#43798
Rocketknight1 merged 1 commit intohuggingface:mainfrom
harshaljanjani:fix/tokenizers-clap-clvp-api-regressions

Conversation

@harshaljanjani
Copy link
Contributor

@harshaljanjani harshaljanjani commented Feb 6, 2026

What does this PR do?

The following failing tests were identified and fixed in this PR:

BLOOM: batch_encode_plus() method was removed from PreTrainedTokenizerBase in commit 05c0e1d (the "rm slow tokenizers" refactor, #40936). The functionality was absorbed into __call__, so tokenizer(.) is the current equivalent.
CLAP: ClapModel.get_audio_features() returns a BaseModelOutputWithPooling obj not a tensor. The method internally calls self.audio_model(.), projects & normalizes features, stores them in audio_outputs.pooler_output, and returns the full output object. The old code calling .cpu() directly on the output object caused AttributeError.
CLVP: ModelTesterMixin has inherited tests (a couple are test_get_text_features_output, test_get_text_features_hidden_states, test_get_text_features_attentions) that fire when the model has get_text_features(). These tests call _text_features_prepare_config_and_inputs() which expects self.model_tester.text_model_tester to exist. Again, follows the canonical pattern in other multi-modal models like BridgeTower, Kosmos2.

Before the fix (feel free to cross-check; these errors are reproducible):

before_testing

After the fix (feel free to cross-check):

after_testing

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you fix any necessary existing tests?

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

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

run-slow: bloom, clap, clvp

@harshaljanjani harshaljanjani marked this pull request as ready for review February 6, 2026 13:06
@github-actions github-actions bot requested a review from ydshieh February 6, 2026 13:06
Copy link
Member

@Rocketknight1 Rocketknight1 left a comment

Choose a reason for hiding this comment

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

Validated the fixes, and thank you for the PR!

@Rocketknight1
Copy link
Member

run-slow: bloom, clap, clvp

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

This comment contains run-slow, running the specified jobs:

models: ["models/bloom", "models/clap", "models/clvp"]
quantizations: []

@HuggingFaceDocBuilderDev

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.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

CI Results

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN 55fffb10 merge commit
PR 52ed6d4f branch commit
main 8c3ac8f1 base commit

✅ No failing test specific to this PR 🎉 👏 !

@Rocketknight1 Rocketknight1 merged commit 711f279 into huggingface:main Feb 6, 2026
21 checks passed
@harshaljanjani harshaljanjani deleted the fix/tokenizers-clap-clvp-api-regressions branch February 6, 2026 13:57
jiosephlee pushed a commit to jiosephlee/transformers_latest that referenced this pull request Feb 11, 2026
… tester usage in tests (huggingface#43798)

fix(testing): Small test-only fixes for CLAP, BLOOM, and CLVP
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