client.node =========== .. py:module:: client.node .. autoapi-nested-parse:: A node represents an individual task within a DAG. Attributes ---------- .. autoapisummary:: client.node.logger Classes ------- .. autoapisummary:: client.node.Node Module Contents --------------- .. py:data:: logger .. py:class:: Node(task_template_version: jobmon.client.task_template_version.TaskTemplateVersion, node_args: Dict[str, Any], requester: Optional[jobmon.core.requester.Requester] = None) A node represents an individual task within a Dag. .. py:attribute:: _node_id :type: Optional[int] :value: None .. py:attribute:: task_template_version .. py:attribute:: node_args .. py:attribute:: mapped_node_args .. py:attribute:: node_args_hash :value: 0 .. py:attribute:: upstream_nodes :type: Set[Node] .. py:attribute:: downstream_nodes :type: Set[Node] .. py:attribute:: requester :value: None .. py:property:: node_id :type: int Unique id for each node. .. py:property:: task_template_version_id :type: int .. py:property:: default_name :type: str The default name of this node in the array. .. py:method:: _hash_node_args() -> int A hash of the node. The hash is the encoded result of the args and values concatenated together. .. py:method:: add_upstream_node(upstream_node: Node) -> None Add a single node to this one's upstream Nodes. :param upstream_node: node to add a dependency on .. py:method:: add_upstream_nodes(upstream_nodes: List[Node]) -> None Add many nodes to this one's upstream Nodes. :param upstream_nodes: list of nodes to add dependencies on .. py:method:: add_downstream_node(downstream_node: Node) -> None Add a node to this one's downstream Nodes. :param downstream_node: Node that will be dependent on this node .. py:method:: add_downstream_nodes(downstream_nodes: List[Node]) -> None Add a list of nodes as this node's downstream nodes. :param downstream_nodes: Nodes that will be dependent on this node. .. py:method:: __repr__() -> str Repr the node attributes. .. py:method:: __eq__(other: object) -> bool Check if two nodes have equal hashes. .. py:method:: __lt__(other: Node) -> bool Check if this hash is less than anothers. .. py:method:: __hash__() -> int Create a hash that will be a unique identifier for the node.