haystack icon indicating copy to clipboard operation
haystack copied to clipboard

ONNX FARMReader model conversion is broken

Open vblagoje opened this issue 2 years ago • 0 comments

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

System:

  • OS:
  • GPU/CPU:
  • Haystack version (commit or version number):
  • DocumentStore:
  • Reader:
  • Retriever:

vblagoje avatar Sep 13 '22 09:09 vblagoje