Skip to content

Commit ad7964e

Browse files
committed
fix: Rename variable to control PG timeout to not refer to NCCL
The variable is not backend specific. In the future, if/when we support other backends, this will become more evidently a problem. Also clarified docs about the variable a bit. Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
1 parent fd03460 commit ad7964e

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,4 +375,6 @@ run_training(
375375

376376
Below is a list of custom environment variables users can set in the training library.
377377

378-
1. `INSTRUCTLAB_NCCL_TIMEOUT_MS`, this environment variable controls the NCCL timeout in milliseconds. Consider increasing if seeing FSDP related NCCL errors.
378+
1. `INSTRUCTLAB_PROCESS_GROUP_TIMEOUT_MS`, this environment variable controls
379+
the process group timeout in milliseconds. Consider increasing if seeing
380+
FSDP related collective timeout errors.

src/instructlab/training/main_ds.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ def main(args):
568568

569569
# solution discovered from torchtune https://github.com/pytorch/torchtune/issues/2093
570570
# 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"))
571+
nccl_timeout = int(os.getenv("INSTRUCTLAB_PROCESS_GROUP_TIMEOUT_NS", "6000000"))
572572
#### distributed init #####
573573
torch.cuda.set_device(int(os.environ["LOCAL_RANK"]))
574574
args.local_rank = int(os.environ["LOCAL_RANK"])

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ basepython = python3.11
1818
description = run unit tests with pytest
1919
passenv =
2020
HF_HOME
21-
INSTRUCTLAB_NCCL_TIMEOUT_MS
21+
INSTRUCTLAB_PROCESS_GROUP_TIMEOUT_MS
2222
deps =
2323
pytest
2424
-r requirements-dev.txt
@@ -32,7 +32,7 @@ commands = {envpython} -m pytest tests/unit {posargs}
3232
description = run accelerated smoke tests with pytest
3333
passenv =
3434
HF_HOME
35-
INSTRUCTLAB_NCCL_TIMEOUT_MS
35+
INSTRUCTLAB_PROCESS_GROUP_TIMEOUT_MS
3636
deps =
3737
pytest
3838
-r requirements-dev.txt

0 commit comments

Comments
 (0)