1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 coloredlogs,
6 numpy,
7 onnx,
8 packaging,
9 psutil,
10 py-cpuinfo,
11 py3nvml,
12 sympy,
13}:
14
15buildPythonPackage rec {
16 pname = "onnxruntime-tools";
17 version = "1.7.0";
18 format = "wheel";
19
20 # the build distribution doesn't work at all, it seems to expect the same structure
21 # as the github source repo.
22 # The github source wasn't immediately obvious how to build for this subpackage.
23 src = fetchPypi {
24 pname = "onnxruntime_tools";
25 inherit version;
26 format = "wheel";
27 dist = "py3";
28 python = "py3";
29 hash = "sha256-Hf+Ii1xIKsW8Yn8S4QhEX+/LPWAMQ/Y2M5dTFv5hetg=";
30 };
31
32 propagatedBuildInputs = [
33 coloredlogs
34 numpy
35 onnx
36 packaging
37 psutil
38 py-cpuinfo
39 py3nvml
40 sympy
41 ];
42
43 pythonImportsCheck = [ "onnxruntime_tools" ];
44
45 meta = with lib; {
46 description = "Transformers Model Optimization Tool of ONNXRuntime";
47 homepage = "https://pypi.org/project/onnxruntime-tools/";
48 license = with licenses; [ mit ];
49 maintainers = with maintainers; [ happysalada ];
50 };
51}