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
[Community Event] Doc Tests Sprint #16292
Comments
@patrickvonplaten I would like to start with Maskformer for Tensorflow/Pytorch. Catch up with how the event goes. |
Awesome! Let me know if you have any questions :-) |
Hello! I'd like to take on Longformer for Tensorflow/Pytorch please. |
@patrickvonplaten I would like to start with T5 for pytorch and tensorflow |
Sounds great! |
LayoutLM is also taken as mentioned by a contributor on Discord! |
@patrickvonplaten I would take GPT and GPT-J (TensorFlow editions) if those are still available. I'm guessing GPT is GPT2? |
I will take Bert, Albert, and Bigbird for both Tensorflow/Pytorch |
I'll take Swin and ViT for Tensorflow |
I'd like DistilBERT for both TF and PT please |
@cakiki You can go for GPT2 (I updated the name in the test) |
Can I try GPT2 and GPTJ for Pytorch? if @ydshieh you are not doing so? |
I would like to try CLIP for Tensorflow and PyTorch. |
I'll take CANINE and TAPAS. |
@ydshieh Since the MobileBertForSequenceClassification is the copy of BertForSequenceClassification, so I think I will do check doc-test of MobileBert as well to overcome the error from |
I'll take FlauBERT and CamemBERT. |
@abdouaziz Awesome! Do you plan to work on both PyTorch and TensorFlow versions, or only one of them? |
I would like to work on LUKE model for both TF and PT |
@Tegzes you're lucky because there's no LUKE in TF ;) the list above actually just duplicates all models, but many models aren't available yet in TF. |
In this case, I will also take DeBERTa and DeBERTa-v2 for PyTorch |
I plan to work only with PyTorch |
True - sorry I've been lazy at creating this list! |
Happy to work on TrOCR (pytorch and TF) |
I take RoBERTa in PT and TF |
I would like to pick up XLM-RoBERTa in PT and TF. |
I can work on |
Hey guys, We've just merged the first template for Roberta-like model doc tests: #16363 :-) |
Also if you have open PRs and need help, feel free to ping me or @ydshieh and link the PR here so that we can nicely gather everything :-) |
One of the most difficult tasks here might be to actually find a well-working model. As a tip what you can do:
|
I'll take a shot with the PyTorch implementation of CTRL |
Here the mirror of RoBERTa for Tensorflow: #16370 |
Hi, contributors, thank you very much for participating this sprint Here is one tip that might reduce some issues: Considering the following 2 facts:
Some testing issues could be resolved as: git checkout main # or `master`, depends on your local clone
git fetch upstream
git pull upstream main # Hugging Face `transformers` renamed the default branch to `main` recently
git checkout your_working_branch_for_this_sprint
git rebase main # or `master` Don't hesitate if you encounter any problem. Enjoy~ |
I take BART and IBERT for PT |
I'd like to take a crack on Transformer-XL and ConvBert |
Hi, contributors! For the model(s) you work with for this sprint, if you could not find any checkpoint for a downstream task, say model = XXXModelForTokenClassification.from_pretrained(base_model_checkpoint_name)
model.save_pretrained(local_path) Then you can upload this new saved checkpoint to Hugging Face Hub, and you can use this uploaded model for the docstring example. The head part of the model will have randomly initialized weights, and the result is likely to be imperfect, but it is fine for this sprint :-) |
@simonzli, great :-). Do you plan to work with the PyTorch or TensorFlow version, or both? |
I'll work on both PyTorch and TensorFlow |
@patrickvonplaten: I chose XLM-RoBERTa and it's a sub-class of RoBERTa. The comments in the file for both PyTorch and TF suggests that the superclass should be referred for the appropriate documentation alongside usage examples (XLM-RoBERTa documentations shows RoBERTa examples). Should I still be adding examples for XLM-RoBERTa or should I pick some other model? |
Could you show me which line you see |
This issue is part of our Doc Test Sprint. If you're interested in helping out come join us on Discord and talk with other contributors!
Docstring examples are often the first point of contact when trying out a new library! So far we haven't done a very good job at ensuring that all docstring examples work correctly in🤗 Transformers - but we're now very dedicated to ensure that all documentation examples work correctly by testing each documentation example via Python's doctest (https://docs.python.org/3/library/doctest.html) on a daily basis.
In short we should do the following for all models for both PyTorch and Tensorflow:
Adding a documentation test for a model is a great way to better understand how the model works, a simple (possibly first) contribution to Transformers and most importantly a very important contribution to the Transformers community🔥
If you're interested in adding a documentation test, please read through the Guide to contributing below.
This issue is a call for contributors, to make sure docstring exmaples of existing model architectures work correctly. If you wish to contribute, reply in this thread which architectures you'd like to take :)
Guide to contributing:
Ensure you've read our contributing guidelines📜
Claim your architecture(s) in this thread (confirm no one is working on it)🎯
Implement the changes as in #15987 (see the diff on the model architectures for a few examples)💪
src/transformers/models/[model_name]/modeling_[model_name].py
,src/transformers/models/[model_name]/modeling_tf_[model_name].py
orsrc/transformers/doc_utils.py
orsrc/transformes/file_utils.py
In addition, there are a few things we can also improve, for example :
Open the PR and tag me @patrickvonplaten @ydshieh or @patil-suraj (don't forget to run🎊
make fixup
before your final commit)# Copied from transformers.models.bert...
, this means that the code is copied from that source, and our scripts will automatically keep that in sync. If you see that, you should not edit the copied method! Instead, edit the original method it's copied from, and run make fixup to synchronize that across all the copies. Be sure you installed the development dependencies withpip install -e ".[dev]"
, as described in the contributor guidelines above, to ensure that the code quality tools inmake fixup
can run.PyTorch Model Examples added to tests:
Tensorflow Model Examples added to tests:
The text was updated successfully, but these errors were encountered: