-
Notifications
You must be signed in to change notification settings - Fork 31.2k
[DocString] Support a revision in the docstring add_code_sample_docstrings to facilitate integrations
#27645
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
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
vvvm23
left a comment
There was a problem hiding this 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 😅
|
Thanks for the review but a PR in draft mode means it's a draft 😉 |
Co-authored-by: Alex McKinney <[email protected]>
|
oh no 😓 missed the draft status somehow |
|
No worries 🤗 |
amyeroberts
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding!
| built_doc = built_doc.replace( | ||
| f'from_pretrained("{checkpoint}")', f'from_pretrained("{checkpoint}", revision="{revision}")' | ||
| ) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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!
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