pysqa.wrapper.lsf.LsfCommands#

class pysqa.wrapper.lsf.LsfCommands[source]#

Bases: SchedulerCommands

__init__()#

Methods

__init__()

convert_queue_status(queue_status_output)

Convert the queue status output to a pandas DataFrame.

dependencies(dependency_list)

Returns the list of dependencies for a job.

get_job_id_from_output(queue_submit_output)

Extract the job ID from the queue submit output.

render_submission_template(command[, ...])

Generate the job submission template.

Attributes

delete_job_command

Return the command to delete a job.

enable_reservation_command

Returns the command to enable job reservation on the scheduler.

get_queue_status_command

Return the command to get the queue status.

submit_job_command

Return the command to submit a job.

static convert_queue_status(queue_status_output: str) DataFrame[source]#

Convert the queue status output to a pandas DataFrame.

property delete_job_command: list[str]#

Return the command to delete a job.

static dependencies(dependency_list: list[str]) list#

Returns the list of dependencies for a job.

Parameters:

dependency_list (list[str]) – The list of dependencies.

Returns:

The list of dependencies.

Return type:

list

property enable_reservation_command: list[str]#

Returns the command to enable job reservation on the scheduler.

Returns:

The command to enable job reservation.

Return type:

list[str]

static get_job_id_from_output(queue_submit_output: str) int[source]#

Extract the job ID from the queue submit output.

property get_queue_status_command: list[str]#

Return the command to get the queue status.

static render_submission_template(command: str, submission_template: str | Template = '#!/bin/bash\n#BSUB -q queue\n#BSUB -J {{job_name}}\n#BSUB -o time.out\n#BSUB -n {{cores}}\n#BSUB -cwd {{working_directory}}\n#BSUB -e error.out\n{%- if run_time_max %}\n#BSUB -W {{run_time_max}}\n{%- endif %}\n{%- if memory_max %}\n#BSUB -M {{memory_max}}\n{%- endif %}\n\n{{command}}\n', job_name: str = 'pysqa', working_directory: str = '/home/docs/checkouts/readthedocs.org/user_builds/pysqa/checkouts/latest/docs', cores: int = 1, memory_max: int | str | None = None, run_time_max: int | None = None, dependency_list: list[int] | None = None, **kwargs) str[source]#

Generate the job submission template.

Parameters:
  • command (str, optional) – The command to be executed.

  • job_name (str, optional) – The job name. Defaults to “pysqa”.

  • working_directory (str, optional) – The working directory. Defaults to “.”.

  • cores (int, optional) – The number of cores. Defaults to 1.

  • memory_max (int, optional) – The maximum memory. Defaults to None.

  • run_time_max (int, optional) – The maximum run time. Defaults to None.

  • dependency_list (list[int], optional) – The list of dependency job IDs. Defaults to None.

  • submission_template (str) – Submission script template pysqa.wrapper.flux.template

Returns:

The rendered job submission template.

Return type:

str

property submit_job_command: list[str]#

Return the command to submit a job.