Skip to content

Commit 82a07e2

Browse files
authored
fix: funasr_onnx pass run_options to ort (#2632)
1 parent 68dcef5 commit 82a07e2

File tree

1 file changed

+2
-2
lines changed
  • runtime/python/onnxruntime/funasr_onnx/utils

1 file changed

+2
-2
lines changed

runtime/python/onnxruntime/funasr_onnx/utils/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,10 @@ def __init__(self, model_file, device_id=-1, intra_op_num_threads=4):
221221
RuntimeWarning,
222222
)
223223

224-
def __call__(self, input_content: List[Union[np.ndarray, np.ndarray]]) -> np.ndarray:
224+
def __call__(self, input_content: List[Union[np.ndarray, np.ndarray]], run_options = None) -> np.ndarray:
225225
input_dict = dict(zip(self.get_input_names(), input_content))
226226
try:
227-
return self.session.run(self.get_output_names(), input_dict)
227+
return self.session.run(self.get_output_names(), input_dict, run_options)
228228
except Exception as e:
229229
raise ONNXRuntimeError("ONNXRuntime inferece failed.") from e
230230

0 commit comments

Comments
 (0)