idmtools_slurm_utils.utils module

Utils for slurm bridge.

Copyright 2021, Bill & Melinda Gates Foundation. All rights reserved.

idmtools_slurm_utils.utils.process_job(job_path, result_dir, cleanup_job: bool = True)[source]

Process a job.

Parameters:
  • job_path – Path to the job

  • result_dir – Result directory

  • cleanup_job – Cleanup job when done(true), false leave it in place.

idmtools_slurm_utils.utils.get_job_result(job_path: PathLike) Dict[source]

Read a job file in from path and return a result.

Parameters:

job_path – Path

Returns:

Result

idmtools_slurm_utils.utils.write_result(result: Dict, result_name: Path)[source]

Write the result of a job to a directory.

Parameters:
  • result – Result to write

  • result_name – Path to write result to.