Skip to content

Deprecate old input names - #49424

Merged
zucchini-nlp merged 9 commits into
huggingface:mainfrom
zucchini-nlp:deprecate-weird-input-names
Oct 21, 2026
Merged

zucchini-nlp merged 9 commits into
huggingface:mainfrom
zucchini-nlp:deprecate-weird-input-names

Conversation

@zucchini-nlp

@zucchini-nlp zucchini-nlp commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

🤗 Transformers CI

as per title and follow-up from prev huge PR. Additionally removes torch-deps from the PIL image processor - makes zero sense to have PIL backend if it depends on torch 😬

@@ -302,10 +302,7 @@ def preprocess_with_tokenizer_info(
patch_size (`dict[str, int]`, *optional*):
Size of the patches.
"""
requires_backends(self, ["torch"])

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

torch processor already requires it - why it was added here, no idea

Comment on lines -257 to -259
requires_backends(self, ["torch"])
import torch

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

what is the point of PIL backend if it requires torch 😆

Comment on lines 334 to 336
requires_backends(self, ["torch"])
import torch

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this is also torch but unused method, so we still can preprocess images without torch in env

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

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.

@zucchini-nlp
zucchini-nlp requested review from molbap and vasqu October 8, 2026 15:52

@vasqu vasqu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Some quick comments

Comment thread tests/models/fuyu/test_modeling_fuyu.py Resolved
Comment on lines +55 to +65
def test_call_pil(self):
for image_processing_class in self.image_processing_classes.values():
# Initialize image_processing
image_processing = image_processing_class(**self.image_processor_dict)
# create random PIL images
image_inputs = self.image_processor_tester.prepare_image_inputs(equal_resolution=False)
for image in image_inputs:
self.assertIsInstance(image, Image.Image)

# Test not batched input
encoded_images = image_processing(image_inputs[0], return_tensors="pt").pixel_values_images

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

override all these just because of input name, can delete after it's deprecated out

Comment on lines +47 to +54
@unittest.skip("Model doesn't support backends yet!")
def test_new_models_require_torchvision_backend(self):
pass

@unittest.skip("Model doesn't support backends yet!")
def test_pil_can_load_without_torchvision(self):
pass

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

dunno why it was left out from refactor, atp not worth wasting energy on low usage model imo - just skip backend tests

@zucchini-nlp
zucchini-nlp requested a review from vasqu October 13, 2026 14:36
@zucchini-nlp

Copy link
Copy Markdown
Member Author

@vasqu should be ready now, added inline comment and missing test for video-llava

@vasqu vasqu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Small stuff, lets just make sure with run slow

We could also wait on guarin's PR first but leaving it up to you

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ig guarin's pr could make this slightly more elegant but no worries

@molbap molbap left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

yep looks good to me too, no need for 🚨 this time I think

@zucchini-nlp

Copy link
Copy Markdown
Member Author

run-slow: fuyu, video_llava

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

CI (Nvidia + AMD)

Nvidia CI

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN 43a9684d workflow commit (merge commit)
PR d209916f branch commit (from PR)
main 1573af48 base commit (on main)

Model CI Report

❌ 1 new failed tests from this PR 😭

  • video_llava:
    tests/models/video_llava/test_modeling_video_llava.py::VideoLlavaForConditionalGenerationIntegrationTest::test_small_model_integration_test_mixed_inputs (✅ ⟹ ❌)

AMD CI

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN 43a9684d workflow commit (merge commit)
PR d209916f branch commit (from PR)
main 1573af48 base commit (on main)

✅ No failing test specific to this PR 🎉 👏 !

@github-actions

Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: fuyu, video_llava

@github-actions

Copy link
Copy Markdown
Contributor

CI recap

Dashboard: View test results in Grafana
Latest run: 39365364156:1
Result: success | Jobs: 1 | Tests: 186 | Failures: 6 | Duration: 13m 21s

@zucchini-nlp
zucchini-nlp added this pull request to the merge queue Oct 21, 2026
Merged via the queue into huggingface:main with commit 3aeccc6 Oct 21, 2026
37 checks passed
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.

4 participants