RemoteSlurmJob.init (function)
def __init__(self, server=None, job_name=None, conda_env=None, isolate_env=False, nprocs=4, slurm_id=None, connect_to_existing=None)
Create and submit a job on a RemoteSlurmServer.
Under-the-hood, this creates a subdirectory in RemoteSlurmServer.directory
based on the provided or assigned job_name. All submitted scripts/files
(through either RemoteSlurmJob.run_script or RemoteSlurmJob.submit_script)
are copied to and run in this directory.
Arguments
server(RemoteSlurmServer, optional, default=None): server to use when running the job. Ifserveris not provided,hostmust be provided.job_name(string, optional, default=None): name for this job instance. If not provided, one will be created from the current datetime and accessible through RemoteSlurmJob.job_name. Thisjob_namewill be necessary to reconnect to a previously submitted job.conda_env(string or None, optional, default=None): name of the conda environment to use for the job or False to not use a conda environment. If not passed or None, will default to 'default' if conda is installed on the server or to False otherwise.isolate_env(bool, optional, default=False): whether to clone theconda_envfor use in this job. If True, any setup/installation done by this job will not affect the original environment and will not affect other jobs. Note that the environment is cloned (and therefore isolated) at the first call to RemoteSlurmJob.run_script or RemoteSlurmJob.submit_script. Setup in the parent environment can be done at the server level, but requires passingconda_env. Will raise an error ifisolate_env=Trueandconda_env=False.nprocs(int, optional, default=4): default number of procs to use when calling RemoteSlurmJob.submit_scriptslurm_id(int, optional, default=None): internal id of the remote slurm job. If unknown, this will be determined automatically. Do NOT setslurm_idfor a new RemoteSlurmJob instance.connect_to_existing(bool, optional, default=None): NOT YET IMPLEMENTED