Skip to content

Commit 1942e0f

Browse files
committed
Check if command is matching the runner.
1 parent 36691f6 commit 1942e0f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ads/jobs/templates/driver_pytorch.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,12 @@ def prepare_cmd(self, launch_args: list = None, prefix=""):
340340
launch_args = []
341341
# Append launch cmd args specified by the user.
342342
if self.launch_cmd:
343+
if not self.launch_cmd.startswith(self.LAUNCHER):
344+
raise ValueError(
345+
f"Command not supported: '{self.launch_cmd}'. "
346+
f"The command should start with '{self.LAUNCHER}'."
347+
)
348+
343349
launch_args.append(self.launch_cmd[len(self.LAUNCHER) + 1 :])
344350
else:
345351
launch_args.append(self.get_cmd_with_entrypoint_and_args())

0 commit comments

Comments
 (0)