[Docs] Make an ordered list prettier in add_tensorflow_model.md (#29949)
This commit is contained in:
parent
0d04b1e25a
commit
cb5927ca8f
|
@ -109,52 +109,52 @@ instructions below to set up your environment and open a draft PR.
|
||||||
|
|
||||||
2. Clone your `transformers` fork to your local disk, and add the base repository as a remote:
|
2. Clone your `transformers` fork to your local disk, and add the base repository as a remote:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/[your Github handle]/transformers.git
|
git clone https://github.com/[your Github handle]/transformers.git
|
||||||
cd transformers
|
cd transformers
|
||||||
git remote add upstream https://github.com/huggingface/transformers.git
|
git remote add upstream https://github.com/huggingface/transformers.git
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Set up a development environment, for instance by running the following command:
|
3. Set up a development environment, for instance by running the following commands:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python -m venv .env
|
python -m venv .env
|
||||||
source .env/bin/activate
|
source .env/bin/activate
|
||||||
pip install -e ".[dev]"
|
pip install -e ".[dev]"
|
||||||
```
|
```
|
||||||
|
|
||||||
Depending on your OS, and since the number of optional dependencies of Transformers is growing, you might get a
|
Depending on your OS, and since the number of optional dependencies of Transformers is growing, you might get a
|
||||||
failure with this command. If that's the case make sure to install TensorFlow then do:
|
failure with this command. If that's the case make sure to install TensorFlow then do:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install -e ".[quality]"
|
pip install -e ".[quality]"
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note:** You don't need to have CUDA installed. Making the new model work on CPU is sufficient.
|
**Note:** You don't need to have CUDA installed. Making the new model work on CPU is sufficient.
|
||||||
|
|
||||||
4. Create a branch with a descriptive name from your main branch
|
4. Create a branch with a descriptive name from your main branch:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git checkout -b add_tf_brand_new_bert
|
git checkout -b add_tf_brand_new_bert
|
||||||
```
|
```
|
||||||
|
|
||||||
5. Fetch and rebase to current main
|
5. Fetch and rebase to current main:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git fetch upstream
|
git fetch upstream
|
||||||
git rebase upstream/main
|
git rebase upstream/main
|
||||||
```
|
```
|
||||||
|
|
||||||
6. Add an empty `.py` file in `transformers/src/models/brandnewbert/` named `modeling_tf_brandnewbert.py`. This will
|
6. Add an empty `.py` file in `transformers/src/models/brandnewbert/` named `modeling_tf_brandnewbert.py`. This will
|
||||||
be your TensorFlow model file.
|
be your TensorFlow model file.
|
||||||
|
|
||||||
7. Push the changes to your account using:
|
7. Push the changes to your account using:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git add .
|
git add .
|
||||||
git commit -m "initial commit"
|
git commit -m "initial commit"
|
||||||
git push -u origin add_tf_brand_new_bert
|
git push -u origin add_tf_brand_new_bert
|
||||||
```
|
```
|
||||||
|
|
||||||
8. Once you are satisfied, go to the webpage of your fork on GitHub. Click on “Pull request”. Make sure to add the
|
8. Once you are satisfied, go to the webpage of your fork on GitHub. Click on “Pull request”. Make sure to add the
|
||||||
GitHub handle of some members of the Hugging Face team as reviewers, so that the Hugging Face team gets notified for
|
GitHub handle of some members of the Hugging Face team as reviewers, so that the Hugging Face team gets notified for
|
||||||
|
|
Loading…
Reference in New Issue