Open Yosshi999 opened 3 weeks ago
Hi @Yosshi999, thank you for the report. PyTorch 1.11 is more than 2 years old, do you face the same issue with a more recent version of pytorch?
Hi @Yosshi999, thank you for the report. PyTorch 1.11 is more than 2 years old, do you face the same issue with a more recent version of pytorch?
no. only 1.11.
Thank you, is updating to torch==1.13 or torch>=2.0 an option to you?
Yes. I switched to 1.13 and this error no longer occurs. This issue is just to let you know the problem on 1.11, which is supported by optimum. And sometimes older Jetson environments will require pytorch==1.11 so I think some users will be caught by this problem.
System Info
Who can help?
@michaelbenayoun
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction (minimal, reproducible, runnable)
Install Pytorch 1.11 (on >= 1.12 this bug is resolved by pytorch)
and run https://huggingface.co/docs/optimum/v1.20.0/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModelForVision2Seq.forward.example
It raises the error:
Expected behavior
The models are converted correctly. I think this bug is related to https://github.com/pytorch/pytorch/issues/110439 , because ORTModelForVision2Seq tries to convert VisionEncoderDecoderModel, which contains
**kwargs
inforward()
.