Remove deprecated max_size parameter from ConditionalDetr image processors#40299
Open
Rishirandhawa wants to merge 6 commits into
Open
Remove deprecated max_size parameter from ConditionalDetr image processors#40299Rishirandhawa wants to merge 6 commits into
Rishirandhawa wants to merge 6 commits into
Conversation
…ssors - Remove max_size parameter handling from ConditionalDetrImageProcessor.__init__ - Remove max_size parameter handling from ConditionalDetrImageProcessorFast.__init__ - Remove max_size parameter handling from from_dict methods - Remove max_size parameter handling from preprocess/resize methods - Remove deprecation warnings that referenced v4.26 removal - Users should now use size['longest_edge'] instead of max_size Fixes huggingface#37939
…age processors - Remove max_size parameter handling from DetrImageProcessor.__init__ - Remove max_size parameter handling from DetrImageProcessor.from_dict - Remove max_size parameter handling from DetrImageProcessor.resize method - Remove max_size parameter handling from DetrImageProcessor.preprocess method - Remove all deprecation warnings that referenced v4.26 removal - ConditionalDETR files automatically updated via copy mechanism - Users should now use size['longest_edge'] instead of max_size Fixes huggingface#37939
- Remove max_size parameter handling from DetrImageProcessorFast.__init__ - Remove max_size parameter handling from DetrImageProcessorFast.from_dict - Remove max_size parameter handling from DetrImageProcessorFast.preprocess method - This completes the removal of all deprecated max_size parameters across DETR and ConditionalDETR Continues fix for huggingface#37939
- Remove max_size parameter handling from DeformableDetrImageProcessor - Remove max_size parameter handling from DeformableDetrImageProcessorFast - This maintains copy consistency with ConditionalDETR which copies from DeformableDETR Part of huggingface#37939
Remove deprecated max_size parameter from all processors that copy from DETR: - DeformableDetrImageProcessor and DeformableDetrImageProcessorFast - GroundingDinoImageProcessor and GroundingDinoImageProcessorFast - RtDetrImageProcessor - YolosImageProcessor and YolosImageProcessorFast This ensures copy consistency across the entire DETR model family. The copy mechanism requires all derived processors to match the source DETR implementation. Fixes huggingface#37939 and resolves CI copy consistency errors
- Remove unused imports from grounding_dino, rt_detr, and yolos image processors - Maintain consistent copy structure across DETR-family processors - Follow-up to max_size parameter deprecation fixes
Contributor
|
[For maintainers] Suggested jobs to run (before merge) run-slow: conditional_detr, deformable_detr, detr, grounding_dino, rt_detr, yolos |
Member
|
cc @qubvel |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
This PR removes the deprecated
max_sizeparameter from bothConditionalDetrImageProcessorandConditionalDetrImageProcessorFastclasses.Fixes
Closes #37939
Changes
max_sizeparameter handling fromConditionalDetrImageProcessor.__init__max_sizeparameter handling fromConditionalDetrImageProcessorFast.__init__max_sizeparameter handling fromfrom_dictmethods in both classesmax_sizeparameter handling frompreprocess/resizemethodsBreaking Change
max_sizeparameter is no longer accepted.Users should migrate to using
size['longest_edge']instead:Justification
The
max_sizeparameter was marked for deprecation and scheduled for removal in v4.26. The current version is v4.56, so this removal is long overdue. The deprecation warnings have been showing for many versions, giving users ample time to migrate their code.Testing
max_sizeparameter is no longer accepted and raisesTypeErrorsizeparameter still works correctly