2022-01-19 23:45:15 +00:00
|
|
|
{ lib
|
|
|
|
, fetchPypi
|
|
|
|
, python
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, pytorch
|
|
|
|
, pytestCheckHook
|
|
|
|
, torchvision
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "torchinfo";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "1.6.5";
|
2022-01-19 23:45:15 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-04-27 09:35:20 +00:00
|
|
|
sha256 = "sha256-Vg/TXD+/VMIv1wHywaOuEj4MDTq90lUo99n+Nppu0uI=";
|
2022-01-19 23:45:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|