mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
python310Packages.tf2onnx: init at 1.14.0
This commit is contained in:
parent
78386f6b89
commit
da5286cd2b
86
pkgs/development/python-modules/tf2onnx/default.nix
Normal file
86
pkgs/development/python-modules/tf2onnx/default.nix
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, pythonRelaxDepsHook
|
||||||
|
, pytest-runner
|
||||||
|
# runtime dependencies
|
||||||
|
, numpy
|
||||||
|
, onnx
|
||||||
|
, requests
|
||||||
|
, six
|
||||||
|
, flatbuffers
|
||||||
|
, protobuf
|
||||||
|
, tensorflow
|
||||||
|
# check dependencies
|
||||||
|
, pytestCheckHook
|
||||||
|
, graphviz
|
||||||
|
, parameterized
|
||||||
|
, pytest-cov
|
||||||
|
, pyyaml
|
||||||
|
, timeout-decorator
|
||||||
|
, onnxruntime
|
||||||
|
, keras
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "tf2onnx";
|
||||||
|
version = "1.14.0";
|
||||||
|
format = "setuptools";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "onnx";
|
||||||
|
repo = "tensorflow-onnx";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-JpXwf+GLjn0krsb5KnEhVuemWa0V2+wF10neDsdtOfI=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
pythonRelaxDepsHook
|
||||||
|
pytest-runner
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonRelaxDeps = [
|
||||||
|
"flatbuffers"
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
numpy
|
||||||
|
onnx
|
||||||
|
requests
|
||||||
|
six
|
||||||
|
flatbuffers
|
||||||
|
protobuf
|
||||||
|
tensorflow
|
||||||
|
onnxruntime
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "tf2onnx" ];
|
||||||
|
|
||||||
|
nativeCheckInputs = [
|
||||||
|
pytestCheckHook
|
||||||
|
graphviz
|
||||||
|
parameterized
|
||||||
|
pytest-cov
|
||||||
|
pyyaml
|
||||||
|
timeout-decorator
|
||||||
|
keras
|
||||||
|
];
|
||||||
|
|
||||||
|
# TODO investigate the failures
|
||||||
|
disabledTestPaths = [
|
||||||
|
"tests/test_backend.py"
|
||||||
|
"tests/test_einsum_helper.py"
|
||||||
|
"tests/test_einsum_optimizers.py"
|
||||||
|
];
|
||||||
|
|
||||||
|
disabledTests = [
|
||||||
|
"test_profile_conversion_time"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Convert TensorFlow, Keras, Tensorflow.js and Tflite models to ONNX";
|
||||||
|
homepage = "https://github.com/onnx/tensorflow-onnx";
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = with maintainers; [ happysalada ];
|
||||||
|
};
|
||||||
|
}
|
@ -18,6 +18,7 @@
|
|||||||
, scikit-learn
|
, scikit-learn
|
||||||
, tensorflow
|
, tensorflow
|
||||||
, onnxconverter-common
|
, onnxconverter-common
|
||||||
|
, tf2onnx
|
||||||
, torch
|
, torch
|
||||||
, accelerate
|
, accelerate
|
||||||
, faiss
|
, faiss
|
||||||
@ -99,7 +100,7 @@ buildPythonPackage rec {
|
|||||||
tf = [
|
tf = [
|
||||||
tensorflow
|
tensorflow
|
||||||
onnxconverter-common
|
onnxconverter-common
|
||||||
# tf2onnx
|
tf2onnx
|
||||||
# tensorflow-text
|
# tensorflow-text
|
||||||
# keras-nlp
|
# keras-nlp
|
||||||
];
|
];
|
||||||
@ -119,7 +120,7 @@ buildPythonPackage rec {
|
|||||||
];
|
];
|
||||||
onnx = [
|
onnx = [
|
||||||
onnxconverter-common
|
onnxconverter-common
|
||||||
# tf2onnx
|
tf2onnx
|
||||||
onnxruntime
|
onnxruntime
|
||||||
];
|
];
|
||||||
modelcreation = [
|
modelcreation = [
|
||||||
|
@ -12387,6 +12387,8 @@ self: super: with self; {
|
|||||||
|
|
||||||
textx = callPackage ../development/python-modules/textx { };
|
textx = callPackage ../development/python-modules/textx { };
|
||||||
|
|
||||||
|
tf2onnx = callPackage ../development/python-modules/tf2onnx { };
|
||||||
|
|
||||||
tflearn = callPackage ../development/python-modules/tflearn { };
|
tflearn = callPackage ../development/python-modules/tflearn { };
|
||||||
|
|
||||||
tftpy = callPackage ../development/python-modules/tftpy { };
|
tftpy = callPackage ../development/python-modules/tftpy { };
|
||||||
|
Loading…
Reference in New Issue
Block a user