12 buildPythonPackage rec {
15 format = "setuptools";
17 disabled = pythonOlder "3.7";
19 src = fetchFromGitHub {
22 rev = "refs/tags/v${version}";
23 hash = "sha256-pPjg498aT8y4b4tqIzNxxKyobZX01u+66ScS/mee51Q=";
27 (fetchpatch { # Add support for Python 3.11 and pytorch 2.1
28 url = "https://github.com/TylerYep/torchinfo/commit/c74784c71c84e62bcf56664653b7f28d72a2ee0d.patch";
29 hash = "sha256-xSSqs0tuFpdMXUsoVv4sZLCeVnkK6pDDhX/Eobvn5mw=";
31 "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 = [
70 description = "API to visualize pytorch models";
71 homepage = "https://github.com/TylerYep/torchinfo";
72 license = licenses.mit;
73 maintainers = with maintainers; [ petterstorvik ];