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. .. py:attribute:: size_limit .. py:method:: __setitem__(key: Any, value: Any) -> None Set item in dict. .. py:method:: _check_size_limit() -> None .. 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. .. py:attribute:: started :value: False .. py:attribute:: _cluster_name .. py:attribute:: _worker_node_entry_point :value: 'worker_node_entry_point' .. py:attribute:: _next_distributor_id :value: 1 .. py:attribute:: _exit_info .. 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] :abstractmethod: Get the task instances that have errored out. .. py:method:: get_array_queueing_errors(distributor_id: Union[int, str]) -> Dict[Union[int, str], str] :abstractmethod: .. py:method:: get_remote_exit_info(distributor_id: str) -> Tuple[str, str] 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. .. 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. .. py:attribute:: _distributor_id :type: Optional[str] :value: None .. py:attribute:: _logfile_template .. 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 :staticmethod: Usage information specific to the exector.