class flytekitplugins.onnxscikitlearn.ScikitLearn2ONNXConfig(initial_types, name=None, doc_string='', target_opset=None, custom_conversion_functions=<factory>, custom_shape_calculators=<factory>, custom_parsers=<factory>, options=<factory>, intermediate=False, naming=None, white_op=None, black_op=None, verbose=0, final_types=None)[source]#

ScikitLearn2ONNXConfig is the config used during the scikitlearn to ONNX conversion.

  • initial_types (List[Tuple[str, Type]]) – The types of the inputs to the model.

  • name (Optional[str]) – The name of the graph in the produced ONNX model.

  • doc_string (str) – A string attached onto the produced ONNX model.

  • target_opset (Optional[int]) – The ONNX opset number.

  • custom_conversion_functions (Dict[Callable[[...], Any], Callable[[...], None]]) – A dictionary for specifying the user customized conversion function.

  • custom_shape_calculators (Dict[Callable[[...], Any], Callable[[...], None]]) – A dictionary for specifying the user customized shape calculator.

  • custom_parsers (Dict[Callable[[...], Any], Callable[[...], None]]) – Parsers determine which outputs are expected for which particular task.

  • options (Dict[Any, Any]) – Specific options given to converters.

  • intermediate (bool) – If True, the function returns the converted model and the instance of Topology used, else, it returns the converted model.

  • naming (Optional[Union[str, Callable[[...], Any]]]) – Change the way intermediates are named.

  • white_op (Optional[Set[str]]) – White list of ONNX nodes allowed while converting a pipeline.

  • black_op (Optional[Set[str]]) – Black list of ONNX nodes disallowed while converting a pipeline.

  • verbose (int) – Display progress while converting a model.

  • final_types (Optional[List[Tuple[str, Type]]]) – Used to overwrite the type (if type is not None) and the name of every output.

Return type



classmethod from_dict(kvs, *, infer_missing=False)#

kvs (Optional[Union[dict, list, str, int, float, bool]]) –

Return type


classmethod from_json(s, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw)#

s (Union[str, bytes, bytearray]) –

Return type


classmethod schema(*, infer_missing=False, only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)#
  • infer_missing (bool) –

  • many (bool) –

  • partial (bool) –

Return type[]

Return type

Dict[str, Optional[Union[dict, list, str, int, float, bool]]]

to_json(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, indent=None, separators=None, default=None, sort_keys=False, **kw)#
Return type



black_op: Optional[Set[str]] = None#
doc_string: str = ''#
final_types: Optional[List[Tuple[str, Type]]] = None#
intermediate: bool = False#
name: Optional[str] = None#
naming: Optional[Union[str, Callable[[...], Any]]] = None#
target_opset: Optional[int] = None#
verbose: int = 0#
white_op: Optional[Set[str]] = None#
initial_types: List[Tuple[str, Type]]#
custom_conversion_functions: Dict[Callable[[...], Any], Callable[[...], None]]#
custom_shape_calculators: Dict[Callable[[...], Any], Callable[[...], None]]#
custom_parsers: Dict[Callable[[...], Any], Callable[[...], None]]#
options: Dict[Any, Any]#