sequential.seq_distributor ========================== .. py:module:: sequential.seq_distributor .. autoapi-nested-parse:: Sequential distributor that runs one task at a time. Attributes ---------- .. autoapisummary:: sequential.seq_distributor.logger Classes ------- .. autoapisummary:: sequential.seq_distributor.LimitedSizeDict sequential.seq_distributor.SequentialDistributor sequential.seq_distributor.SequentialWorkerNode Module Contents --------------- .. py:data:: logger .. py:class:: LimitedSizeDict(*args: int, **kwds: int) Bases: :py:obj:`collections.OrderedDict` Dictionary for exit info. Initialization of LimitedSizeDict. .. py:attribute:: size_limit .. py:class:: SequentialDistributor(cluster_name: str, exit_info_queue_size: int = 1000, *args: tuple, **kwargs: dict) Bases: :py:obj:`jobmon.core.cluster_protocol.ClusterDistributor` Executor to run tasks one at a time. Initialization of the sequential distributor. :param cluster_name: name of the cluster :type cluster_name: str :param exit_info_queue_size: how many exit codes to retain :type exit_info_queue_size: int .. py:attribute:: started :value: False .. py:property:: worker_node_entry_point :type: str Path to jobmon worker_node_entry_point. .. py:property:: cluster_name :type: str Return the name of the cluster type. .. py:method:: start() -> None Start the distributor. .. py:method:: stop() -> None Stop the distributor. .. py:method:: 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. .. py:method:: get_remote_exit_info(distributor_id: str) -> jobmon.core.exit_info.RemoteExitInfo Get exit info from task instances that have run. .. py:method:: get_submitted_or_running(distributor_ids: Optional[List[str]] = 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. .. py:method:: 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. .. py:method:: submit_to_batch_distributor(command: str, name: str, requested_resources: Dict[str, Any]) -> str Execute sequentially. .. py:class:: SequentialWorkerNode Bases: :py:obj:`jobmon.core.cluster_protocol.ClusterWorkerNode` Get Executor Info for a Task Instance. Initialization of the sequential executor worker node. .. py:property:: distributor_id :type: Optional[str] Distributor id of the task. .. py:method:: initialize_logfile(log_type: str, log_dir: str, name: str) -> str Error and exit code info from the executor. .. py:method:: get_exit_info(exit_code: int, error_msg: str) -> Tuple[str, str] :staticmethod: Exit info, error message. .. py:method:: get_usage_stats() -> Dict Usage information specific to the executor.