This repository was archived by the owner on Jun 3, 2025. It is now read-only.
[TextGeneration] Update pipeline inputs to support GenerationConfig#1250
Merged
Conversation
b610646 to
a69abf9
Compare
ac68490 to
506c687
Compare
627b849 to
ce85c4b
Compare
a4b6d93 to
6127737
Compare
bfineran
suggested changes
Sep 19, 2023
dbogunowicz
reviewed
Sep 21, 2023
93c012d to
e0cb484
Compare
bfineran
previously approved these changes
Sep 21, 2023
bfineran
left a comment
Contributor
There was a problem hiding this comment.
LGTM - can we check in any unit tests for this?
Satrat
previously approved these changes
Sep 21, 2023
1dc2bd1 to
3a18e5f
Compare
The base branch was changed.
e0cb484 to
8c5798a
Compare
bfineran
previously approved these changes
Sep 21, 2023
mgoin
reviewed
Sep 22, 2023
dbogunowicz
reviewed
Sep 22, 2023
f8f5448 to
b7f333f
Compare
bfineran
approved these changes
Sep 22, 2023
dbogunowicz
approved these changes
Sep 22, 2023
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary:
transformers.GenerationConfig. This will essentially be used in replacement of many of the inputs that we provide as separate fields (such asnum_return_sequences,top_k, etc).transformers.GenerationConfigobjectGenerationDefaultsclass will be usedGenerationConfigwill be used for the missing values, not theGenerationDefaultsclass.Test Cases
Dictionary:
string or Path
GenerationConfigobjectNone- no generation config is provided, will use theGenerationDefaultsinsteadSet
GenerationConfigon the pipeline levelSet
GenerationConfigon the pipeline level, override on the input levelFor the first prompt, the pipeline config is overwritten with the config given with the input. This results in 2 text generations for the first input. For the second input, as not config is given, the pipeline config is used, resulting in 3 text generations.