transformers/templates/adding_a_new_example_script
Aymeric Augustin fa84ae26d6 Reformat source code with black.
This is the result of:

    $ black --line-length 119 examples templates transformers utils hubconf.py setup.py

There's a lot of fairly long lines in the project. As a consequence, I'm
picking the longest widely accepted line length, 119 characters.

This is also Thomas' preference, because it allows for explicit variable
names, to make the code easier to understand.
2019-12-21 17:52:29 +01:00
..
README.md adding templates 2019-10-30 11:31:56 +01:00
run_xxx.py Reformat source code with black. 2019-12-21 17:52:29 +01:00
utils_xxx.py Reformat source code with black. 2019-12-21 17:52:29 +01:00

How to add a new example script in 🤗Transformers

This folder provide a template for adding a new example script implementing a training or inference task with the models in the 🤗Transformers library.

Currently only examples for PyTorch are provided which are adaptations of the library's SQuAD examples which implement single-GPU and distributed training with gradient accumulation and mixed-precision (using NVIDIA's apex library) to cover a reasonable range of use cases.