File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 122122-----------------
123123"""
124124from pathlib import Path
125- from typing import Optional
125+ from typing import Dict , Optional
126126
127127import torchx
128128import torchx .specs as specs
@@ -139,6 +139,7 @@ def ddp(
139139 memMB : int = 1024 ,
140140 h : Optional [str ] = None ,
141141 j : str = "1x2" ,
142+ env : Optional [Dict [str , str ]] = None ,
142143 rdzv_endpoint : str = "etcd-server.default.svc.cluster.local:2379" ,
143144) -> specs .AppDef :
144145 """
@@ -160,6 +161,7 @@ def ddp(
160161 memMB: cpu memory in MB per replica
161162 h: a registered named resource (if specified takes precedence over cpu, gpu, memMB)
162163 j: {nnodes}x{nproc_per_node}, for gpu hosts, nproc_per_node must not exceed num gpus
164+ env: environment varibles to be passed to the run (e.g. ENV1=v1,ENV2=v2,ENV3=v3)
163165 rdzv_endpoint: etcd server endpoint (only matters when nnodes > 1)
164166 """
165167
@@ -199,6 +201,7 @@ def ddp(
199201 script ,
200202 * script_args ,
201203 ],
204+ env = env or {},
202205 )
203206 ],
204207 )
You can’t perform that action at this time.
0 commit comments