[WIP] Remove ZeroShotObjectDetectionPipeline from check_docstrings.py
Author: Sparty
Pull request: yes

# What does this PR do?

<!--
Congratulations! You've made it this far! You're not quite done yet though.

Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution.

Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change.

Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost.
-->

<!-- Remove if not applicable -->

Fixes #26638 


## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @

 If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
 Please tag fewer than 3 people.

Models:

- text models: @ArthurZucker and @younesbelkada
- vision models: @amyeroberts
- speech models: @sanchit-gandhi
- graph models: @clefourrier

Library:

- flax: @sanchit-gandhi
- generate: @gante
- pipelines: @Narsil
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @muellerzr and @pacman100

Integrations:

- deepspeed: HF Trainer/Accelerate: @pacman100
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc and @younesbelkada

Documentation: @stevhliu and @MKhalusova

HF projects:

- accelerate: [different repo](https://github.com/huggingface/accelerate)
- datasets: [different repo](https://github.com/huggingface/datasets)
- diffusers: [different repo](https://github.com/huggingface/diffusers)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)

Maintained examples (not research project or legacy):

- Flax: @sanchit-gandhi
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1

 -->


Comments:
@ydshieh I'm facing a few problems setting up my dev environment:

1. Running `pip install -e ".[dev]"` returns an error, 
`ERROR: Could not find a version that satisfies the requirement tensorflow-text<2.15; extra == "dev" (from transformers[dev]) (from versions: none)
ERROR: No matching distribution found for tensorflow-text<2.15; extra == "dev"`

I have Tensorflow installed, and tried to install tensorflow-text via pip but it looks like that is not support for Mac with Apple chips. I also tried to build and install tensorflow-text from source, but the build fails. Is there a workaround for this?

2. Running `pip install -e ".[quality]"` works, but `make fixup` returns an error, 
`python utils/update_metadata.py --check-only
Traceback (most recent call last):
  File "/Users/usr/transformers/utils/update_metadata.py", line 337, in <module>
    check_pipeline_tags()
  File "/Users/usr/transformers/utils/update_metadata.py", line 316, in check_pipeline_tags
    model = model[0]
IndexError: tuple index out of range
make: *** [repo-consistency] Error 1`

The above error happens in the main branch as well. Am I missing something?

3. Running `python3 utils/check_docstrings.py --fix_and_overwrite` returns nothing, and no files are modified, but `python3 utils/check_docstrings.py` return an error,
`Traceback (most recent call last):
  File "/Users/usr/transformers/utils/check_docstrings.py", line 1270, in <module>
    check_docstrings(overwrite=args.fix_and_overwrite)
  File "/Users/usr/transformers/utils/check_docstrings.py", line 1262, in check_docstrings
    raise ValueError(error_message)
ValueError: There was at least one problem when checking docstrings of public objects.
The following objects docstrings do not match their signature. Run `make fix-copies` to fix this.
- TFRegNetForImageClassification
- TFRegNetModel
- ZeroShotObjectDetectionPipeline`

If I run `make fix-copies` as suggested above, I get the following error,
`Traceback (most recent call last):
  File "/Users/usr/transformers/utils/check_task_guides.py", line 86, in <module>
    "asr.md": transformers_module.models.auto.modeling_auto.MODEL_FOR_CTC_MAPPING_NAMES,
  File "/Users/usr/transformers/src/transformers/utils/import_utils.py", line 1275, in __getattr__
    raise AttributeError(f"module {self.__name__} has no attribute {name}")
AttributeError: module transformers.models.auto has no attribute modeling_auto. Did you mean: 'modeling_tf_auto'?
make: *** [fix-copies] Error 1`

What should I do to fix this?

Hi @Sparty There are a lot of issues regarding the environment, and I am not sure how I can help here.

You can proably try "pip install -e .[torch-dev, testing, ]" first

Hello,
I have the exact same error with TFRegNetModel in my pull request #25786.
Although I haven't touched this model, just synced my fork.


@Sparty 

When I remove `"ZeroShotObjectDetectionPipeline"` and run `python utils/check_docstrings.py --fix_and_overwrite`, nothing is changed.

So probably this is something I have to take a look.

In the meantime, would you like to work on other entries (maybe ignore the `xxx...Pipeline` entries)?

@ydshieh Thank you for your help. I have created https://github.com/huggingface/transformers/pull/26771 for CanineConfig entry.