huggingface / transformers

🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
https://huggingface.co/transformers
Apache License 2.0
132.11k stars 26.32k forks source link

Docstring says target_sizes is optional (in DETR post_process) but the code disagrees #15769

Closed amgreene closed 1 year ago

amgreene commented 2 years ago

https://github.com/huggingface/transformers/blob/db7d6a80e82d66127b2a44b6e3382969fdc8b207/src/transformers/models/detr/feature_extraction_detr.py#L677

The Docstring marks the target_sizes parameter as *optional* but the parameter has no default value and is used without any conditional checking for whether it is None, so it would seem to be required.

NielsRogge commented 2 years ago

Thanks for pointing that out. Could you open a PR to remove the "optional" string?

ankitsharma07 commented 2 years ago

Is this resolved?

Manobal-Singh-Bagady commented 1 year ago

This issue should be marked closed. The problem seems to be resolved.

NielsRogge commented 1 year ago

We're actually updating this at the moment (see #19205), it will become optional. Closing this issue for now.