summary refs log tree commit diff
path: root/pkgs/development/python-modules/pywick/default.nix
blob: c675686ef8332ae301583d4d427cb951956dcc6a (plain) (blame)
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
{ buildPythonPackage
, fetchFromGitHub
, pythonOlder
, pytest
, h5py
, hickle
, numpy
, pandas
, pillow
, six
, pytorch
, torchvision
, tqdm
, lib
}:

buildPythonPackage rec {
  pname   = "pywick";
  version = "0.5.6";

  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "achaiah";
    repo = pname;
    rev = "v${version}";
    sha256 = "1gmlifnv9kji0d1jwg1pa8d96zg48w17qg0sgxwy1y1jf3hn37bm";
  };

  propagatedBuildInputs = [
    h5py hickle numpy pandas pillow six pytorch torchvision tqdm
  ];

  checkInputs = [ pytest ];

  checkPhase = ''
    runHook preCheck
    pytest tests/
    runHook postCheck
  '';

  meta = {
    description = "High-level training framework for Pytorch";
    homepage = "https://github.com/achaiah/pywick";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ bcdarwin ];
  };
}