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

bug: bentoml.transformers.save_model doesn't work with WhisperFeatureExtractor #4711

Open
bruno-hays opened this issue May 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@bruno-hays
Copy link

Describe the bug

import bentoml
from transformers import WhisperFeatureExtractor

bentoml.transformers.save_model("whisper_feature_extractor", WhisperFeatureExtractor.from_pretrained("openai/whisper-tiny"))

Raises this error:

  File "/Users//datalab/épellations/WhisperAPI/toremove6.py", line 4, in <module>
    bentoml.transformers.save_model("whisper_feature_extractor", WhisperFeatureExtractor.from_pretrained("openai/whisper-tiny"))
  File "/Users//datalab/épellations/WhisperAPI/venv/lib/python3.10/site-packages/bentoml/_internal/frameworks/transformers.py", line 1040, in save_model
    signatures = make_default_signatures(pretrained_or_pipeline.__class__)
  File "/Users//datalab/épellations/WhisperAPI/venv/lib/python3.10/site-packages/bentoml/_internal/frameworks/transformers.py", line 600, in make_default_signatures
    pretrained_cls, transformers.image_processing_utils.BaseImageProcessor
  File "/Users//datalab/épellations/WhisperAPI/venv/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1383, in __getattr__
    raise AttributeError(f"module {self.__name__} has no attribute {name}")
AttributeError: module transformers has no attribute image_processing_utils

To reproduce

No response

Expected behavior

No response

Environment

transformers==4.40.1
bentoml==1.2.13

@bruno-hays bruno-hays added the bug Something isn't working label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant