in src/sagemaker_training/process.py [0:0]
def _create_command(self):
entrypoint_type = _entry_point_type.get(environment.code_dir, self._user_entry_point)
if entrypoint_type is _entry_point_type.PYTHON_PACKAGE:
entry_module = self._user_entry_point.replace(".py", "")
return self._python_command() + ["-m", entry_module] + self._args
elif entrypoint_type is _entry_point_type.PYTHON_PROGRAM:
return self._python_command() + [self._user_entry_point] + self._args
else:
args = [
six.moves.shlex_quote(arg) # pylint: disable=too-many-function-args
for arg in self._args
]
return [
"/bin/sh",
"-c",
'"./%s %s"' % (self._user_entry_point, " ".join(args)),
]