pyiron_base.jobs.job.wrapper.JobWrapper

pyiron_base.jobs.job.wrapper.JobWrapper#

class pyiron_base.jobs.job.wrapper.JobWrapper(working_directory: str, job_id: int | None = None, hdf5_file: pyiron_base.storage.hdfio.ProjectHDFio | None = None, h5_path: str | None = None, submit_on_remote: bool = False, debug: bool = False, connection_string: str | None = None, collect: bool = False)[source]#

Bases: object

The job wrapper is called from the run_job.py script, it restores the job from hdf5 and executes it.

Parameters:
  • working_directory (str) – working directory of the job

  • job_id (int/ None) – job ID

  • hdf5_file (str) – path to the HDF5 file of the job

  • h5_path (str) – path inside the HDF5 file to load the job

  • submit_on_remote (bool) – submit to queuing system on remote host

  • debug (bool) – enable debug mode [True/False] (optional)

__init__(working_directory: str, job_id: int | None = None, hdf5_file: pyiron_base.storage.hdfio.ProjectHDFio | None = None, h5_path: str | None = None, submit_on_remote: bool = False, debug: bool = False, connection_string: str | None = None, collect: bool = False)[source]#

Methods

__init__(working_directory[, job_id, ...])

run()

The job wrapper run command, sets the job status to 'running' and executes run_if_modal().

setup_logger([debug])

Setup the error logger

run() None[source]#

The job wrapper run command, sets the job status to ‘running’ and executes run_if_modal().

static setup_logger(debug: bool = False) Logger[source]#

Setup the error logger

Parameters:

debug (bool) – the level of logging, enable debug mode [True/False] (optional)

Returns:

logger object instance

Return type:

logger