transformers
transformers copied to clipboard
Fix typing about next_beam_tokens and next_beam_indices
What does this PR do?
Looking at source code they seem to be int not float?
Fixes # (issue)
Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Did you read the contributor guideline, Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the forum? Please add a link to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the documentation guidelines, and here are tips on formatting docstrings.
- [ ] Did you write any new necessary tests?
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR.
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.
Please make sure to run make style
on your branch so that the quality tests pass.
cc @gante for review.
Sure, I will do it soon together with another PR in https://github.com/huggingface/transformers/issues/20820
Please have each of your PR focused on one thing. We don't want to group changes that are not linked to each other in the same PR :-)
Sure, I mean file two PRs but do the work in one single time slot of mine ;)
No worries, I am experienced to make PRs (e.g. to Google Flutter https://github.com/flutter/flutter/pulls?q=is%3Apr+author%3Afzyzcjy)
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
bump, will do it when having time
Hi, I wonder what version of black
is required? I have tried:
(dev-transformers) ➜ transformers git:(patch-1) python3 -m black -- examples tests src utils
Skipping .ipynb files as Jupyter dependencies are not installed.
You can fix this by running ``pip install black[jupyter]``
reformatted src/transformers/utils/model_parallel_utils.py
reformatted tests/models/xlm_prophetnet/test_modeling_xlm_prophetnet.py
reformatted src/transformers/models/layoutlmv3/tokenization_layoutlmv3.py
reformatted src/transformers/models/markuplm/tokenization_markuplm.py
reformatted src/transformers/models/layoutlmv2/tokenization_layoutlmv2.py
reformatted examples/research_projects/lxmert/modeling_frcnn.py
reformatted examples/research_projects/visual_bert/modeling_frcnn.py
reformatted src/transformers/models/prophetnet/modeling_prophetnet.py
reformatted src/transformers/models/xlm_prophetnet/modeling_xlm_prophetnet.py
reformatted src/transformers/models/reformer/modeling_reformer.py
reformatted src/transformers/tokenization_utils_base.py
All done! ✨ 🍰 ✨
11 files reformatted, 2138 files left unchanged.
and so on. It is changing formats for a dozen of files that I did not touch, such as:
(P.S. I did not run make style
but instead invoke that command directly because my black
on PATH has a little conflict. I have followed https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md and create a brand new conda environment and install via pip)
@fzyzcjy We use black 22.3 (see here)
Hmm it is the correct version
python -m black --version
python -m black, 22.3.0 (compiled: yes)
@fzyzcjy Suggestion: revert to the first commit (which only touches 2 lines), run make fixup
(which only touches modified files), then force commit the result :)
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.