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 doc examples: KeyError #14699

Merged
merged 1 commit into from
Dec 10, 2021
Merged

Conversation

ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Dec 9, 2021

What does this PR do?

The doc examples in BlenderbotSmall have

        >>> inputs = tokenizer([UTTERANCE], return_tensors='pt')
        >>> inputs.pop("token_type_ids")

However, BlenderbotSmallTokenizer doesn't give token_type_ids, and cause KeyError here.

This PR fix this.

Who can review?

@patrickvonplaten @patil-suraj

Copy link
Contributor

@patil-suraj patil-suraj left a comment

Choose a reason for hiding this comment

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

Thanks a lot for fixing this!

@patil-suraj patil-suraj merged commit 8395f14 into huggingface:master Dec 10, 2021
@ydshieh ydshieh deleted the fix_doc_example_007 branch May 5, 2022 10:41
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.

2 participants