flytekitplugins.onnxscikitlearn.ScikitLearn2ONNXConfig#
- 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.
- Parameters
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.
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
None
Methods
- classmethod from_dict(kvs, *, infer_missing=False)#
- classmethod from_json(s, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw)#
- classmethod schema(*, infer_missing=False, only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)#
- to_dict(encode_json=False)#
- to_json(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, indent=None, separators=None, default=None, sort_keys=False, **kw)#
Attributes
- options: Dict[Any, Any]#