Skip to content

Conversation

@hkiyomaru
Copy link
Contributor

What does this PR do?

I found a line that uses the print method to emit a logging message in transformers/utils/hub.py. When I was developing a CLI app that outputs results in a specific format to stdout, this line emitted a logging message to stdout, resulting in an error. This PR fixes the line to use the logger.info method to emit the message 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?

@hkiyomaru hkiyomaru changed the title Use logger.info instead of print to emit a logging message in hub.py Use logger.info instead of print to emit a logging message in hub.py Jan 24, 2023
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jan 24, 2023

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

Copy link
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.

I don't see why not, thanks for your contribution!

@sgugger sgugger merged commit 767939a into huggingface:main Jan 24, 2023
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