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

fix: typos #29653

Merged
merged 1 commit into from Mar 15, 2024
Merged

fix: typos #29653

merged 1 commit into from Mar 15, 2024

Conversation

testwill
Copy link
Contributor

@testwill testwill commented Mar 14, 2024

What does this PR do?

Fixes # (issue)

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.

Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@amyeroberts
Copy link
Collaborator

@testwill There's a failing CI test which will need to pas before merging in. Running make fix-copies and pushing the changes should resolve this.

@testwill
Copy link
Contributor Author

python utils/check_copies.py --fix_and_overwrite
File "utils/check_copies.py", line 177
def _is_definition_header_ending_line(line: str) -> bool:
^
SyntaxError: invalid syntax
make: *** [Makefile:82: fix-copies] Error 1

@amyeroberts
Copy link
Collaborator

hmmm, that's odd. I'm able to run make fix-copies locally and just from the error the syntax looks OK. If you run python in your environment, which version is it running? You can check this by doing python -V

@testwill
Copy link
Contributor Author

Python 2.7.18

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@amyeroberts
Copy link
Collaborator

OK, that's the issue, the library only supports python3.

The recommended way to develop is to work from a python3 virtual environment, in which python will run python 3.x. Transformers requires python>= 3.8.

@testwill
Copy link
Contributor Author

Python 3.8.10 ,Also installed in the local environment

@amyeroberts
Copy link
Collaborator

@testwill I'm assuming that you run python 3.8 through the python3 command? All of the scripts in the library use python, and so by running make fix-copies outside of a virtual environment, you'll be running python 2.7.18, which results in this error

@testwill
Copy link
Contributor Author

run cmd
echo "alias python=python3" >> ~/.bashrc
source ~/.bashrc

same error

@amyeroberts
Copy link
Collaborator

@testwill I don't suggest setting an alias like this, as it can lead to all sorts of weird behaviour. As per the contribution guidelines, I suggest making a virtual env and running from there.

@testwill
Copy link
Contributor Author

    modified:   README_de.md
    modified:   README_pt-br.md
    modified:   README_ru.md
    modified:   README_te.md
    modified:   README_vi.md
    modified:   src/transformers/models/beit/image_processing_beit.py
    modified:   src/transformers/models/bigbird_pegasus/modeling_bigbird_pegasus.py
    modified:   src/transformers/models/blip/image_processing_blip.py
    modified:   src/transformers/models/bridgetower/image_processing_bridgetower.py
    modified:   src/transformers/models/chinese_clip/image_processing_chinese_clip.py
    modified:   src/transformers/models/clip/image_processing_clip.py
    modified:   src/transformers/models/convnext/image_processing_convnext.py
    modified:   src/transformers/models/donut/image_processing_donut.py
    modified:   src/transformers/models/dpt/image_processing_dpt.py
    modified:   tests/models/roc_bert/test_tokenization_roc_bert.py

Do all these documents need to be committed?

@amyeroberts
Copy link
Collaborator

@testwill No, you shouldn't need to add these. Can you rebase on main to include any recent upstream changes? This should fix this

Signed-off-by: guoguangwu <guoguangwug@gmail.com>
@testwill
Copy link
Contributor Author

ok

@amyeroberts amyeroberts merged commit 03847ef into huggingface:main Mar 15, 2024
8 checks passed
@testwill testwill deleted the typos branch March 16, 2024 00:47
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.

None yet

3 participants