pyiron.base.job.wrapper module

class pyiron.base.job.wrapper.JobWrapper(working_directory, job_id=None, hdf5_file=None, h5_path=None, submit_on_remote=False, debug=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)
run()[source]

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

static setup_logger(debug=False)[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
pyiron.base.job.wrapper.job_wrapper_function(working_directory, job_id=None, file_path=None, submit_on_remote=False, debug=False)[source]

Job Wrapper function - creates a JobWrapper object and calls run() on that object

Parameters:
  • working_directory (str) – directory where the HDF5 file of the job is located
  • job_id (int/ None) – job id
  • file_path (str) – path to the HDF5 file
  • debug (bool) – enable debug mode
  • submit_on_remote (bool) – submit to queuing system on remote host