Skip to content

Commit

Permalink
Tee argument (#808)
Browse files Browse the repository at this point in the history
* changed tee to an argument of the component

* Added documentation for tee argument
  • Loading branch information
ccharest93 authored Jan 30, 2024
1 parent 19497eb commit f447bed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion torchx/components/dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ def ddp(
rdzv_backend: str = "c10d",
mounts: Optional[List[str]] = None,
debug: bool = False,
tee: int = 3,
) -> specs.AppDef:
"""
Distributed data parallel style application (one role, multi-replica).
Expand Down Expand Up @@ -208,6 +209,7 @@ def ddp(
mounts: mounts to mount into the worker environment/container (ex. type=<bind/volume>,src=/host,dst=/job[,readonly]).
See scheduler documentation for more info.
debug: whether to run with preset debug flags enabled
tee: tees the specified std stream(s) to console + file. 0: none, 1: stdout, 2: stderr, 3: both
"""

if (script is None) == (m is None):
Expand Down Expand Up @@ -262,7 +264,7 @@ def ddp(
"--nproc_per_node",
str(nproc_per_node),
"--tee",
"3",
str(tee),
"--role",
"",
]
Expand Down

0 comments on commit f447bed

Please sign in to comment.