Skip to content

[CB] [Minor] Simplify test suite#44858

Merged
remi-or merged 11 commits intomainfrom
cb-better-tests
Mar 24, 2026
Merged

[CB] [Minor] Simplify test suite#44858
remi-or merged 11 commits intomainfrom
cb-better-tests

Conversation

@remi-or
Copy link
Copy Markdown
Collaborator

@remi-or remi-or commented Mar 19, 2026

Right now, the continuous batching tests all use similar mechanisms, namely:

  1. loading a model and a tokenizer
  2. preparing data for generate or generate_batch
  3. running generate to compare its outputs with generate_batch

This PR adds 3 helper functions to do that, increasing code re-usability across the file.
It also simplifies tests for read and write indices.
It's a minor PR but it will help with future PRs like per-request logits processors

@remi-or remi-or requested a review from ArthurZucker March 19, 2026 13:22
@remi-or remi-or self-assigned this Mar 19, 2026
@remi-or remi-or mentioned this pull request Mar 23, 2026
5 tasks
@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.

@remi-or remi-or enabled auto-merge March 24, 2026 11:21
@remi-or remi-or added this pull request to the merge queue Mar 24, 2026
Merged via the queue into main with commit 4f8de83 Mar 24, 2026
20 checks passed
@remi-or remi-or deleted the cb-better-tests branch March 24, 2026 11:44
zucchini-nlp pushed a commit to zucchini-nlp/transformers that referenced this pull request Mar 27, 2026
* Common helper functions and inputs

* Further simplify

* style

* Reformat last added test

* Fixes

* Fix test

* style
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