Use kwargs for long lists of EngineCoreRequest
arguments in tests and fix extra kwargs
#24987
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.
Purpose
In most places in the tests, instantiations of
EngineCoreRequest
use kwargs instead of positional arguments. There are too many arguments to keep track of positionally. Additionally after recent refactors simplifying the arguments passed in for multimodal(see #23779), one instance was not correspondingly updated. The tests were still passing as a happy accident despite values were getting passed into wrong arguments.This change originally came up in #24278 (comment), by @DarkLight1337, but because we later refactored that PR to not require having to modify those instantiations at all, I broke this out into its own PR for easier review.
Test Plan
No new tests are needed.
Test Result
All of the tests in
tests/detokenizer/test_min_tokens.py
andtests/tokenization/test_detoknize.py
are passing in my local environment. Pending CI, this PR should be good to go.Essential Elements of an Effective PR Description Checklist
supported_models.md
andexamples
for a new model.