Skip to content

Replace BloomTokenizer by BloomTokenizerFast in doc#18005

Merged
sgugger merged 1 commit intohuggingface:mainfrom
regisss:bloom_tokenizer
Jul 4, 2022
Merged

Replace BloomTokenizer by BloomTokenizerFast in doc#18005
sgugger merged 1 commit intohuggingface:mainfrom
regisss:bloom_tokenizer

Conversation

@regisss
Copy link
Contributor

@regisss regisss commented Jul 4, 2022

What does this PR do?

The current documentation examples for BLOOM propose to import its tokenizer as follows: from transformers import BloomTokenizer. This returns the following error with version 4.20.1:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'BloomTokenizer' from 'transformers' (/usr/local/lib/python3.8/dist-packages/transformers/__init__.py)

because BloomTokenizer is actually not defined anywhere. This PR replaces it in the doc by BloomTokenizerFast.

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.

@regisss regisss requested review from sgugger and younesbelkada July 4, 2022 08:25
Copy link
Contributor

@younesbelkada younesbelkada left a comment

Choose a reason for hiding this comment

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

LGTM thanks for spotting this ! 🚀

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jul 4, 2022

The documentation is not available anymore as the PR was closed or merged.

@regisss
Copy link
Contributor Author

regisss commented Jul 4, 2022

CI passed, pinging @sgugger for final approval

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

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

Thanks for fixing!

@sgugger sgugger merged commit 7498db0 into huggingface:main Jul 4, 2022
@regisss regisss deleted the bloom_tokenizer branch July 4, 2022 13:01
viclzhu pushed a commit to viclzhu/transformers that referenced this pull request Jul 18, 2022
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.

4 participants