-
Notifications
You must be signed in to change notification settings - Fork 31.3k
Support having multiple sub-processors (of any kind) in the same processor #42667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
9c6357c
f3bd01c
c84b564
abd038d
114a48b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,8 +47,6 @@ class LasrProcessorKwargs(ProcessingKwargs, total=False): | |
|
|
||
|
|
||
| class LasrProcessor(ProcessorMixin): | ||
| tokenizer_class = "ParakeetTokenizerFast" | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cc @eustlb Same here, although is this supposed to be Parakeet or lasr tokenizer by default? |
||
|
|
||
| def __init__(self, feature_extractor, tokenizer): | ||
| super().__init__(feature_extractor, tokenizer) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,10 +61,6 @@ class Pix2StructProcessor(ProcessorMixin): | |
| An instance of ['T5Tokenizer`]. The tokenizer is a required input. | ||
| """ | ||
|
|
||
| attributes = ["image_processor", "tokenizer"] | ||
| image_processor_class = "Pix2StructImageProcessor" | ||
| tokenizer_class = ("T5Tokenizer",) | ||
|
|
||
|
Comment on lines
-64
to
-67
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cc @itazap Just to make sure it's safe to remove, was this added back by mistake? |
||
| def __init__(self, image_processor, tokenizer): | ||
| tokenizer.return_token_type_ids = False | ||
| super().__init__(image_processor, tokenizer) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cc @eustlb , moved this to the auto files to have one source of truth, and removed attributes as they are now auto-detected