From 3257946fb737f597fe7e0bc10a7c9a00100c5971 Mon Sep 17 00:00:00 2001 From: Alex Bzdel Date: Mon, 9 Oct 2023 10:32:13 -0400 Subject: [PATCH] [docstring] Fix docstring for DonutImageProcessor (#26641) * removed donutimageprocessor from objects_to_ignore * added docstring for donutimageprocessor * readding donut file * moved docstring to correct location --- src/transformers/models/donut/image_processing_donut.py | 4 ++-- utils/check_docstrings.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/transformers/models/donut/image_processing_donut.py b/src/transformers/models/donut/image_processing_donut.py index 07d64092bf..2a1672e220 100644 --- a/src/transformers/models/donut/image_processing_donut.py +++ b/src/transformers/models/donut/image_processing_donut.py @@ -61,7 +61,7 @@ class DonutImageProcessor(BaseImageProcessor): Size of the image after resizing. The shortest edge of the image is resized to size["shortest_edge"], with the longest edge resized to keep the input aspect ratio. Can be overridden by `size` in the `preprocess` method. - resample (`PILImageResampling`, *optional*, defaults to `PILImageResampling.BILINEAR`): + resample (`PILImageResampling`, *optional*, defaults to `Resampling.BILINEAR`): Resampling filter to use if resizing the image. Can be overridden by `resample` in the `preprocess` method. do_thumbnail (`bool`, *optional*, defaults to `True`): Whether to resize the image using thumbnail method. @@ -77,7 +77,7 @@ class DonutImageProcessor(BaseImageProcessor): rescale_factor (`int` or `float`, *optional*, defaults to `1/255`): Scale factor to use if rescaling the image. Can be overridden by `rescale_factor` in the `preprocess` method. - do_normalize: + do_normalize (`bool`, *optional*, defaults to `True`): Whether to normalize the image. Can be overridden by `do_normalize` in the `preprocess` method. image_mean (`float` or `List[float]`, *optional*, defaults to `IMAGENET_STANDARD_MEAN`): Mean to use if normalizing the image. This is a float or list of floats the length of the number of diff --git a/utils/check_docstrings.py b/utils/check_docstrings.py index 7e12cf3d30..d40c737ab0 100644 --- a/utils/check_docstrings.py +++ b/utils/check_docstrings.py @@ -174,7 +174,6 @@ OBJECTS_TO_IGNORE = [ "DistilBertConfig", "DistilBertTokenizerFast", "DocumentQuestionAnsweringPipeline", - "DonutImageProcessor", "DonutSwinModel", "EarlyStoppingCallback", "EfficientFormerConfig",