add init_process_group

pull/1173/head
Barbery 2023-06-02 14:28:58 +08:00 committed by GitHub
parent 9afc36ae50
commit 921d9d4f13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ from arguments import ModelArguments, DataTrainingArguments
logger = logging.getLogger(__name__)
def main():
torch.distributed.init_process_group(backend='nccl')
parser = HfArgumentParser((ModelArguments, DataTrainingArguments, Seq2SeqTrainingArguments))
if len(sys.argv) == 2 and sys.argv[1].endswith(".json"):
# If we pass only one argument to the script and it's the path to a json file,