Repository navigation
Deprecate old input names - #49424
Conversation
| @@ -302,10 +302,7 @@ def preprocess_with_tokenizer_info( | |||
| patch_size (`dict[str, int]`, *optional*): | |||
| Size of the patches. | |||
| """ | |||
| requires_backends(self, ["torch"]) | |||
There was a problem hiding this comment.
torch processor already requires it - why it was added here, no idea
| requires_backends(self, ["torch"]) | ||
| import torch | ||
|
|
There was a problem hiding this comment.
what is the point of PIL backend if it requires torch 😆
| requires_backends(self, ["torch"]) | ||
| import torch | ||
|
|
There was a problem hiding this comment.
this is also torch but unused method, so we still can preprocess images without torch in env
|
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. |
| 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 |
There was a problem hiding this comment.
override all these just because of input name, can delete after it's deprecated out
| @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 | ||
|
|
There was a problem hiding this comment.
dunno why it was left out from refactor, atp not worth wasting energy on low usage model imo - just skip backend tests
|
@vasqu should be ready now, added inline comment and missing test for video-llava |
vasqu
left a comment
There was a problem hiding this comment.
Small stuff, lets just make sure with run slow
We could also wait on guarin's PR first but leaving it up to you
There was a problem hiding this comment.
ig guarin's pr could make this slightly more elegant but no worries
molbap
left a comment
There was a problem hiding this comment.
yep looks good to me too, no need for 🚨 this time I think
|
run-slow: fuyu, video_llava |
CI (Nvidia + AMD)Nvidia CICommit Info
Model CI Report❌ 1 new failed tests from this PR 😭
AMD CICommit Info
✅ No failing test specific to this PR 🎉 👏 ! |
|
[For maintainers] Suggested jobs to run (before merge) run-slow: fuyu, video_llava |
CI recapDashboard: View test results in Grafana |
as per title and follow-up from prev huge PR. Additionally removes
torch-depsfrom the PIL image processor - makes zero sense to have PIL backend if it depends on torch 😬