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: ... takes no keyword arguments #14701

Merged
merged 3 commits into from Dec 23, 2021

Conversation

ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Dec 9, 2021

What does this PR do?

In some doc examples, there are

          >>> y = XSoftmax.apply(x, mask, dim=-1)

which gives TypeError: apply() takes no keyword arguments.

This PR fixes it by

          >>> # Specify the dimension to apply softmax
          >>> dim = -1

          >>> y = XSoftmax.apply(x, mask, dim)

Who can review?

@LysandreJik

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

Thank you, @ydshieh !

@LysandreJik
Copy link
Member

I tried to solve the merge conflicts but I ended up with code quality issues - do you mind taking a look when you have a minute? Sorry about that!

@ydshieh
Copy link
Collaborator Author

ydshieh commented Dec 22, 2021

I tried to solve the merge conflicts but I ended up with code quality issues - do you mind taking a look when you have a minute? Sorry about that!

Looks fine now :)

@LysandreJik
Copy link
Member

This is perfect, thanks @ydshieh!

@LysandreJik LysandreJik merged commit 4210579 into huggingface:master Dec 23, 2021
Albertobegue pushed a commit to Albertobegue/transformers that referenced this pull request Jan 27, 2022
* Fix doc examples: ... takes no keyword arguments

* fix copies

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
Co-authored-by: Lysandre Debut <lysandre@huggingface.co>
@ydshieh ydshieh deleted the fix_doc_example_008 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.

None yet

2 participants