Skip to content

Commit bd3b493

Browse files
Support remote-run for mlc
1 parent b9ea026 commit bd3b493

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

mlc/main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ def mlcr():
8888
mlc_expand_short("run")
8989
def mlcd():
9090
mlc_expand_short("docker")
91+
def mlcdr():
92+
mlc_expand_short("docker")
93+
def mlcrr():
94+
mlc_expand_short("remote-run")
9195
def mlce():
9296
mlc_expand_short("experiment")
9397
def mlct():

mlc/script_action.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,30 @@ def docker_run(self, run_args):
293293
"""
294294
return self.call_script_module_function("docker", run_args)
295295

296+
def remote_run(self, run_args):
297+
"""
298+
####################################################################################################################
299+
Target: Script
300+
Action: remote-run
301+
####################################################################################################################
302+
303+
The `remote-run` action runs a shell command on a remote machine via ssh connection.
304+
305+
306+
Flags Available:
307+
308+
1. --remote_host:
309+
IP or hostnanme for the remote machine
310+
2. --remote_port:
311+
ssh port for the remote machineIP or hostnanme for the remote machine
312+
313+
Example Command:
314+
315+
mlc remote-run script --tags=detect,os -j
316+
317+
"""
318+
return self.call_script_module_function("remote_run", run_args)
319+
296320

297321
def run(self, run_args):
298322
"""

0 commit comments

Comments
 (0)