mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 11:23:29 +00:00
afe8ee8b47
The proper name for a python package is the one in the setuptools setup() call, which can also be seen on pypi. Correct: https://pypi.org/project/torch/ Wrong: https://pypi.org/project/pytorch/ Includes a treewide rename of the attribute and creates aliases for the old name.
51 lines
960 B
Nix
51 lines
960 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, torch
|
|
, torchvision
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "torchinfo";
|
|
version = "1.64";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "TylerYep";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-gcl8RxCD017FP4LtB60WVtOh7jg2Otv/vNd9hKneEAU=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
torch
|
|
torchvision
|
|
];
|
|
|
|
checkInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
disabledTests = [
|
|
# Skip as it downloads pretrained weights (require network access)
|
|
"test_eval_order_doesnt_matter"
|
|
# AssertionError in output
|
|
"test_google"
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"torchvision"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "API to visualize pytorch models";
|
|
homepage = "https://github.com/TylerYep/torchinfo";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ petterstorvik ];
|
|
};
|
|
}
|