summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/torchsummary/default.nix
blob: a3465370d5e2c5f8784d374b19ba823b3dbea30e (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
{
  lib,
  buildPythonPackage,
  fetchPypi,
  setuptools,
  torch,
}:

buildPythonPackage (finalAttrs: {
  pname = "torchsummary";
  version = "1.5.1";
  pyproject = true;

  src = fetchPypi {
    inherit (finalAttrs) pname version;
    hash = "sha256-mBv2ieIuDPf5XHRgAvIKJK0mqmudhhE0oUvGzpIjBZA=";
  };

  build-system = [ setuptools ];

  dependencies = [ torch ];

  # no tests in pypi tarball
  doCheck = false;

  pythonImportsCheck = [ "torchsummary" ];

  meta = {
    description = "Model summary in PyTorch similar to `model.summary()` in Keras";
    homepage = "https://github.com/sksq96/pytorch-summary";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ tomasajt ];
  };
})