ONNXRuntime#
- class ONNXRuntime(config)#
Bases:
Runtime
Step that process data using models in the ONNX format (https://onnx.ai/).
Input - the input fields need to be of type that is expected by the provided model.
Output - the output fields depend on the provided model and the data it returns.
- Parameters:
Example
{ "step": "runtime", "type": "onnx", "model": "/models/test-model.onnx", "input_mapping": { "input": "query" }, "output_mapping": { "output_label": "query_class", "output_probability": "query_probability" } }
Methods Summary
Pre-session hook that is executed before creating an inference session.
process_batch
(batch)Process a batch of documents.
Methods Documentation
- pre_session_hook()#
Pre-session hook that is executed before creating an inference session.
It can be overwritten by subclasses to perform custom operations e.g. downloading model.
- Return type: