-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
Improve generate docstring (for TF and FLAX) #18432
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for expanding to the other generate functions!
The documentation is not available anymore as the PR was closed or merged. |
Looks like we just need a quick |
Mmm no the formatting has done something very wrong here, we can't have that. There is likely some syntax error in the docstring. |
|
As I said, there is a syntax error in the docstring that makes the styling script behave erratically. The first step is to revert the changes, fix the syntax error then re-run it. |
I changed this line
to this
but then |
Ah yes, just tried locally and it's due to the empty line between |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You did not revert the bad changes made by the style doc string, that's why. I showed you what needs to happen on the first arguments (basically the type has to be on its own line ending with a colon) but the easiest is probably to start from the commit before the style changes.
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Uhmm, there is something wrong with the automatic styler -- e.g. the pytorch generate file should not be touched at all in this PR. As Sylvain wrote, the easiest solution is to start from a new branch 🤔 |
The docs seem fine now, right? It's just that this test, |
Nope, the docs are not fine for the PyTorch side with all the changes in this PR (and as @gante mentioned that file should not be touched at all). The doc-style is completely comfortable with lines that are more than 119 chars when it identifies they are parameter introduction lines, you just needed to remove the blank line between Parameters: and the first argument in |
What does this PR do?
Just a continuation PR of #18198 for TF and FLAX code
Before submitting
Who can review?
@sgugger @gante