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

Update CLIPFeatureExtractor to CLIPImageProcessor and DPTFeatureExtractor to DPTImageProcessor #9002

Merged
merged 12 commits into from
Aug 5, 2024

Conversation

tolgacangoz
Copy link
Contributor

@tolgacangoz tolgacangoz commented Jul 29, 2024

This pull request updates the usage of CLIPFeatureExtractor to CLIPImageProcessor in the codebase.
Just to remove this warning message and be ready for the future:

/home/.../lib/python3.10/site-packages/transformers/models/clip/feature_extraction_clip.py:28:
FutureWarning: The class CLIPFeatureExtractor is deprecated and will be removed in version 5 of
Transformers. Please use CLIPImageProcessor instead.
  warnings.warn(

@a-r-r-o-w

Copy link
Member

@a-r-r-o-w a-r-r-o-w left a comment

Choose a reason for hiding this comment

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

awesome, looks good to me! the codebase has CLIPImageProcessor at many places so these might have been overlooked

edit: could you run make style 😅

@a-r-r-o-w a-r-r-o-w requested a review from sayakpaul July 29, 2024 09:41
Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

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

Looks like harmless.

@sayakpaul sayakpaul requested a review from yiyixuxu July 29, 2024 09:43
@HuggingFaceDocBuilderDev

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.

@tolgacangoz
Copy link
Contributor Author

awesome, looks good to me! the codebase has CLIPImageProcessor at many places so these might have been overlooked

edit: could you run make style 😅

How can I forget this, sry 😅.

@tolgacangoz tolgacangoz requested a review from a-r-r-o-w July 29, 2024 10:01
@tolgacangoz
Copy link
Contributor Author

tolgacangoz commented Jul 29, 2024

I also encountered this:

/home/.../lib/python3.10/site-packages/transformers/models/dpt/feature_extraction_dpt.py:28:
FutureWarning: The class DPTFeatureExtractor is deprecated and will be removed in version 5
of Transformers. Please use DPTImageProcessor instead.
  warnings.warn(

Should this be another PR? I think this PR can be seen for transformers deprecation warnings?

@a-r-r-o-w
Copy link
Member

Should this be another PR? I think this PR can be seen for transformers deprecation warnings?

i think it should be good here, thanks!

@tolgacangoz tolgacangoz changed the title Update CLIPFeatureExtractor to CLIPImageProcessor Update CLIPFeatureExtractor to CLIPImageProcessor and DPTFeatureExtractor to DPTImageProcessor Jul 30, 2024
@a-r-r-o-w
Copy link
Member

cc @yiyixuxu, good to go?

@tolgacangoz
Copy link
Contributor Author

Resolved the merge conflict.

Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

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

thanks!

@yiyixuxu yiyixuxu merged commit 3dc97bd into huggingface:main Aug 5, 2024
15 checks passed
@tolgacangoz
Copy link
Contributor Author

Thanks for merging!

@tolgacangoz tolgacangoz deleted the fix-clip-deprecation-warning branch August 5, 2024 19:57
sayakpaul pushed a commit that referenced this pull request Dec 23, 2024
…Extractor` to `DPTImageProcessor` (#9002)

* fix: update `CLIPFeatureExtractor` to `CLIPImageProcessor` in codebase

* `make style && make quality`

* Update `DPTFeatureExtractor` to `DPTImageProcessor` in codebase

* `make style`

---------

Co-authored-by: Aryan <[email protected]>
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.

5 participants