summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pytorch-memlab/default.nix
blob: c4a7fcf7a830532f5fcbab7e3ce6b0cbbce8069b (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  calmsize,
  pandas,
  torch,
  pytestCheckHook,
  setuptools,
}:

buildPythonPackage rec {
  pname = "pytorch-memlab";
  version = "0.3.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "Stonesjtu";
    repo = "pytorch_memlab";
    tag = version;
    hash = "sha256-wNgbipvi3vYr9Ka9hA7I+C4y8Nf6AiZXUoXX+qKtZ+I=";
  };

  build-system = [ setuptools ];

  nativeCheckInputs = [ pytestCheckHook ];

  dependencies = [
    calmsize
    pandas
    torch
  ];

  pythonImportsCheck = [ "pytorch_memlab" ];

  # These tests require CUDA
  disabledTestPaths = [
    "test/test_courtesy.py"
    "test/test_line_profiler.py"
  ];

  meta = {
    description = "Simple and accurate CUDA memory management laboratory for pytorch";
    homepage = "https://github.com/Stonesjtu/pytorch_memlab";
    changelog = "https://github.com/Stonesjtu/pytorch_memlab/releases/tag/${version}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ jherland ];
  };
}