mbatoul / sklearn_benchmarks

Comparative benchmarking library for scikit-learn's estimators
https://mbatoul.github.io/sklearn_benchmarks/
0 stars 1 forks source link

Latest sklearn's HalfMultinomialLoss in RFs make onnx conversion fail #20

Open ogrisel opened 2 years ago

ogrisel commented 2 years ago

Using the scikit-learn main branch:

Traceback (most recent call last):
  File "/usr/share/miniconda/envs/sklbench/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/share/miniconda/envs/sklbench/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/runner/work/sklearn_benchmarks/sklearn_benchmarks/./__main__.py", line 119, in <module>
    main()
  File "/usr/share/miniconda/envs/sklbench/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/share/miniconda/envs/sklbench/lib/python3.8/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/share/miniconda/envs/sklbench/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/share/miniconda/envs/sklbench/lib/python3.8/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/runner/work/sklearn_benchmarks/sklearn_benchmarks/./__main__.py", line 112, in main
    benchmark.run()
  File "/home/runner/work/sklearn_benchmarks/sklearn_benchmarks/./sklearn_benchmarks/benchmarking/core.py", line 157, in run
    benchmark_measurements = bench_func_runner.run_with_profiling(
  File "/home/runner/work/sklearn_benchmarks/sklearn_benchmarks/./sklearn_benchmarks/benchmarking/core.py", line 362, in run_with_profiling
    self.run_profiling(trace_file)
  File "/home/runner/work/sklearn_benchmarks/sklearn_benchmarks/./sklearn_benchmarks/benchmarking/core.py", line 328, in run_profiling
    self.run_func()
  File "/home/runner/work/sklearn_benchmarks/sklearn_benchmarks/./sklearn_benchmarks/benchmarking/core.py", line 389, in run_func
    onx = convert_sklearn(self.estimator, initial_types=initial_type)
  File "/usr/share/miniconda/envs/sklbench/lib/python3.8/site-packages/skl2onnx/convert.py", line 160, in convert_sklearn
    onnx_model = convert_topology(topology, name, doc_string, target_opset,
  File "/usr/share/miniconda/envs/sklbench/lib/python3.8/site-packages/skl2onnx/common/_topology.py", line 1087, in convert_topology
    conv(scope, operator, container)
  File "/usr/share/miniconda/envs/sklbench/lib/python3.8/site-packages/skl2onnx/common/_registration.py", line 29, in __call__
    return self._fct(*args)
  File "/usr/share/miniconda/envs/sklbench/lib/python3.8/site-packages/skl2onnx/operator_converters/random_forest.py", line 190, in convert_sklearn_random_forest_classifier
    raise NotImplementedError(
NotImplementedError: There is no corresponding post_transform for 'HalfMultinomialLoss'.

full log: https://github.com/mbatoul/sklearn_benchmarks/runs/4934693965?check_suite_focus=true

ogrisel commented 2 years ago

Should be fixed upstream but not released yet. We will have to use the dev version.