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

Update urls in warnings for rich rendering #24136

Merged
merged 8 commits into from
Jun 13, 2023

Conversation

IvanReznikov
Copy link
Contributor

What does this PR do?

Fixes # (issue)

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.

@amyeroberts
Copy link
Collaborator

Hi @IvanReznikov - thanks for opening a PR. Could you expand a bit on the issue this is addressing? All I'm seeing in the diff is splitting the ")" bracket onto a new line.

@IvanReznikov
Copy link
Contributor Author

@amyeroberts, the bracket was part of the URL, what leads to 404 obviously.

@amyeroberts
Copy link
Collaborator

@IvanReznikov The bracket is just the closing bracket the opened with "(see..." in the line above, it's not part of the url. Splitting like this won't change the evaluated string because of python's implicit line continuation behaviour.

@IvanReznikov
Copy link
Contributor Author

image

@IvanReznikov
Copy link
Contributor Author

@amyeroberts yep, fixed it above

Copy link
Collaborator

@amyeroberts amyeroberts 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 adding!

I've made some small suggestions to the change as there's no need to split on a new line

src/transformers/generation/utils.py Outdated Show resolved Hide resolved
src/transformers/generation/tf_utils.py Outdated Show resolved Hide resolved
src/transformers/generation/flax_utils.py Outdated Show resolved Hide resolved
IvanReznikov and others added 3 commits June 13, 2023 01:31
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
@IvanReznikov
Copy link
Contributor Author

@amyeroberts , sure

@amyeroberts amyeroberts changed the title Fixing urls in warnings Update urls in warnings for rich rendering Jun 13, 2023
Copy link
Collaborator

@amyeroberts amyeroberts 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 iterating and adding this improvement!

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jun 13, 2023

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

@amyeroberts amyeroberts merged commit e64d99f into huggingface:main Jun 13, 2023
novice03 pushed a commit to novice03/transformers that referenced this pull request Jun 23, 2023
* fixing typo in url in warnings

* fixing typo in url in warnings

* multi-line fix

* multi-line fix

* Update src/transformers/generation/utils.py

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Update src/transformers/generation/flax_utils.py

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Update src/transformers/generation/tf_utils.py

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

---------

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
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