-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
torch._dynamo.exc.Unsupported: call_method UserDefinedObjectVariable(Logger) #32922
Comments
related to #31987 |
if I put fullgraph=False, it works fine |
the same problem arises with torch 2.2.1 |
the same problem arises with torch 2.3.1 |
a similar problem arises with torch 2.4.0 |
it seems the problem is related to multilingual model... |
when putting a mulitlingual model I get the following error |
I found the problem. It lies in the fact that if you do not specify the language |
for the record the versions are: |
Well, we can keep this open as language detection would be nice to have in compile as well no? |
System Info
transformers
version: 4.43.0Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
from datasets import load_dataset
from transformers import WhisperProcessor, WhisperForConditionalGeneration
import torch
ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
audio_sample = ds[0]["audio"]
processor = WhisperProcessor.from_pretrained("openai/whisper-tiny")
model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny")
model = model.to('cuda')
model.generation_config.cache_implementation = "static"
model.forward = torch.compile(model.forward, mode="reduce-overhead", fullgraph=True)
input_features = processor(
audio_sample["array"], sampling_rate=audio_sample["sampling_rate"], return_tensors="pt"
).input_features
input_features = input_features.to("cuda")
_ = model.generate(input_features)
Expected behavior
it does not raise an error
as of now it raises
File "/home/jsoto/.pyenv/versions/3.10.14/envs/triton-server/lib/python3.10/site-packages/torch/_dynamo/exc.py", line 172, in unimplemented
raise Unsupported(msg)
torch._dynamo.exc.Unsupported: call_method UserDefinedObjectVariable(Logger) warning_once [ConstantVariable(str)] {}
The text was updated successfully, but these errors were encountered: