src/orion/core/io/orion_cmdline_parser.py
def infer_user_script(self, user_args):
        """Infer the script name and perform some checks"""
        if not user_args:
            return

        # TODO: Parse commandline for any options to python and pick the script filepath properly
        if user_args[0] == "python":
            user_script = user_args[1]
        else:
            user_script = user_args[0]

        if (
            not os.path.exists(user_script)
            and not shutil.which(user_script)
            and not self.allow_non_existing_files
        ):
            raise OSError(
                errno.ENOENT,
                "The path specified for the script does not exist",
                user_script,
            )

        self.user_script = user_script
Infer the script name and perform some checks
Infer the script name and perform some checks
Infer the script name and perform some checks
def infer_user_script(self, user_args):
        if not user_args:
            return
        if user_args[0] == "python":
            user_script = user_args[1]
        else:
            user_script = user_args[0]
        if (
            not os.path.exists(user_script)
            and not shutil.which(user_script)
            and not self.allow_non_existing_files
        ):
            raise OSError(
                errno.ENOENT,
                "The path specified for the script does not exist",
                user_script,
            )
        self.user_script = user_script
def infer_user_script ( self , user_args ) : if not user_args : return if user_args [ 0 ] == "python" : user_script = user_args [ 1 ] else : user_script = user_args [ 0 ] if ( not os . path . exists ( user_script ) and not shutil . which ( user_script ) and not self . allow_non_existing_files ) : raise OSError ( errno . ENOENT , "The path specified for the script does not exist" , user_script , ) self . user_script = user_script
Infer the script name and perform some checks
Infer the script name and perform some checks
"""Infer the script name and perform some checks""" # TODO: Parse commandline for any options to python and pick the script filepath properly
self
user_args