diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fc05a08c7c..3be27e175f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -45,15 +45,15 @@ repos: # packages in a different order than the rest of the codebase. args: ["--ignore=I001"] - - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.0-alpha.4 - hooks: - - id: prettier + #- repo: https://github.com/pre-commit/mirrors-prettier + # rev: v3.0.0-alpha.4 + # hooks: + # - id: prettier - - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.33.0 - hooks: - - id: markdownlint + #- repo: https://github.com/igorshubovych/markdownlint-cli + # rev: v0.33.0 + # hooks: + # - id: markdownlint - repo: https://github.com/AleksaC/hadolint-py rev: v2.12.0.2 diff --git a/src/anomalib/data/utils/transform.py b/src/anomalib/data/utils/transform.py index c21a19abad..f8cbeb9291 100644 --- a/src/anomalib/data/utils/transform.py +++ b/src/anomalib/data/utils/transform.py @@ -87,10 +87,10 @@ def get_transforms( logger.info("Loading transforms from config File") transforms_list = [] - if "Resize" not in config.keys(): - resize_height, resize_width = get_image_height_and_width(image_size) - transforms_list.append(A.Resize(height=resize_height, width=resize_width, always_apply=True)) - logger.info(f"Resize {resize_height, resize_width} added!") + if "Resize" not in config.keys() and image_size is not None: + resize_height, resize_width = get_image_height_and_width(image_size) + transforms_list.append(A.Resize(height=resize_height, width=resize_width, always_apply=True)) + logger.info(f"Resize {resize_height, resize_width} added!") for key, value in config.items(): if hasattr(A, key):