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 (str | None) – The name of the graph in the produced ONNX model.
doc_string (str) – A string attached onto the produced ONNX model.
target_opset (int | None) – 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 (str | Callable[[...], Any] | None) – Change the way intermediates are named.
white_op (Set[str] | None) – White list of ONNX nodes allowed while converting a pipeline.
black_op (Set[str] | None) – Black list of ONNX nodes disallowed while converting a pipeline.
verbose (int) – Display progress while converting a model.
final_types (List[Tuple[str, Type]] | None) – Used to overwrite the type (if type is not None) and the name of every output.
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_json(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, indent=None, separators=None, default=None, sort_keys=False, **kw)¶
Attributes
- dataclass_json_config = None
- doc_string: str = ''
- intermediate: bool = False
- verbose: int = 0