2022-01-19 23:45:15 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-06-16 17:23:12 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
2022-01-19 23:45:15 +00:00
|
|
|
, pythonOlder
|
2022-09-09 14:08:57 +00:00
|
|
|
, torch
|
2022-01-19 23:45:15 +00:00
|
|
|
, torchvision
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "torchinfo";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "1.64";
|
2022-06-16 17:23:12 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "TylerYep";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-01-20 10:41:00 +00:00
|
|
|
hash = "sha256-gcl8RxCD017FP4LtB60WVtOh7jg2Otv/vNd9hKneEAU=";
|
2022-01-19 23:45:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-09-09 14:08:57 +00:00
|
|
|
torch
|
2022-01-19 23:45:15 +00:00
|
|
|
torchvision
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-01-19 23:45:15 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Skip as it downloads pretrained weights (require network access)
|
|
|
|
"test_eval_order_doesnt_matter"
|
2022-06-16 17:23:12 +00:00
|
|
|
# AssertionError in output
|
|
|
|
"test_google"
|
2022-01-19 23:45:15 +00:00
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"torchvision"
|
|
|
|
];
|
2022-01-19 23:45:15 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
meta = with lib; {
|
2022-01-19 23:45:15 +00:00
|
|
|
description = "API to visualize pytorch models";
|
|
|
|
homepage = "https://github.com/TylerYep/torchinfo";
|
2022-06-16 17:23:12 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ petterstorvik ];
|
2022-01-19 23:45:15 +00:00
|
|
|
};
|
|
|
|
}
|