Unverified Commit 62440009 authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

python3Packages.pytorch-memlab: init at 0.3.0 (#421806)

parents ec8b3dcb 4a8f705f
Loading
Loading
Loading
Loading
+34 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pytestCheckHook,
  setuptools,
}:

buildPythonPackage rec {
  pname = "calmsize";
  version = "0.1.3";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "Stonesjtu";
    repo = "calmsize";
    tag = version;
    hash = "sha256-D4UMzgYq++w6+Od0t9mDP4S+3Tc/ME5++NOlozXXALQ=";
  };

  build-system = [ setuptools ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "calmsize" ];

  meta = {
    description = "Take a number of bytes and return a human-readable string";
    homepage = "https://github.com/Stonesjtu/calmsize";
    changelog = "https://github.com/Stonesjtu/calmsize/blob/${version}/CHANGES.md";
    license = lib.licenses.zpl21;
    maintainers = with lib.maintainers; [ jherland ];
  };
}
+49 −0
Original line number Diff line number Diff line
{
  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 ];
  };
}
+4 −0
Original line number Diff line number Diff line
@@ -2235,6 +2235,8 @@ self: super: with self; {
  calmjs-types = callPackage ../development/python-modules/calmjs-types { };
  calmsize = callPackage ../development/python-modules/calmsize { };
  calver = callPackage ../development/python-modules/calver { };
  calysto = callPackage ../development/python-modules/calysto { };
@@ -14802,6 +14804,8 @@ self: super: with self; {
  pytorch-lightning = callPackage ../development/python-modules/pytorch-lightning { };
  pytorch-memlab = callPackage ../development/python-modules/pytorch-memlab { };
  pytorch-metric-learning = callPackage ../development/python-modules/pytorch-metric-learning { };
  pytorch-msssim = callPackage ../development/python-modules/pytorch-msssim { };