1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 numpy,
6 onnx,
7 skl2onnx,
8 # native check inputs
9 pytestCheckHook,
10 pandas,
11 xgboost,
12 onnxruntime,
13 scikit-learn,
14 pyspark,
15 lightgbm,
16}:
17
18buildPythonPackage rec {
19 pname = "onnxmltools";
20 version = "1.12.0";
21 format = "setuptools";
22
23 src = fetchFromGitHub {
24 owner = "onnx";
25 repo = "onnxmltools";
26 rev = "refs/tags/${version}";
27 hash = "sha256-/UKGo56riLnATcn7kA++QoFkkILVGYBwqRZZ+PYB1/0=";
28 };
29
30 propagatedBuildInputs = [
31 numpy
32 onnx
33 skl2onnx
34 ];
35
36 pythonImportsCheck = [ "onnxmltools" ];
37
38 # there are still some dependencies that need to be packaged for the tests to run
39 doCheck = false;
40
41 nativeCheckInputs = [
42 pytestCheckHook
43 pandas
44 xgboost
45 onnxruntime
46 scikit-learn
47 pyspark
48 lightgbm
49 # coremltools
50 # libsvm
51 # h20
52 ];
53
54 meta = with lib; {
55 description = "ONNXMLTools enables conversion of models to ONNX";
56 homepage = "https://github.com/onnx/onnxmltools";
57 license = licenses.asl20;
58 maintainers = with maintainers; [ happysalada ];
59 };
60}