Skip to content

Commit 4ba0f47

Browse files
cdoernbooxter
authored andcommitted
Revert "fix: extend nccl timeout"
Signed-off-by: Charlie Doern <cdoern@redhat.com>
1 parent e235f26 commit 4ba0f47

3 files changed

Lines changed: 1 addition & 15 deletions

File tree

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,3 @@ run_training(
370370
train_args=training_args,
371371
)
372372
```
373-
374-
## Environment variables
375-
376-
Below is a list of custom environment variables users can set in the training library.
377-
378-
1. `INSTRUCTLAB_NCCL_TIMEOUT_MS`, this environment variable controls the NCCL timeout in milliseconds. Consider increasing if seeing FSDP related NCCL errors.

src/instructlab/training/main_ds.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from copy import deepcopy
55
from pathlib import Path
66
import argparse
7-
import datetime
87
import math
98
import os
109
import re
@@ -566,15 +565,10 @@ def main(args):
566565
model_conf = AutoConfig.from_pretrained(args.model_name_or_path)
567566
args.model_type = model_conf.model_type
568567

569-
# solution discovered from torchtune https://github.com/pytorch/torchtune/issues/2093
570-
# gets converted to a timedelta of 1:40:00 if the default is kept
571-
nccl_timeout = int(os.getenv("INSTRUCTLAB_NCCL_TIMEOUT_MS", "6000000"))
572568
#### distributed init #####
573569
torch.cuda.set_device(int(os.environ["LOCAL_RANK"]))
574570
args.local_rank = int(os.environ["LOCAL_RANK"])
575-
torch.distributed.init_process_group(
576-
"nccl", timeout=datetime.timedelta(milliseconds=nccl_timeout)
577-
)
571+
torch.distributed.init_process_group("nccl")
578572
args.global_rank = torch.distributed.get_rank()
579573
tensor = torch.ByteTensor([False]).cuda()
580574
torch.distributed.all_reduce(tensor)

tox.ini

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ basepython = python3.11
1818
description = run unit tests with pytest
1919
passenv =
2020
HF_HOME
21-
INSTRUCTLAB_NCCL_TIMEOUT_MS
2221
deps =
2322
pytest
2423
-r requirements-dev.txt
@@ -32,7 +31,6 @@ commands = {envpython} -m pytest tests/unit {posargs}
3231
description = run accelerated smoke tests with pytest
3332
passenv =
3433
HF_HOME
35-
INSTRUCTLAB_NCCL_TIMEOUT_MS
3634
deps =
3735
pytest
3836
-r requirements-dev.txt

0 commit comments

Comments
 (0)