sequential.seq_distributor

Sequential distributor that runs one task at a time.

Attributes

logger

Classes

LimitedSizeDict

Dictionary for exit info.

SequentialDistributor

Executor to run tasks one at a time.

SequentialWorkerNode

Get Executor Info for a Task Instance.

Module Contents

sequential.seq_distributor.logger
class sequential.seq_distributor.LimitedSizeDict(*args: int, **kwds: int)

Bases: collections.OrderedDict

Dictionary for exit info.

Initialization of LimitedSizeDict.

size_limit
class sequential.seq_distributor.SequentialDistributor(cluster_name: str, exit_info_queue_size: int = 1000, *args: tuple, **kwargs: dict)

Bases: jobmon.core.cluster_protocol.ClusterDistributor

Executor to run tasks one at a time.

Initialization of the sequential distributor.

Parameters:
  • cluster_name (str) – name of the cluster

  • exit_info_queue_size (int) – how many exit codes to retain

started = False
property worker_node_entry_point: str

Path to jobmon worker_node_entry_point.

property cluster_name: str

Return the name of the cluster type.

start() None

Start the distributor.

stop() None

Stop the distributor.

get_queueing_errors(distributor_ids: List[str]) Dict[str, str]

Get the task instances that have errored out.

Sequential runs synchronously so queueing errors aren’t possible.

get_remote_exit_info(distributor_id: str) jobmon.core.exit_info.RemoteExitInfo

Get exit info from task instances that have run.

get_submitted_or_running(distributor_ids: List[str] | None = None) Set[str]

Check status of running task.

Sequential tasks complete before submit_to_batch_distributor returns, so nothing is ever submitted or running at heartbeat time.

terminate_task_instances(distributor_ids: List[str]) None

Terminate task instances.

If implemented, return a list of (task_instance_id, hostname) tuples for any task_instances that are terminated.

submit_to_batch_distributor(command: str, name: str, requested_resources: Dict[str, Any]) str

Execute sequentially.

class sequential.seq_distributor.SequentialWorkerNode

Bases: jobmon.core.cluster_protocol.ClusterWorkerNode

Get Executor Info for a Task Instance.

Initialization of the sequential executor worker node.

property distributor_id: str | None

Distributor id of the task.

initialize_logfile(log_type: str, log_dir: str, name: str) str

Error and exit code info from the executor.

static get_exit_info(exit_code: int, error_msg: str) Tuple[str, str]

Exit info, error message.

get_usage_stats() Dict

Usage information specific to the executor.