Skip to content

Commit e26315f

Browse files
Restore compatibility with windows
1 parent 58ed8b0 commit e26315f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

nebula/node.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@
5757
# os.environ["TORCHDYNAMO_VERBOSE"] = "1"
5858

5959

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):
6361
n_nodes = config.participant["scenario_args"]["n_nodes"]
6462
model_name = config.participant["model_args"]["model"]
6563
idx = config.participant["device_args"]["idx"]
@@ -284,14 +282,16 @@ def randomize_value(value, variability):
284282

285283

286284
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":
288288
import asyncio
289-
asyncio.run(main(), debug=False)
289+
asyncio.run(main(config), debug=False)
290290
else:
291291
try:
292-
import uvloop
293-
uvloop.run(main(), debug=False)
292+
import uvloop
293+
uvloop.run(main(config), debug=False)
294294
except ImportError:
295295
logging.warning("uvloop not available, using default loop")
296296
import asyncio
297-
asyncio.run(main(), debug=False)
297+
asyncio.run(main(config), debug=False)

0 commit comments

Comments
 (0)