Skip to content

Conversation

@ArthurZucker
Copy link
Collaborator

@ArthurZucker ArthurZucker commented Nov 22, 2023

What does this PR do?

When PRs on the hub are not merged yet + sometimes for safety reasons we can pin a revision in the docstring code samples added.

Seems like the CI is enough to test, dummy testing the build with a flax t5 model 😉

Example: https://moon-ci-docs.huggingface.co/docs/transformers/pr_27645/en/model_doc/albert#transformers.FlaxAlbertForMaskedLM.__call__.example

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Nov 22, 2023

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

@ArthurZucker ArthurZucker mentioned this pull request Nov 22, 2023
5 tasks
@ArthurZucker ArthurZucker mentioned this pull request Nov 23, 2023
5 tasks
Copy link
Contributor

@vvvm23 vvvm23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my turn to review I guess 😅

@ArthurZucker
Copy link
Collaborator Author

Thanks for the review but a PR in draft mode means it's a draft 😉

@vvvm23
Copy link
Contributor

vvvm23 commented Nov 23, 2023

oh no 😓 missed the draft status somehow

@ArthurZucker
Copy link
Collaborator Author

No worries 🤗

@ArthurZucker ArthurZucker marked this pull request as ready for review November 23, 2023 14:49
Copy link
Contributor

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

Comment on lines +1153 to +1155
built_doc = built_doc.replace(
f'from_pretrained("{checkpoint}")', f'from_pretrained("{checkpoint}", revision="{revision}")'
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this replace for both the model and any processor classes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep. In case a pr update the tokenizer / processor as well. Even if they are not updated they should still be usable!

@ArthurZucker ArthurZucker merged commit a6d178e into main Nov 24, 2023
@ArthurZucker ArthurZucker deleted the add-revision-docstring branch November 24, 2023 15:30
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.

5 participants