[Docs] Add language identifiers to fenced code blocks (#28955)
Add language identifiers to code blocks
This commit is contained in:
@@ -18,13 +18,13 @@ limitations under the License.
|
||||
|
||||
This folder provide a template for adding a new example script implementing a training or inference task with the
|
||||
models in the 🤗 Transformers library. To use it, you will need to install cookiecutter:
|
||||
```
|
||||
```bash
|
||||
pip install cookiecutter
|
||||
```
|
||||
or refer to the installation page of the [cookiecutter documentation](https://cookiecutter.readthedocs.io/).
|
||||
|
||||
You can then run the following command inside the `examples` folder of the transformers repo:
|
||||
```
|
||||
```bash
|
||||
cookiecutter ../templates/adding_a_new_example_script/
|
||||
```
|
||||
and answer the questions asked, which will generate a new folder where you will find a pre-filled template for your
|
||||
|
||||
@@ -582,27 +582,27 @@ You should do the following:
|
||||
|
||||
1. Create a branch with a descriptive name from your main branch
|
||||
|
||||
```
|
||||
```bash
|
||||
git checkout -b add_[lowercase name of model]
|
||||
```
|
||||
|
||||
2. Commit the automatically generated code:
|
||||
|
||||
```
|
||||
```bash
|
||||
git add .
|
||||
git commit
|
||||
```
|
||||
|
||||
3. Fetch and rebase to current main
|
||||
|
||||
```
|
||||
```bash
|
||||
git fetch upstream
|
||||
git rebase upstream/main
|
||||
```
|
||||
|
||||
4. Push the changes to your account using:
|
||||
|
||||
```
|
||||
```bash
|
||||
git push -u origin a-descriptive-name-for-my-changes
|
||||
```
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ tests/test_modeling_tf_<model_name>.py
|
||||
|
||||
You can run the tests to ensure that they all pass:
|
||||
|
||||
```
|
||||
```bash
|
||||
python -m pytest ./tests/test_*<model_name>*.py
|
||||
```
|
||||
|
||||
@@ -236,7 +236,7 @@ depending on your choices).
|
||||
|
||||
You will also see a doc file and tests for your new models. First you should run
|
||||
|
||||
```
|
||||
```bash
|
||||
make style
|
||||
make fix-copies
|
||||
```
|
||||
@@ -247,7 +247,7 @@ and then you can start tweaking your model. You should:
|
||||
|
||||
Once you're done, you can run the tests to ensure that they all pass:
|
||||
|
||||
```
|
||||
```bash
|
||||
python -m pytest ./tests/test_*<model_name>*.py
|
||||
```
|
||||
|
||||
|
||||
@@ -593,27 +593,27 @@ You should do the following:
|
||||
|
||||
1. Create a branch with a descriptive name from your main branch
|
||||
|
||||
```
|
||||
```bash
|
||||
git checkout -b add_big_bird
|
||||
```
|
||||
|
||||
2. Commit the automatically generated code:
|
||||
|
||||
```
|
||||
```bash
|
||||
git add .
|
||||
git commit
|
||||
```
|
||||
|
||||
3. Fetch and rebase to current main
|
||||
|
||||
```
|
||||
```bash
|
||||
git fetch upstream
|
||||
git rebase upstream/main
|
||||
```
|
||||
|
||||
4. Push the changes to your account using:
|
||||
|
||||
```
|
||||
```bash
|
||||
git push -u origin a-descriptive-name-for-my-changes
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user