about summary refs log tree commit diff
path: root/pkgs/development/python-modules/torchinfo/default.nix
blob: 331729e25c5813a5145e79675ce02755d65f8870 (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
{ lib
, fetchPypi
, python
, buildPythonPackage
, pythonOlder
, pytorch
, pytestCheckHook
, torchvision
}:

buildPythonPackage rec {
  pname = "torchinfo";
  version = "1.6.3";
  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    sha256 = "sha256-g1xhtdwygzPTTswP8iZ364ynBQE7D+aAsZ3d9EpyvIA=";
  };

  propagatedBuildInputs = [
    pytorch
    torchvision
  ];

  checkInputs = [
    pytestCheckHook
  ];

  disabledTests = [
    # Skip as it downloads pretrained weights (require network access)
    "test_eval_order_doesnt_matter"
  ];

  pythonImportsCheck = [ "torchvision" ];

  meta = {
    description = "API to visualize pytorch models";
    homepage = "https://github.com/TylerYep/torchinfo";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ petterstorvik ];
  };
}