diff --git a/pkgs/development/python-modules/skl2onnx/default.nix b/pkgs/development/python-modules/skl2onnx/default.nix new file mode 100644 index 000000000000..4e8f95863119 --- /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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e16e0d339f54..617c08bedfbc 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10167,6 +10167,8 @@ in { skidl = callPackage ../development/python-modules/skidl { }; + skl2onnx = callPackage ../development/python-modules/skl2onnx { }; + sklearn-deap = callPackage ../development/python-modules/sklearn-deap { }; skodaconnect = callPackage ../development/python-modules/skodaconnect { };