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";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "1.7.1";
|
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}";
|
2022-12-17 10:02:37 +00:00
|
|
|
hash = "sha256-jiQ24gx3N9djvTTB6IthzxcuGWX2/php0Up3IdEDvm8=";
|
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
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|