

Pull request checklist
☐ The pull request title should summarize your contribution.
☐ If your pull request addresses an issue, please mention the issue number in the pull
request description to make sure they are linked (and people viewing the issue know you
are working on it).
☐ To indicate a work in progress please prefix the title with [WIP]. These are
useful to avoid duplicated work, and to differentiate it from PRs ready to be merged.
☐ Make sure existing tests pass.
☐ If adding a new feature, also add tests for it.
   - If you are adding a new model, make sure you use
     ModelTester.all_model_classes = (MyModel, MyModelWithLMHead,) to trigger the common tests.
   - If you are adding new @slow tests, make sure they pass using
     RUN_SLOW=1 python -m pytest tests/models/my_new_model/test_my_new_model.py.
   - If you are adding a new tokenizer, write tests and make sure
     RUN_SLOW=1 python -m pytest tests/models/{your_model_name}/test_tokenization_{your_model_name}.py passes.
   - CircleCI does not run the slow tests, but GitHub Actions does every night!
☐ All public methods must have informative docstrings (see
modeling_bert.py
for an example).
☐ Due to the rapidly growing repository, don't add any images, videos and other
non-text files that'll significantly weigh down the repository. Instead, use a Hub
repository such as hf-internal-testing
to host these files and reference them by URL. We recommend placing documentation
related images in the following repository:
huggingface/documentation-images.
You can open a PR on this dataset repository and ask a Hugging Face member to merge it.
For more information about the checks run on a pull request, take a look at our Checks on a Pull Request guide.
Tests
An extensive test suite is included to test the library behavior and several examples. Library tests can be found in
the tests folder and examples tests in the
examples folder.
We like pytest and pytest-xdist because it's faster. From the root of the
repository, specify a path to a subfolder or a test file to run the test: