dpdispatcher.machines package#
Machines.
Submodules#
dpdispatcher.machines.JH_UniScheduler module#
Implement job submission through JH UniScheduler commands.
- class dpdispatcher.machines.JH_UniScheduler.JH_UniScheduler(*args: Any, **kwargs: Any)[source]#
Bases:
MachineJH_UniScheduler batch.
Methods
arginfo()Build the dargs schema for machine and context configuration.
bind_context(context)Bind the execution context used for files and remote commands.
check_finish_tag(job)Return whether the success marker for a job is present.
check_if_recover(submission)Return whether serialized state exists for a remote submission.
default_resources(res)Return backend defaults for an incomplete resource specification.
deserialize(machine_dict)Reconstruct a machine from its serialized dictionary.
gen_command_env_cuda_devices(resources)Assign a GPU to the next task when automatic GPU mapping is enabled.
gen_local_script(job)Generate a local staging script for cloud backends.
gen_script(job)Generate the complete scheduler submission script for a job.
gen_script_command(job)Generate task commands, logging redirection, and completion tags.
gen_script_custom_flags_lines(job)Render user-provided scheduler directives as script lines.
gen_script_end(job)Generate job finalization, failure checks, and append commands.
gen_script_env(job)Generate environment setup shared by every task in a job.
gen_script_header(job)Generate scheduler directives and the script shebang for a job.
gen_script_run_command(job)Return the command that sources the generated per-task script.
gen_script_wait(resources)Generate synchronization commands for the configured parallelism.
get_exit_code(job)Get exit code of the job.
get_job_error(job)Return a text error diagnostic for a job, if available.
kill(job)Kill the job.
load_from_dict(machine_dict[, allow_ref])Load a Machine from a dict.
load_from_json(json_path)Load a machine configuration from a JSON file.
load_from_yaml(yaml_path)Load a machine configuration from a YAML file.
resources_arginfo()Generate the resources arginfo.
Generate the resources subfields.
serialize([if_empty_remote_profile])Return a normalized dictionary representation of the machine.
sub_script_cmd(res)Return the legacy scheduler launch command for resources.
sub_script_head(res)Return the legacy scheduler header for a resource specification.
check_status
do_submit
dpdispatcher.machines.distributed_shell module#
Implement Hadoop YARN DistributedShell submission.
- class dpdispatcher.machines.distributed_shell.DistributedShell(*args: Any, **kwargs: Any)[source]#
Bases:
MachineRun archived DPDispatcher jobs in a YARN DistributedShell container.
Methods
arginfo()Build the dargs schema for machine and context configuration.
bind_context(context)Bind the execution context used for files and remote commands.
check_finish_tag(job)Return whether the success marker for a job is present.
check_if_recover(submission)Return whether serialized state exists for a remote submission.
check_status(job)Query the scheduler and return the current status of a job.
default_resources(res)Return backend defaults for an incomplete resource specification.
deserialize(machine_dict)Reconstruct a machine from its serialized dictionary.
do_submit(job)Submit th job to yarn using distributed shell.
gen_command_env_cuda_devices(resources)Assign a GPU to the next task when automatic GPU mapping is enabled.
gen_local_script(job)Generate a local staging script for cloud backends.
gen_script(job)Generate the complete scheduler submission script for a job.
gen_script_command(job)Generate task commands, logging redirection, and completion tags.
gen_script_custom_flags_lines(job)Render user-provided scheduler directives as script lines.
gen_script_end(job)Generate job finalization, failure checks, and append commands.
gen_script_env(job)Generate environment setup shared by every task in a job.
gen_script_header(job)Generate scheduler directives and the script shebang for a job.
gen_script_run_command(job)Return the command that sources the generated per-task script.
gen_script_wait(resources)Generate synchronization commands for the configured parallelism.
get_exit_code(job)Get exit code of the job.
get_job_error(job)Return a text error diagnostic for a job, if available.
kill(job)Kill the job.
load_from_dict(machine_dict[, allow_ref])Load a Machine from a dict.
load_from_json(json_path)Load a machine configuration from a JSON file.
load_from_yaml(yaml_path)Load a machine configuration from a YAML file.
resources_arginfo()Generate the resources arginfo.
resources_subfields()Generate the resources subfields.
serialize([if_empty_remote_profile])Return a normalized dictionary representation of the machine.
sub_script_cmd(res)Return the legacy scheduler launch command for resources.
sub_script_head(res)Return the legacy scheduler header for a resource specification.
- check_status(job: Job) JobStatus[source]#
Query the scheduler and return the current status of a job.
- do_submit(job: Job) int[source]#
Submit th job to yarn using distributed shell.
- Parameters:
- jobJob class instance
job to be submitted
- Returns:
- job_id: string
submit process id
dpdispatcher.machines.dp_cloud_server module#
Implement the legacy Bohrium cloud-service batch backend.
- class dpdispatcher.machines.dp_cloud_server.Bohrium(*args: Any, **kwargs: Any)[source]#
Bases:
MachineSubmit jobs through the legacy Bohrium API and object storage.
Methods
arginfo()Build the dargs schema for machine and context configuration.
bind_context(context)Bind the execution context used for files and remote commands.
check_finish_tag(job)Return whether the success marker for a job is present.
check_if_recover(submission)Return whether serialized state exists for a remote submission.
check_status(job)Query the scheduler and return the current status of a job.
default_resources(res)Return backend defaults for an incomplete resource specification.
deserialize(machine_dict)Reconstruct a machine from its serialized dictionary.
do_submit(job)Submit a single job, assuming that no job is running there.
gen_command_env_cuda_devices(resources)Assign a GPU to the next task when automatic GPU mapping is enabled.
gen_local_script(job)Generate a local staging script for cloud backends.
gen_script(job)Generate a job script with the common machine implementation.
gen_script_command(job)Generate task commands, logging redirection, and completion tags.
gen_script_custom_flags_lines(job)Render user-provided scheduler directives as script lines.
gen_script_end(job)Generate job finalization, failure checks, and append commands.
gen_script_env(job)Generate environment setup shared by every task in a job.
gen_script_header(job)Generate scheduler directives and the script shebang for a job.
gen_script_run_command(job)Return the command that sources the generated per-task script.
gen_script_wait(resources)Generate synchronization commands for the configured parallelism.
get_exit_code(job)Get exit code of the job.
get_job_error(job)Retrieve diagnostics from the cloud result or job log.
kill(job)Kill the job.
load_from_dict(machine_dict[, allow_ref])Load a Machine from a dict.
load_from_json(json_path)Load a machine configuration from a JSON file.
load_from_yaml(yaml_path)Load a machine configuration from a YAML file.
resources_arginfo()Generate the resources arginfo.
resources_subfields()Generate the resources subfields.
serialize([if_empty_remote_profile])Return a normalized dictionary representation of the machine.
sub_script_cmd(res)Return the legacy scheduler launch command for resources.
sub_script_head(res)Return the legacy scheduler header for a resource specification.
map_dp_job_state
- check_if_recover(submission: Submission) bool[source]#
Return whether serialized state exists for a remote submission.
- check_status(job: Job) JobStatus[source]#
Query the scheduler and return the current status of a job.
- gen_local_script(job: Job) str[source]#
Generate a local staging script for cloud backends.
Only cloud machine implementations support this operation; the base declaration keeps their context interface type-safe.
dpdispatcher.machines.fugaku module#
Implement Fujitsu Fugaku-compatible scheduler submission.
- class dpdispatcher.machines.fugaku.Fugaku(*args: Any, **kwargs: Any)[source]#
Bases:
MachineGenerate and submit jobs using Fujitsu’s
pjsubinterface.Methods
arginfo()Build the dargs schema for machine and context configuration.
bind_context(context)Bind the execution context used for files and remote commands.
check_finish_tag(job)Return whether the success marker for a job is present.
check_if_recover(submission)Return whether serialized state exists for a remote submission.
check_status(job)Query the scheduler and return the current status of a job.
default_resources(res)Return backend defaults for an incomplete resource specification.
deserialize(machine_dict)Reconstruct a machine from its serialized dictionary.
do_submit(job)Submit a single job, assuming that no job is running there.
gen_command_env_cuda_devices(resources)Assign a GPU to the next task when automatic GPU mapping is enabled.
gen_local_script(job)Generate a local staging script for cloud backends.
gen_script(job)Generate the complete scheduler submission script for a job.
gen_script_command(job)Generate task commands, logging redirection, and completion tags.
gen_script_custom_flags_lines(job)Render user-provided scheduler directives as script lines.
gen_script_end(job)Generate job finalization, failure checks, and append commands.
gen_script_env(job)Generate environment setup shared by every task in a job.
gen_script_header(job)Generate scheduler directives and the script shebang for a job.
gen_script_run_command(job)Return the command that sources the generated per-task script.
gen_script_wait(resources)Generate synchronization commands for the configured parallelism.
get_exit_code(job)Get exit code of the job.
get_job_error(job)Return a text error diagnostic for a job, if available.
kill(job)Kill the job.
load_from_dict(machine_dict[, allow_ref])Load a Machine from a dict.
load_from_json(json_path)Load a machine configuration from a JSON file.
load_from_yaml(yaml_path)Load a machine configuration from a YAML file.
resources_arginfo()Generate the resources arginfo.
resources_subfields()Generate the resources subfields.
serialize([if_empty_remote_profile])Return a normalized dictionary representation of the machine.
sub_script_cmd(res)Return the legacy scheduler launch command for resources.
sub_script_head(res)Return the legacy scheduler header for a resource specification.
dpdispatcher.machines.lsf module#
Implement IBM Spectrum LSF scheduler submission.
- class dpdispatcher.machines.lsf.LSF(*args: Any, **kwargs: Any)[source]#
Bases:
MachineLSF batch.
Methods
arginfo()Build the dargs schema for machine and context configuration.
bind_context(context)Bind the execution context used for files and remote commands.
check_finish_tag(job)Return whether the success marker for a job is present.
check_if_recover(submission)Return whether serialized state exists for a remote submission.
default_resources(res)Return backend defaults for an incomplete resource specification.
deserialize(machine_dict)Reconstruct a machine from its serialized dictionary.
gen_command_env_cuda_devices(resources)Assign a GPU to the next task when automatic GPU mapping is enabled.
gen_local_script(job)Generate a local staging script for cloud backends.
gen_script(job)Generate the complete scheduler submission script for a job.
gen_script_command(job)Generate task commands, logging redirection, and completion tags.
gen_script_custom_flags_lines(job)Render user-provided scheduler directives as script lines.
gen_script_end(job)Generate job finalization, failure checks, and append commands.
gen_script_env(job)Generate environment setup shared by every task in a job.
gen_script_header(job)Generate scheduler directives and the script shebang for a job.
gen_script_run_command(job)Return the command that sources the generated per-task script.
gen_script_wait(resources)Generate synchronization commands for the configured parallelism.
get_exit_code(job)Get exit code of the job.
get_job_error(job)Return a text error diagnostic for a job, if available.
kill(job)Kill the job.
load_from_dict(machine_dict[, allow_ref])Load a Machine from a dict.
load_from_json(json_path)Load a machine configuration from a JSON file.
load_from_yaml(yaml_path)Load a machine configuration from a YAML file.
resources_arginfo()Generate the resources arginfo.
Generate the resources subfields.
serialize([if_empty_remote_profile])Return a normalized dictionary representation of the machine.
sub_script_cmd(res)Return the legacy scheduler launch command for resources.
sub_script_head(res)Return the legacy scheduler header for a resource specification.
check_status
do_submit
- gen_script_header(job: Job) str[source]#
Generate scheduler directives and the script shebang for a job.
- classmethod resources_subfields() list[Argument][source]#
Generate the resources subfields.
- Returns:
- list[Argument]
resources subfields
dpdispatcher.machines.openapi module#
Implement the SDK-based Bohrium OpenAPI batch backend.
- class dpdispatcher.machines.openapi.OpenAPI(*args: Any, **kwargs: Any)[source]#
Bases:
MachineSubmit and monitor jobs through the Bohrium SDK OpenAPI.
Methods
arginfo()Build the dargs schema for machine and context configuration.
bind_context(context)Bind the execution context used for files and remote commands.
check_finish_tag(job)Return whether the success marker for a job is present.
check_if_recover(submission)Return whether serialized state exists for a remote submission.
check_status(job)Query the scheduler and return the current status of a job.
default_resources(res)Return backend defaults for an incomplete resource specification.
deserialize(machine_dict)Reconstruct a machine from its serialized dictionary.
do_submit(job)Submit a single job, assuming that no job is running there.
gen_command_env_cuda_devices(resources)Assign a GPU to the next task when automatic GPU mapping is enabled.
gen_local_script(job)Generate a local staging script for cloud backends.
gen_script(job)Generate the complete scheduler submission script for a job.
gen_script_command(job)Generate task commands, logging redirection, and completion tags.
gen_script_custom_flags_lines(job)Render user-provided scheduler directives as script lines.
gen_script_end(job)Generate job finalization, failure checks, and append commands.
gen_script_env(job)Generate environment setup shared by every task in a job.
gen_script_header(job)Generate scheduler directives and the script shebang for a job.
gen_script_run_command(job)Return the command that sources the generated per-task script.
gen_script_wait(resources)Generate synchronization commands for the configured parallelism.
get_exit_code(job)Get exit code of the job.
get_job_error(job)Retrieve diagnostics from the cloud result or job log.
kill(job)Kill the job.
load_from_dict(machine_dict[, allow_ref])Load a Machine from a dict.
load_from_json(json_path)Load a machine configuration from a JSON file.
load_from_yaml(yaml_path)Load a machine configuration from a YAML file.
resources_arginfo()Generate the resources arginfo.
resources_subfields()Generate the resources subfields.
serialize([if_empty_remote_profile])Return a normalized dictionary representation of the machine.
sub_script_cmd(res)Return the legacy scheduler launch command for resources.
sub_script_head(res)Return the legacy scheduler header for a resource specification.
map_dp_job_state
- check_finish_tag(job: SubmissionJob) bool[source]#
Return whether the success marker for a job is present.
- check_if_recover(submission: Submission) bool[source]#
Return whether serialized state exists for a remote submission.
- check_status(job: SubmissionJob) JobStatus[source]#
Query the scheduler and return the current status of a job.
- do_submit(job: SubmissionJob) int[source]#
Submit a single job, assuming that no job is running there.
- gen_local_script(job: SubmissionJob) str[source]#
Generate a local staging script for cloud backends.
Only cloud machine implementations support this operation; the base declaration keeps their context interface type-safe.
- gen_script(job: SubmissionJob) str[source]#
Generate the complete scheduler submission script for a job.
- gen_script_header(job: SubmissionJob) str[source]#
Generate scheduler directives and the script shebang for a job.
- get_exit_code(job: SubmissionJob) int[source]#
Get exit code of the job.
- Parameters:
- jobJob
job
- Returns:
- int
exit code
dpdispatcher.machines.pbs module#
Implement PBS-family schedulers, including Torque and SGE variants.
- class dpdispatcher.machines.pbs.PBS(*args: Any, **kwargs: Any)[source]#
Bases:
MachineSubmit and monitor jobs through OpenPBS or PBS Professional.
Methods
arginfo()Build the dargs schema for machine and context configuration.
bind_context(context)Bind the execution context used for files and remote commands.
check_finish_tag(job)Return whether the success marker for a job is present.
check_if_recover(submission)Return whether serialized state exists for a remote submission.
check_status(job)Query the scheduler and return the current status of a job.
default_resources(res)Return backend defaults for an incomplete resource specification.
deserialize(machine_dict)Reconstruct a machine from its serialized dictionary.
do_submit(job)Submit a single job, assuming that no job is running there.
gen_command_env_cuda_devices(resources)Assign a GPU to the next task when automatic GPU mapping is enabled.
gen_local_script(job)Generate a local staging script for cloud backends.
gen_script(job)Generate the complete scheduler submission script for a job.
gen_script_command(job)Generate task commands, logging redirection, and completion tags.
gen_script_custom_flags_lines(job)Render user-provided scheduler directives as script lines.
gen_script_end(job)Generate job finalization, failure checks, and append commands.
gen_script_env(job)Generate environment setup shared by every task in a job.
gen_script_header(job)Generate scheduler directives and the script shebang for a job.
gen_script_run_command(job)Return the command that sources the generated per-task script.
gen_script_wait(resources)Generate synchronization commands for the configured parallelism.
get_exit_code(job)Get exit code of the job.
get_job_error(job)Return a text error diagnostic for a job, if available.
kill(job)Kill the job.
load_from_dict(machine_dict[, allow_ref])Load a Machine from a dict.
load_from_json(json_path)Load a machine configuration from a JSON file.
load_from_yaml(yaml_path)Load a machine configuration from a YAML file.
resources_arginfo()Generate the resources arginfo.
resources_subfields()Generate the resources subfields.
serialize([if_empty_remote_profile])Return a normalized dictionary representation of the machine.
sub_script_cmd(res)Return the legacy scheduler launch command for resources.
sub_script_head(res)Return the legacy scheduler header for a resource specification.
- check_status(job: Job) JobStatus[source]#
Query the scheduler and return the current status of a job.
- class dpdispatcher.machines.pbs.SGE(*args: Any, **kwargs: Any)[source]#
Bases:
PBSAdapt PBS-style scripts and commands for Sun Grid Engine.
Methods
arginfo()Build the dargs schema for machine and context configuration.
bind_context(context)Bind the execution context used for files and remote commands.
check_finish_tag(job)Return whether the success marker for a job is present.
check_if_recover(submission)Return whether serialized state exists for a remote submission.
check_status(job)Query the scheduler and return the current status of a job.
default_resources(res)Return backend defaults for an incomplete resource specification.
deserialize(machine_dict)Reconstruct a machine from its serialized dictionary.
do_submit(job)Submit a single job, assuming that no job is running there.
gen_command_env_cuda_devices(resources)Assign a GPU to the next task when automatic GPU mapping is enabled.
gen_local_script(job)Generate a local staging script for cloud backends.
gen_script(job)Generate the complete scheduler submission script for a job.
gen_script_command(job)Generate task commands, logging redirection, and completion tags.
gen_script_custom_flags_lines(job)Render user-provided scheduler directives as script lines.
gen_script_end(job)Generate job finalization, failure checks, and append commands.
gen_script_env(job)Generate environment setup shared by every task in a job.
gen_script_header(job)Generate scheduler directives and the script shebang for a job.
gen_script_run_command(job)Return the command that sources the generated per-task script.
gen_script_wait(resources)Generate synchronization commands for the configured parallelism.
get_exit_code(job)Get exit code of the job.
get_job_error(job)Return a text error diagnostic for a job, if available.
kill(job)Kill the job.
load_from_dict(machine_dict[, allow_ref])Load a Machine from a dict.
load_from_json(json_path)Load a machine configuration from a JSON file.
load_from_yaml(yaml_path)Load a machine configuration from a YAML file.
resources_arginfo()Generate the resources arginfo.
Generate the resources subfields.
serialize([if_empty_remote_profile])Return a normalized dictionary representation of the machine.
sub_script_cmd(res)Return the legacy scheduler launch command for resources.
sub_script_head(res)Return the legacy scheduler header for a resource specification.
- check_status(job: Job) JobStatus[source]#
Query the scheduler and return the current status of a job.
- class dpdispatcher.machines.pbs.Torque(*args: Any, **kwargs: Any)[source]#
Bases:
PBSAdapt PBS submission and status parsing for the Torque scheduler.
Methods
arginfo()Build the dargs schema for machine and context configuration.
bind_context(context)Bind the execution context used for files and remote commands.
check_finish_tag(job)Return whether the success marker for a job is present.
check_if_recover(submission)Return whether serialized state exists for a remote submission.
check_status(job)Query the scheduler and return the current status of a job.
default_resources(res)Return backend defaults for an incomplete resource specification.
deserialize(machine_dict)Reconstruct a machine from its serialized dictionary.
do_submit(job)Submit a single job, assuming that no job is running there.
gen_command_env_cuda_devices(resources)Assign a GPU to the next task when automatic GPU mapping is enabled.
gen_local_script(job)Generate a local staging script for cloud backends.
gen_script(job)Generate the complete scheduler submission script for a job.
gen_script_command(job)Generate task commands, logging redirection, and completion tags.
gen_script_custom_flags_lines(job)Render user-provided scheduler directives as script lines.
gen_script_end(job)Generate job finalization, failure checks, and append commands.
gen_script_env(job)Generate environment setup shared by every task in a job.
gen_script_header(job)Generate scheduler directives and the script shebang for a job.
gen_script_run_command(job)Return the command that sources the generated per-task script.
gen_script_wait(resources)Generate synchronization commands for the configured parallelism.
get_exit_code(job)Get exit code of the job.
get_job_error(job)Return a text error diagnostic for a job, if available.
kill(job)Kill the job.
load_from_dict(machine_dict[, allow_ref])Load a Machine from a dict.
load_from_json(json_path)Load a machine configuration from a JSON file.
load_from_yaml(yaml_path)Load a machine configuration from a YAML file.
resources_arginfo()Generate the resources arginfo.
resources_subfields()Generate the resources subfields.
serialize([if_empty_remote_profile])Return a normalized dictionary representation of the machine.
sub_script_cmd(res)Return the legacy scheduler launch command for resources.
sub_script_head(res)Return the legacy scheduler header for a resource specification.
dpdispatcher.machines.shell module#
Implement local or remote background execution through a shell.
- class dpdispatcher.machines.shell.Shell(*args: Any, **kwargs: Any)[source]#
Bases:
MachineRun generated job scripts as background shell processes.
Methods
arginfo()Build the dargs schema for machine and context configuration.
bind_context(context)Bind the execution context used for files and remote commands.
check_finish_tag(job)Return whether the success marker for a job is present.
check_if_recover(submission)Return whether serialized state exists for a remote submission.
check_status(job)Query the scheduler and return the current status of a job.
default_resources(res)Return backend defaults for an incomplete resource specification.
deserialize(machine_dict)Reconstruct a machine from its serialized dictionary.
do_submit(job)Submit a single job, assuming that no job is running there.
gen_command_env_cuda_devices(resources)Assign a GPU to the next task when automatic GPU mapping is enabled.
gen_local_script(job)Generate a local staging script for cloud backends.
gen_script(job)Generate the complete scheduler submission script for a job.
gen_script_command(job)Generate task commands, logging redirection, and completion tags.
gen_script_custom_flags_lines(job)Render user-provided scheduler directives as script lines.
gen_script_end(job)Generate job finalization, failure checks, and append commands.
gen_script_env(job)Generate environment setup shared by every task in a job.
gen_script_header(job)Generate scheduler directives and the script shebang for a job.
gen_script_run_command(job)Return the command that sources the generated per-task script.
gen_script_wait(resources)Generate synchronization commands for the configured parallelism.
get_exit_code(job)Get exit code of the job.
get_job_error(job)Return a text error diagnostic for a job, if available.
kill(job)Kill the job.
load_from_dict(machine_dict[, allow_ref])Load a Machine from a dict.
load_from_json(json_path)Load a machine configuration from a JSON file.
load_from_yaml(yaml_path)Load a machine configuration from a YAML file.
resources_arginfo()Generate the resources arginfo.
resources_subfields()Generate the resources subfields.
serialize([if_empty_remote_profile])Return a normalized dictionary representation of the machine.
sub_script_cmd(res)Return the legacy scheduler launch command for resources.
sub_script_head(res)Return the legacy scheduler header for a resource specification.
- check_status(job: Job) JobStatus[source]#
Query the scheduler and return the current status of a job.
dpdispatcher.machines.slurm module#
Implement Slurm scheduler submission and Slurm job arrays.
- class dpdispatcher.machines.slurm.Slurm(*args: Any, **kwargs: Any)[source]#
Bases:
MachineSubmit and monitor jobs through Slurm command-line tools.
Methods
arginfo()Build the dargs schema for machine and context configuration.
bind_context(context)Bind the execution context used for files and remote commands.
check_finish_tag(job)Return whether the success marker for a job is present.
check_if_recover(submission)Return whether serialized state exists for a remote submission.
default_resources(res)Return backend defaults for an incomplete resource specification.
deserialize(machine_dict)Reconstruct a machine from its serialized dictionary.
gen_command_env_cuda_devices(resources)Assign a GPU to the next task when automatic GPU mapping is enabled.
gen_local_script(job)Generate a local staging script for cloud backends.
gen_script(job)Generate the complete scheduler submission script for a job.
gen_script_command(job)Generate task commands, logging redirection, and completion tags.
gen_script_custom_flags_lines(job)Render user-provided scheduler directives as script lines.
gen_script_end(job)Generate job finalization, failure checks, and append commands.
gen_script_env(job)Generate environment setup shared by every task in a job.
gen_script_header(job)Generate scheduler directives and the script shebang for a job.
gen_script_run_command(job)Return the command that sources the generated per-task script.
gen_script_wait(resources)Generate synchronization commands for the configured parallelism.
get_exit_code(job)Get exit code of the job.
get_job_error(job)Return a text error diagnostic for a job, if available.
kill(job)Kill the job.
load_from_dict(machine_dict[, allow_ref])Load a Machine from a dict.
load_from_json(json_path)Load a machine configuration from a JSON file.
load_from_yaml(yaml_path)Load a machine configuration from a YAML file.
resources_arginfo()Generate the resources arginfo.
Generate the resources subfields.
serialize([if_empty_remote_profile])Return a normalized dictionary representation of the machine.
sub_script_cmd(res)Return the legacy scheduler launch command for resources.
sub_script_head(res)Return the legacy scheduler header for a resource specification.
check_status
do_submit
- class dpdispatcher.machines.slurm.SlurmJobArray(*args: Any, **kwargs: Any)[source]#
Bases:
SlurmSlurm with job array enabled for multiple tasks in a job.
Methods
arginfo()Build the dargs schema for machine and context configuration.
bind_context(context)Bind the execution context used for files and remote commands.
check_finish_tag(job)Return whether the success marker for a job is present.
check_if_recover(submission)Return whether serialized state exists for a remote submission.
default_resources(res)Return backend defaults for an incomplete resource specification.
deserialize(machine_dict)Reconstruct a machine from its serialized dictionary.
gen_command_env_cuda_devices(resources)Assign a GPU to the next task when automatic GPU mapping is enabled.
gen_local_script(job)Generate a local staging script for cloud backends.
gen_script(job)Generate the complete scheduler submission script for a job.
gen_script_command(job)Generate a Slurm array command without mutating job resources.
gen_script_custom_flags_lines(job)Render user-provided scheduler directives as script lines.
gen_script_end(job)Generate job finalization, failure checks, and append commands.
gen_script_env(job)Generate environment setup shared by every task in a job.
gen_script_header(job)Generate scheduler directives and the script shebang for a job.
gen_script_run_command(job)Return the command that sources the generated per-task script.
gen_script_wait(resources)Generate synchronization commands for the configured parallelism.
get_exit_code(job)Get exit code of the job.
get_job_error(job)Return a text error diagnostic for a job, if available.
kill(job)Kill the job.
load_from_dict(machine_dict[, allow_ref])Load a Machine from a dict.
load_from_json(json_path)Load a machine configuration from a JSON file.
load_from_yaml(yaml_path)Load a machine configuration from a YAML file.
resources_arginfo()Generate the resources arginfo.
Generate the resources subfields.
serialize([if_empty_remote_profile])Return a normalized dictionary representation of the machine.
sub_script_cmd(res)Return the legacy scheduler launch command for resources.
sub_script_head(res)Return the legacy scheduler header for a resource specification.
check_status
do_submit
- gen_script_command(job: Job) str[source]#
Generate a Slurm array command without mutating job resources.
- gen_script_end(job: Job) str[source]#
Generate job finalization, failure checks, and append commands.