haystack
haystack copied to clipboard
ONNX FARMReader model conversion is broken
Describe the bug During a recent language and tokenization refactoring we broke FarmReader ONNX conversion support.
Error message A simple ONNX conversion of a QA model fails; we don't have a test case for it.
onnx_model_path = Path("roberta-onnx-model")
FARMReader.convert_to_onnx(model_name="deepset/roberta-base-squad2", output_path=onnx_model_path)
Expected behavior Model is converted to ONNX format, written to a local directory and subsequently used to create an ONNX-based reader.
Additional context None
To Reproduce Invoke the above-mentioned code sample in the Python interpreter
FAQ Check
- [x] Have you had a look at our new FAQ page?
System:
- OS:
- GPU/CPU:
- Haystack version (commit or version number):
- DocumentStore:
- Reader:
- Retriever: