mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-03 12:50:06 +06:00

* 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>
37 lines
919 B
Makefile
37 lines
919 B
Makefile
.PHONY: quality style test test-examples docs
|
|
|
|
# Check that source code meets quality standards
|
|
|
|
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
|
|
|
|
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:
|
|
python -m pytest -n auto --dist=loadfile -s -v ./tests/
|
|
|
|
# Run tests for examples
|
|
|
|
test-examples:
|
|
python -m pytest -n auto --dist=loadfile -s -v ./examples/
|
|
|
|
# Check that docs can build
|
|
|
|
docs:
|
|
cd docs && make html SPHINXOPTS="-W"
|