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

Updating transformers issue with zero-shot-image-classification #540

Open
loadams opened this issue Nov 1, 2024 · 0 comments
Open

Updating transformers issue with zero-shot-image-classification #540

loadams opened this issue Nov 1, 2024 · 0 comments
Assignees

Comments

@loadams
Copy link
Contributor

loadams commented Nov 1, 2024

Updating to transformers versions beyond v4.42.4 causes issues with the CI tests in the legacy mode. The zero-shot-image-classification tests fail with:

FAILED test_non_persistent_deployment.py::test_single_GPU[None-50050-False-28080-fp16-1-False-False-1-True-False-ds_config0-zero-shot-image-classification-openai/clip-vit-base-patch32-query6-non-persistent] - ValueError: Attempting to cast a BatchFeature to type None. This is not supported.

We have isolated the problematic commit to this one: huggingface/transformers#31342

../../mii/legacy/client.py:144: in query
    return task_methods.run_inference(inference_pipeline, args, query_kwargs)
../../mii/legacy/method_table.py:255: in run_inference
    return inference_pipeline(image, candidate_labels=candidate_labels, **kwargs)
../../../venv/lib/python3.12/site-packages/transformers/pipelines/zero_shot_image_classification.py:107: in __call__
    return super().__call__(images, **kwargs)
../../../venv/lib/python3.12/site-packages/transformers/pipelines/base.py:1257: in __call__
    return self.run_single(inputs, preprocess_params, forward_params, postprocess_params)
../../../venv/lib/python3.12/site-packages/transformers/pipelines/base.py:1263: in run_single
    model_inputs = self.preprocess(inputs, **preprocess_params)
../../../venv/lib/python3.12/site-packages/transformers/pipelines/zero_shot_image_classification.py:124: in preprocess
    inputs = inputs.to(self.torch_dtype)
@loadams loadams self-assigned this Nov 1, 2024
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

No branches or pull requests

1 participant