1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools,
8
9 # dependencies
10 numpy,
11 onnx,
12 skl2onnx,
13
14 # tests
15 pytestCheckHook,
16 pandas,
17 xgboost,
18 onnxruntime,
19 scikit-learn,
20 pyspark,
21 lightgbm,
22}:
23
24buildPythonPackage rec {
25 pname = "onnxmltools";
26 version = "1.14.0";
27 pyproject = true;
28
29 src = fetchFromGitHub {
30 owner = "onnx";
31 repo = "onnxmltools";
32 tag = version;
33 hash = "sha256-CcZlGLX8/ANHnhoOv5s/ybBN74gRH/8eLYJ6q/BJo/4=";
34 };
35
36 build-system = [
37 setuptools
38 ];
39
40 dependencies = [
41 numpy
42 onnx
43 skl2onnx
44 ];
45
46 pythonImportsCheck = [ "onnxmltools" ];
47
48 # there are still some dependencies that need to be packaged for the tests to run
49 doCheck = false;
50
51 nativeCheckInputs = [
52 pytestCheckHook
53 pandas
54 xgboost
55 onnxruntime
56 scikit-learn
57 pyspark
58 lightgbm
59 # coremltools
60 # libsvm
61 # h20
62 ];
63
64 meta = {
65 description = "ONNXMLTools enables conversion of models to ONNX";
66 homepage = "https://github.com/onnx/onnxmltools";
67 changelog = "https://github.com/onnx/onnxmltools/blob/${src.tag}/CHANGELOGS.md";
68 license = lib.licenses.asl20;
69 maintainers = with lib.maintainers; [ happysalada ];
70 };
71}