ai2_kit.tool.hpc module#

class ai2_kit.tool.hpc.Slurm(sbatch_bin='sbatch', squeue_bin='squeue', scancel_bin='scancel')[source]#

Bases: object

submit(*path_or_glob: str)[source]#

Submit multiple Slurm script at once.

Parameters:

path_or_glob – path or glob of Slurm script

wait(timeout=604800, ignore_error=False, fast_fail=False, interval=10)[source]#

Wait until all jobs are finished.

Parameters:
  • timeout – timeout in seconds

  • ignore_error – ignore error

  • fast_fail – exit if any job failed

  • interval – interval in seconds

ai2_kit.tool.hpc.append_if_not_exist(fp, line: str, feat_str=None)[source]#