File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 57
57
# os.environ["TORCHDYNAMO_VERBOSE"] = "1"
58
58
59
59
60
- async def main ():
61
- config_path = str (sys .argv [1 ])
62
- config = Config (entity = "participant" , participant_config_file = config_path )
60
+ async def main (config ):
63
61
n_nodes = config .participant ["scenario_args" ]["n_nodes" ]
64
62
model_name = config .participant ["model_args" ]["model" ]
65
63
idx = config .participant ["device_args" ]["idx" ]
@@ -284,14 +282,16 @@ def randomize_value(value, variability):
284
282
285
283
286
284
if __name__ == "__main__" :
287
- if sys .platform == "win32" :
285
+ config_path = str (sys .argv [1 ])
286
+ config = Config (entity = "participant" , participant_config_file = config_path )
287
+ if sys .platform == "win32" or config .participant ["scenario_args" ]["deployment" ] == "docker" :
288
288
import asyncio
289
- asyncio .run (main (), debug = False )
289
+ asyncio .run (main (config ), debug = False )
290
290
else :
291
291
try :
292
- import uvloop
293
- uvloop .run (main (), debug = False )
292
+ import uvloop
293
+ uvloop .run (main (config ), debug = False )
294
294
except ImportError :
295
295
logging .warning ("uvloop not available, using default loop" )
296
296
import asyncio
297
- asyncio .run (main (), debug = False )
297
+ asyncio .run (main (config ), debug = False )
You can’t perform that action at this time.
0 commit comments