diff --git a/pkgs/development/python-modules/albumentations/default.nix b/pkgs/development/python-modules/albumentations/default.nix index 68190b121656..35a5da9bf069 100644 --- a/pkgs/development/python-modules/albumentations/default.nix +++ b/pkgs/development/python-modules/albumentations/default.nix @@ -9,29 +9,29 @@ # dependencies albucore, - eval-type-backport, numpy, opencv-python, pydantic, pyyaml, - scikit-image, scipy, # optional dependencies huggingface-hub, pillow, + torch, # tests deepdiff, pytestCheckHook, pytest-mock, - torch, + scikit-image, + scikit-learn, torchvision, }: buildPythonPackage rec { pname = "albumentations"; - version = "2.0.0"; + version = "2.0.5"; pyproject = true; disabled = pythonOlder "3.9"; @@ -40,7 +40,7 @@ buildPythonPackage rec { owner = "albumentations-team"; repo = "albumentations"; tag = version; - hash = "sha256-8WEOI2J2H4PNhyb9LoIUMofGKx9AHPiPddkQCSdh8/A="; + hash = "sha256-WqU25I1DxBqZAXd2+sNMUv/HOL4towlGTnFnpCGmMgY="; }; patches = [ @@ -53,17 +53,16 @@ buildPythonPackage rec { dependencies = [ albucore - eval-type-backport numpy opencv-python pydantic pyyaml - scikit-image scipy ]; optional-dependencies = { hub = [ huggingface-hub ]; + pytorch = [ torch ]; text = [ pillow ]; }; @@ -71,14 +70,16 @@ buildPythonPackage rec { deepdiff pytestCheckHook pytest-mock + scikit-image + scikit-learn torch torchvision ]; disabledTests = [ "test_pca_inverse_transform" - # this test hangs up - "test_transforms" + # test hangs + "test_keypoint_remap_methods" ]; pythonImportsCheck = [ "albumentations" ]; diff --git a/pkgs/development/python-modules/albumentations/dont-check-for-updates.patch b/pkgs/development/python-modules/albumentations/dont-check-for-updates.patch index 617ce259ca2b..6f9214e02f70 100644 --- a/pkgs/development/python-modules/albumentations/dont-check-for-updates.patch +++ b/pkgs/development/python-modules/albumentations/dont-check-for-updates.patch @@ -1,11 +1,11 @@ diff --git a/albumentations/__init__.py b/albumentations/__init__.py -index 0b3b531..7c69c65 100644 +index 44ee9b9..ea3bc50 100644 --- a/albumentations/__init__.py +++ b/albumentations/__init__.py -@@ -7,7 +7,3 @@ from .augmentations import * - from .core.composition import * - from .core.serialization import * - from .core.transforms_interface import * +@@ -22,7 +22,3 @@ from .core.transforms_interface import * + + with suppress(ImportError): + from .pytorch import * - -# Perform the version check after all other initializations -if os.getenv("NO_ALBUMENTATIONS_UPDATE", "").lower() not in {"true", "1"}: