13 buildPythonPackage rec {
16 format = "setuptools";
18 disabled = pythonOlder "3.7";
20 src = fetchFromGitHub {
24 hash = "sha256-pPjg498aT8y4b4tqIzNxxKyobZX01u+66ScS/mee51Q=";
29 # Add support for Python 3.11 and pytorch 2.1
30 url = "https://github.com/TylerYep/torchinfo/commit/c74784c71c84e62bcf56664653b7f28d72a2ee0d.patch";
31 hash = "sha256-xSSqs0tuFpdMXUsoVv4sZLCeVnkK6pDDhX/Eobvn5mw=";
32 includes = [ "torchinfo/model_statistics.py" ];
36 propagatedBuildInputs = [
47 export HOME=$(mktemp -d)
51 # Skip as it downloads pretrained weights (require network access)
52 "test_eval_order_doesnt_matter"
54 # AssertionError in output
56 # "addmm_impl_cpu_" not implemented for 'Half'
57 "test_input_size_half_precision"
61 # Test requires network access
62 "tests/torchinfo_xl_test.py"
65 pythonImportsCheck = [ "torchinfo" ];
68 description = "API to visualize pytorch models";
69 homepage = "https://github.com/TylerYep/torchinfo";
70 license = licenses.mit;
71 maintainers = with maintainers; [ petterstorvik ];