diff --git a/pkgs/development/python-modules/timm/default.nix b/pkgs/development/python-modules/timm/default.nix index e93563d69b4..e67ed91c135 100644 --- a/pkgs/development/python-modules/timm/default.nix +++ b/pkgs/development/python-modules/timm/default.nix @@ -7,33 +7,52 @@ , pytest-timeout , huggingface-hub , pyyaml +, safetensors , torch , torchvision }: buildPythonPackage rec { pname = "timm"; - version = "0.6.12"; - disabled = pythonOlder "3.6"; + version = "0.9.2"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "huggingface"; repo = "pytorch-image-models"; rev = "refs/tags/v${version}"; - hash = "sha256-RNjCcCnNhtr5a+29Bx+k427a03MSooqvnuiDQ8cT8FA="; + hash = "sha256-gYrc8ds6urZvwDsTnzPjxjSTiAGzUD3RlCf0wogCrDI="; }; propagatedBuildInputs = [ huggingface-hub pyyaml + safetensors torch torchvision ]; - nativeCheckInputs = [ expecttest pytestCheckHook pytest-timeout ]; - pytestFlagsArray = [ "tests" ]; - # takes too long and also tries to download models: - disabledTestPaths = [ "tests/test_models.py" ]; + nativeCheckInputs = [ + expecttest + pytestCheckHook + pytest-timeout + ]; + + pytestFlagsArray = [ + "tests" + ]; + + disabledTestPaths = [ + # Takes too long and also tries to download models + "tests/test_models.py" + ]; + + disabledTests = [ + # AttributeError: 'Lookahead' object has no attribute '_optimizer_step_pre... + "test_lookahead" + ]; pythonImportsCheck = [ "timm"