Skip to content
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

uniformize kwargs for VisionTextDualEncoder #34563

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tibor-reiss
Copy link
Contributor

Adds uniformized processors for VisionTextDualEncoder following #31911.

@qubvel @molbap

@tibor-reiss
Copy link
Contributor Author

@molbap I changed the order of text and images (I saw that in a similar PR as a comment). But this breaks backwards compatibility. I tried to do a isinstance check and flip after, but it errors because how these type aliases are defined. Any other idea how BC can be maintained - if it is a strict requirement?

@tibor-reiss tibor-reiss force-pushed the fix-31811-visiontextdualencoder branch from a1626ed to 0decb11 Compare November 1, 2024 14:33
@molbap
Copy link
Contributor

molbap commented Nov 1, 2024

Hi @tibor-reiss , you can use _validate_images_text_input_order from processing_utils!

@qubvel qubvel mentioned this pull request Nov 2, 2024
40 tasks
@tibor-reiss
Copy link
Contributor Author

Hi @tibor-reiss , you can use _validate_images_text_input_order from processing_utils!

Done, could you please check again @molbap?

@tibor-reiss
Copy link
Contributor Author

Friendly reminder @molbap

Copy link
Contributor

@molbap molbap left a comment

Choose a reason for hiding this comment

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

Thanks for uniformizing this! cc @ArthurZucker for core review

Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

A nit butLGTM otherwise!

Comment on lines +27 to +28
class VisionTextDualEncoderProcessorKwargs(ProcessingKwargs, total=False):
_defaults = {}
Copy link
Collaborator

Choose a reason for hiding this comment

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

if there are no defualt we can just use the processingKwargs directly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants