yobx.sklearn.convert_helper#
- yobx.sklearn.convert_helper.default_ai_onnx_ml(main_opset: int) int[source]#
Returns a default value for opset ai.onnx.ml.
- yobx.sklearn.convert_helper.wrap_step_as_function(g: GraphBuilder, fopts: FunctionOptions, estimator: BaseEstimator, input_names: List[str], output_names: List[str] | None, converter: Callable, name: str) str | Tuple[str, ...][source]#
Converts estimator to ONNX via converter and wraps the result as an ONNX local function registered in g.
- Parameters:
g – the main graph builder
fopts –
FunctionOptionscarrying the target domain and other options; thenamefield is ignored — the function name is always derived from the estimator’s class nameestimator – the fitted estimator to convert
input_names – input tensor names already present in g
output_names – desired output tensor names to produce in g
converter – the registered sklearn→ONNX converter function
name – node-name prefix passed to the converter