You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
My own task or dataset (give details below)
Reproduction (minimal, reproducible, runnable)
$ optimum-cli export onnx \
--framework pt \
--model sentence-transformers/all-mpnet-base-v2 \
--task feature-extraction \
onnx/sentence-transformers_all-mpnet-base-v2
Using the export variant default. Available variants are:
- default: The default ONNX variant.
Traceback (most recent call last):
File "/home/marcov/.virtualenvs/onnx/bin/optimum-cli", line 8, in<module>sys.exit(main())
^^^^^^
File "/home/marcov/.virtualenvs/onnx/lib/python3.11/site-packages/optimum/commands/optimum_cli.py", line 208, in main
service.run()
File "/home/marcov/.virtualenvs/onnx/lib/python3.11/site-packages/optimum/commands/export/onnx.py", line 265, in run
main_export(
File "/home/marcov/.virtualenvs/onnx/lib/python3.11/site-packages/optimum/exporters/onnx/__main__.py", line 374, in main_export
onnx_export_from_model(
File "/home/marcov/.virtualenvs/onnx/lib/python3.11/site-packages/optimum/exporters/onnx/convert.py", line 1130, in onnx_export_from_model
ifmodel.can_generate() and len(misplaced_generation_parameters) > 0:
^^^^^^^^^^^^^^^^^^
File "/home/marcov/.virtualenvs/onnx/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1729, in __getattr__
raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
AttributeError: 'SentenceTransformer' object has no attribute 'can_generate'
Expected behavior
This used to work on optimum 1.22.0
The text was updated successfully, but these errors were encountered:
System Info
$ pip freeze | grep optimum optimum==1.23.0 $ python -V Python 3.11.2 $ lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 12 (bookworm) Release: 12 Codename: bookworm
Who can help?
@michaelbenayoun
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction (minimal, reproducible, runnable)
Expected behavior
This used to work on optimum 1.22.0
The text was updated successfully, but these errors were encountered: