Unverified Commit d294c5a4 authored by Gaétan Lepage's avatar Gaétan Lepage Committed by GitHub
Browse files

python3Packages.torchtnt: init at 0.2.4 (#361470)

parents c76137bb 07d388a4
Loading
Loading
Loading
Loading
+71 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchPypi,

  # build-system
  setuptools,

  # dependencies
  fsspec,
  numpy,
  packaging,
  psutil,
  pyre-extensions,
  tabulate,
  tensorboard,
  torch,
  tqdm,
  typing-extensions,
}:

buildPythonPackage rec {
  pname = "torchtnt";
  version = "0.2.4";
  pyproject = true;

  # no tag / releases on github
  src = fetchPypi {
    inherit pname version;
    hash = "sha256-Js9OcYllr8KT52FYtHKDciBVvPeelNDmfnC12/YcDJs=";
  };

  # requirements.txt is not included in Pypi archive
  postPatch = ''
    substituteInPlace setup.py \
      --replace-fail 'read_requirements("requirements.txt")' "[]" \
      --replace-fail 'read_requirements("dev-requirements.txt")' "[]"
  '';

  build-system = [
    setuptools
  ];

  dependencies = [
    fsspec
    numpy
    packaging
    psutil
    pyre-extensions
    setuptools
    tabulate
    tensorboard
    torch
    tqdm
    typing-extensions
  ];

  pythonImportsCheck = [
    "torchtnt"
  ];

  # Tests are not included in Pypi archive
  doCheck = false;

  meta = {
    description = "Lightweight library for PyTorch training tools and utilities";
    homepage = "https://github.com/pytorch/tnt";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ nim65s ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -16158,6 +16158,8 @@ self: super: with self; {
  torchsummary = callPackage ../development/python-modules/torchsummary { };
  torchtnt = callPackage ../development/python-modules/torchtnt { };
  torchvision = callPackage ../development/python-modules/torchvision { };
  torchvision-bin = callPackage ../development/python-modules/torchvision/bin.nix {