Docstring is important to understand what inputs a function/method expect and the output format it returns !
This issue is part of the HACKTOBERFEST event 🔥 . It is a call for contributions with the goal being to help transformers having the required and correct docstring, so users can use it more smoothly.
Adding/Fixing a docstring is a simple (possibly first) contribution to Transformers and most importantly a very important contribution to the Transformers community ❤️ .
If you're interested in making a (maybe first!) contribution, please read through the Guide to contributing below. Before starting work on it, please reply in this thread which file you'd like to take :)
An example of such PR.
Guide to contributing:
- Ensure you've read our contributing guidelines 📜
- Be sure you installed the development dependencies with
pip install -e ".[dev]", as described in the contributor guidelines above, to ensure that the code quality tools in make fixup can run.
- Look at the file
utils/check_docstrings.py:
- find the line
OBJECTS_TO_IGNORE =
- choose a name in the list
OBJECTS_TO_IGNORE (make sure it is not taken yet by someone in the comments of this issue)
- Claim the entry in this thread (confirm no one is working on it) 🎯
- Let's select one single entry for a PR, or at most the entries from the same model architecture (its config/tokenizer/model/processor objects)
- Remove the selected item (in step 3.) from
OBJECTS_TO_IGNORE
- run
python3 utils/check_docstrings.py --fix_and_overwrite
- You might see something like:
- commit the changes
- fill information where
<fill_type> or <fill_docstring> appear:
-
you can usually find the content to fill from other files (by searching the codebase)
-
compared to step 5.), the output now looks like:
-
commit the changes
- run
utils/check_docstrings.py
- make sure nothing change. Otherwise further work is required.
- run
make fixup
- Open the PR
- with the title having format
[docstring] ... (entry name you work on) ...
- wait CI to be green
- otherwise, try to fix the failing tests if possible 🙏 . If necessary, ping me for helping on this.
Looking forward to your contributions 🔥 ❤️ 🚀 !
Docstring is important to understand what inputs a function/method expect and the output format it returns !
This issue is part of the HACKTOBERFEST event 🔥 . It is a call for contributions with the goal being to help
transformershaving the required and correct docstring, so users can use it more smoothly.Adding/Fixing a docstring is a simple (possibly first) contribution to Transformers and most importantly a very important contribution to the Transformers community ❤️ .
If you're interested in making a (maybe first!) contribution, please read through the Guide to contributing below. Before starting work on it, please reply in this thread which file you'd like to take :)
An example of such PR.
Guide to contributing:
pip install -e ".[dev]", as described in the contributor guidelines above, to ensure that the code quality tools inmake fixupcan run.utils/check_docstrings.py:OBJECTS_TO_IGNORE =OBJECTS_TO_IGNORE(make sure it is not taken yet by someone in the comments of this issue)OBJECTS_TO_IGNOREpython3 utils/check_docstrings.py --fix_and_overwrite<fill_type>or<fill_docstring>appear:you can usually find the content to fill from other files (by searching the codebase)
compared to step 5.), the output now looks like:
commit the changes
utils/check_docstrings.pymake fixup[docstring] ... (entry name you work on) ...Looking forward to your contributions 🔥 ❤️ 🚀 !