summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/onnxruntime-tools/default.nix
blob: 4cb43574ab4b8b60d732f527e49fd730ea0f7929 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
  lib,
  buildPythonPackage,
  fetchPypi,

  # dependencies
  coloredlogs,
  numpy,
  onnx,
  packaging,
  psutil,
  py-cpuinfo,
  py3nvml,
  sympy,
}:

buildPythonPackage rec {
  pname = "onnxruntime-tools";
  version = "1.7.0";
  format = "wheel";

  # the build distribution doesn't work at all, it seems to expect the same structure
  # as the github source repo.
  # The github source wasn't immediately obvious how to build for this subpackage.
  src = fetchPypi {
    pname = "onnxruntime_tools";
    inherit version;
    format = "wheel";
    dist = "py3";
    python = "py3";
    hash = "sha256-Hf+Ii1xIKsW8Yn8S4QhEX+/LPWAMQ/Y2M5dTFv5hetg=";
  };

  dependencies = [
    coloredlogs
    numpy
    onnx
    packaging
    psutil
    py-cpuinfo
    py3nvml
    sympy
  ];

  pythonImportsCheck = [ "onnxruntime_tools" ];

  # no tests
  doCheck = false;

  meta = {
    description = "Transformers Model Optimization Tool of ONNXRuntime";
    homepage = "https://pypi.org/project/onnxruntime-tools/";
    license = with lib.licenses; [ mit ];
    maintainers = with lib.maintainers; [ happysalada ];
  };
}