|
22 | 22 | importnumpy |
23 | 23 | importpandas |
24 | 24 | fromlightgbmimportLGBMRegressor |
25 | | -fromonnxmltools.convert.lightgbm.operator_converters.LightGbmimportconvert_lightgbm |
26 | | -fromonnxmltools.convert.xgboost.operator_converters.XGBoostimportconvert_xgboost |
27 | 25 | fromonnxruntimeimportInferenceSession,SessionOptions |
28 | 26 | frompsutilimportcpu_count |
29 | 27 | fromsphinx_runpython.runpythonimportrun_cmd |
|
33 | 31 | fromsklearn.ensembleimportRandomForestRegressor |
34 | 32 | fromtqdmimporttqdm |
35 | 33 | fromxgboostimportXGBRegressor |
| 34 | +fromonnxmltools.convert.xgboost.operator_converters.XGBoostimportconvert_xgboost |
36 | 35 |
|
37 | 36 |
|
38 | 37 | defskl2onnx_convert_lightgbm(scope,operator,container): |
| 38 | +fromonnxmltools.convert.lightgbm.operator_converters.LightGbmimport ( |
| 39 | +convert_lightgbm, |
| 40 | + ) |
| 41 | + |
39 | 42 | options=scope.get_options(operator.raw_operator) |
40 | 43 | if"split"inoptions: |
41 | 44 | operator.split=options["split"] |
|