Skip to content

workaround documentation rendering bug#21189

Merged
sgugger merged 1 commit intohuggingface:mainfrom
hollance:greaterthan
Jan 19, 2023
Merged

workaround documentation rendering bug#21189
sgugger merged 1 commit intohuggingface:mainfrom
hollance:greaterthan

Conversation

@hollance
Copy link
Copy Markdown
Contributor

What does this PR do?

In the doc comments for a number of our models, the following occurs:

pad_to_multiple_of: (optional) Integer if set will pad the sequence to a multiple of the provided value.
    This is especially useful to enable the use of Tensor Core on NVIDIA hardware with compute capability
    >= 7.5 (Volta).

The documentation renderer sees the > from >= 7.5 (Volta) as starting a quote. The resulting docs look like this:

Screen Shot 2023-01-19 at 12 48 38

To workaround this issue, I simply put the >= 7.5 portion inside backticks everywhere in the code (even when it doesn't occur at the beginning of the line).

Arguably, this should be fixed in the documentation tools instead.

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.

@hollance hollance requested a review from sgugger January 19, 2023 11:53
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

HuggingFaceDocBuilderDev commented Jan 19, 2023

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

Copy link
Copy Markdown
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 the fix!

@sgugger sgugger merged commit 9b468a7 into huggingface:main Jan 19, 2023
@hollance hollance mentioned this pull request Jan 24, 2023
5 tasks
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.

3 participants