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 pipeline doctests #17073

Merged
merged 1 commit into from
May 4, 2022
Merged

Conversation

stevhliu
Copy link
Member

@stevhliu stevhliu commented May 3, 2022

Clean PR of #17013 to fix doctests for the pipeline tutorial:

  • Updated output values in vision example as suggested by @ydshieh.
  • Fixed output format issues. Showing each output result on a new line fails :(

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented May 3, 2022

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.

Thanks for fixing!

Copy link
Collaborator

@ydshieh ydshieh 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 fixing, @stevhliu . I ran it, and the tests pass.

(I am a bit surprised that if I change a bit the score decimal, it still works. Probably this (precision thing) is handled by pytest.)

@ydshieh
Copy link
Collaborator

ydshieh commented May 4, 2022

(I don't really follow the ... ) # doctest: +SKIP) thing. If you have a bit time, it would be great if you can explain a bit to me what issue we have previously.

@sgugger
Copy link
Collaborator

sgugger commented May 4, 2022

Generation is random @ydshieh so the results will be different for each run. # doctest: +SKIP tells doctest to not test this particular example.

@stevhliu stevhliu merged commit 23619ef into huggingface:main May 4, 2022
@stevhliu stevhliu deleted the pipeline-doctests branch May 4, 2022 16:30
nandwalritik pushed a commit to nandwalritik/transformers that referenced this pull request May 10, 2022
Narsil pushed a commit to Narsil/transformers that referenced this pull request May 12, 2022
elusenji pushed a commit to elusenji/transformers that referenced this pull request Jun 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants