summary refs log tree commit diff
path: root/pkgs/development/python-modules/skl2onnx/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/skl2onnx/default.nix')
-rw-r--r--pkgs/development/python-modules/skl2onnx/default.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/skl2onnx/default.nix b/pkgs/development/python-modules/skl2onnx/default.nix
new file mode 100644
index 00000000000..4e8f9586311
--- /dev/null
+++ b/pkgs/development/python-modules/skl2onnx/default.nix
@@ -0,0 +1,49 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, numpy
+, scipy
+, protobuf
+, onnx
+, scikit-learn
+, onnxconverter-common
+, onnxruntime
+, pandas
+, unittestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "skl2onnx";
+  version = "1.13";
+
+  src = fetchPypi {
+    inherit pname version;
+    hash = "sha256-XzUva5uFX/rGMFpwfwLH1Db0Nok47pBJCSqVo1ZcJz0=";
+  };
+
+  propagatedBuildInputs = [
+    numpy
+    scipy
+    protobuf
+    onnx
+    scikit-learn
+    onnxconverter-common
+  ];
+
+  checkInputs = [
+    onnxruntime
+    pandas
+    unittestCheckHook
+  ];
+
+  unittestFlagsArray = [ "-s" "tests" ];
+
+  # Core dump
+  doCheck = false;
+
+  meta = {
+    description = "Convert scikit-learn models to ONNX";
+    maintainers = with lib.maintainers; [ fridh ];
+    license = with lib.licenses; [ asl20 ];
+  };
+}