Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Remove ZeroShotObjectDetectionPipeline from check_docstrings.py #26643

Conversation

Sparty
Copy link
Contributor

@Sparty Sparty commented Oct 6, 2023

What does this PR do?

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,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? 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, and
    here are tips on formatting docstrings.
  • 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.

@Sparty Sparty marked this pull request as draft October 6, 2023 21:39
@Sparty Sparty marked this pull request as ready for review October 6, 2023 21:39
@Sparty
Copy link
Contributor Author

Sparty commented Oct 6, 2023

@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?

  1. 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?

  1. 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?

@ydshieh
Copy link
Collaborator

ydshieh commented Oct 9, 2023

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

@sbucaille
Copy link
Contributor

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.

@ydshieh
Copy link
Collaborator

ydshieh commented Oct 12, 2023

@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)?

@Sparty
Copy link
Contributor Author

Sparty commented Oct 12, 2023

@ydshieh Thank you for your help. I have created #26771 for CanineConfig entry.

@Sparty Sparty closed this Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Community Event] Docstring Sprint
3 participants