Copy code from Bert to Roberta and add safeguard script (#7219)

* Copy code from Bert to Roberta and add safeguard script

* Fix docstring

* Comment code

* Formatting

* Update src/transformers/modeling_roberta.py

Co-authored-by: Lysandre Debut <lysandre@huggingface.co>

* Add test and fix bugs

* Fix style and make new comand

Co-authored-by: Lysandre Debut <lysandre@huggingface.co>
This commit is contained in:
Sylvain Gugger
2020-09-22 05:02:27 -04:00
committed by GitHub
parent 656c27c3a3
commit e4b94d8e58
6 changed files with 834 additions and 40 deletions

View File

@@ -6,6 +6,7 @@ quality:
black --check --line-length 119 --target-version py35 examples templates tests src utils
isort --check-only examples templates tests src utils
flake8 examples templates tests src utils
python utils/check_copies.py
python utils/check_repo.py
# Format source code automatically
@@ -14,6 +15,11 @@ style:
black --line-length 119 --target-version py35 examples templates tests src utils
isort examples templates tests src utils
# Make marked copies of snippets of codes conform to the original
fix-copies:
python utils/check_copies.py --fix_and_overwrite
# Run tests for the library
test: