1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 numpy,
6 scipy,
7 protobuf,
8 onnx,
9 scikit-learn,
10 onnxconverter-common,
11 onnxruntime,
12 pandas,
13 unittestCheckHook,
14 pythonRelaxDepsHook,
15}:
16
17buildPythonPackage rec {
18 pname = "skl2onnx";
19 version = "1.16.0";
20 format = "setuptools";
21
22 src = fetchPypi {
23 inherit pname version;
24 hash = "sha256-M3Cz1AZc4txZM4eMMnP0rqQflFzGUUVDsTrS1X82nOU=";
25 };
26
27 propagatedBuildInputs = [
28 numpy
29 scipy
30 protobuf
31 onnx
32 scikit-learn
33 onnxconverter-common
34 ];
35
36 nativeBuildInputs = [ pythonRelaxDepsHook ];
37
38 pythonRelaxDeps = [ "scikit-learn" ];
39
40 nativeCheckInputs = [
41 onnxruntime
42 pandas
43 unittestCheckHook
44 ];
45
46 unittestFlagsArray = [
47 "-s"
48 "tests"
49 ];
50
51 # Core dump
52 doCheck = false;
53
54 meta = {
55 description = "Convert scikit-learn models to ONNX";
56 license = with lib.licenses; [ asl20 ];
57 };
58}