[examples] consistently use --gpus, instead of --n_gpu (#6315)

This commit is contained in:
Stas Bekman
2020-08-07 07:36:32 -07:00
committed by GitHub
parent 0e36e51515
commit 6695450a23
4 changed files with 5 additions and 9 deletions

View File

@@ -55,7 +55,7 @@ Here are the results on the *test* sets for 6 of the languages available in XNLI
## Setup
This part of the library has only be tested with Python3.6+. There are few specific dependencies to install before launching a distillation, you can install them with the command `pip install -r requirements.txt`.
This part of the library has only be tested with Python3.6+. There are few specific dependencies to install before launching a distillation, you can install them with the command `pip install -r requirements.txt`.
**Important note:** The training scripts have been updated to support PyTorch v1.2.0 (there are breakings changes compared to v1.1.0).
@@ -161,7 +161,7 @@ python -m torch.distributed.launch \
--master_port $MASTER_PORT \
train.py \
--force \
--n_gpu $WORLD_SIZE \
--gpus $WORLD_SIZE \
--student_type distilbert \
--student_config training_configs/distilbert-base-uncased.json \
--teacher_type bert \

View File

@@ -210,7 +210,7 @@ def main():
help="For fp16: Apex AMP optimization level selected in ['O0', 'O1', 'O2', and 'O3']."
"See details at https://nvidia.github.io/apex/amp.html",
)
parser.add_argument("--n_gpu", type=int, default=1, help="Number of GPUs in the node.")
parser.add_argument("--gpus", type=int, default=1, help="Number of GPUs in the node.")
parser.add_argument("--local_rank", type=int, default=-1, help="Distributed training - Local rank")
parser.add_argument("--seed", type=int, default=56, help="Random seed")