python3Packages.torchinfo: init at 1.6.2

This commit is contained in:
storvik
2022-01-12 14:27:28 +01:00
parent ca485f4220
commit 432c627844
2 changed files with 45 additions and 0 deletions
@@ -0,0 +1,43 @@
{ lib
, fetchPypi
, python
, buildPythonPackage
, pythonOlder
, pytorch
, pytestCheckHook
, torchvision
}:
buildPythonPackage rec {
pname = "torchinfo";
version = "1.6.2";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-vf3TADqIX4RtCU3dN/lBK4aRg3wud/KkK9u5XGnBbO4=";
};
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 ];
};
}
+2
View File
@@ -9728,6 +9728,8 @@ in {
torchgpipe = callPackage ../development/python-modules/torchgpipe { };
torchinfo = callPackage ../development/python-modules/torchinfo { };
torchvision = callPackage ../development/python-modules/torchvision { };
torchvision-bin = callPackage ../development/python-modules/torchvision/bin.nix { };