Coverage for mlprodict/onnxrt/ops_onnxruntime/__init__.py: 100%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

5 statements  

1# -*- encoding: utf-8 -*- 

2""" 

3@file 

4@brief Shortcut to *ops_cpu*. 

5""" 

6from ._op import OpRunOnnxRuntime 

7 

8 

9def load_op(onnx_node, desc=None, options=None, variables=None, 

10 dtype=None, runtime=None): 

11 """ 

12 Gets the operator related to the *onnx* node. 

13 

14 :param onnx_node: :epkg:`onnx` node 

15 :param desc: internal representation 

16 :param options: runtime options 

17 :param variables: registered variables created by previous operators 

18 :param dtype: float computation type 

19 :param runtime: runtime 

20 :return: runtime class 

21 """ 

22 if desc is None: 

23 raise ValueError( # pragma: no cover 

24 "desc should not be None.") 

25 return OpRunOnnxRuntime(onnx_node, desc, variables=variables, 

26 dtype=dtype, runtime=runtime, **options)