Skip to contents

Serialises a bundle for C++ / Java / Go / .NET runtimes. The graph takes float32 [N, n_features] in bundle$feature_spec order and returns probabilities (float32 [N, 1]), equal to bundle_predict_proba(). Supported: logistic components (any number, weighted blend) with platt calibration or none. Anything else (isotonic calibration, XGBoost, other kinds) raises an error rather than exporting a model whose output differs from the bundle's. Bounds clipping and imputation are not in the graph: <output_path>.features.json lists the ordered features with their bounds and impute values and the risk tiers, for the host system to apply. Mirror of Python omop_etl.model_bundle.export_to_onnx (which also handles a single ONNX / XGBoost component).

Usage

export_to_onnx(bundle, output_path, opset = 13L)

Arguments

bundle

A model_bundle or bundle directory.

output_path

Where to write the .onnx file.

opset

ONNX opset (default 13).

Value

output_path, invisibly.