Skip to content

Commit 7a7012f

Browse files
authored
[bug fixes] ensure step_init of parent decorator is called. (#6)
* changing command style to ensure that if alias is missing then it still works.
1 parent 352b28d commit 7a7012f

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

metaflow_extensions/torchrun/plugins/torchrun_libs/executor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def _exec_cmd(
6969
self._ensure_torch_installed()
7070

7171
# Container to build up the command to be run in a subprocess.
72-
cmd = ["torchrun"]
72+
cmd = [sys.executable, "-m", "torch.distributed.run"]
7373

7474
# Construct the torchrun distributed arguments.
7575

metaflow_extensions/torchrun/plugins/torchrun_libs/torchrun_decorator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def _setup_current(self, main_addr, main_port, ubf_context, num_nodes, node_inde
4848
)
4949

5050
def step_init(self, flow, graph, step, decos, environment, flow_datastore, logger):
51+
super().step_init(flow, graph, step, decos, environment, flow_datastore, logger)
5152

5253
self.flow_datastore = flow_datastore
5354

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from setuptools import setup, find_namespace_packages
22

3-
version = "0.0.8"
3+
version = "0.0.9"
44

55
setup(
66
name="metaflow-torchrun",

0 commit comments

Comments
 (0)