client.node

A node represents an individual task within a DAG.

Attributes

logger

Classes

Node

A node represents an individual task within a Dag.

Module Contents

client.node.logger
class client.node.Node(task_template_version: jobmon.client.task_template_version.TaskTemplateVersion, node_args: Dict[str, Any], requester: jobmon.core.requester.Requester | None = None)

A node represents an individual task within a Dag.

A node represents an individual task within a Dag.

This includes its relationship to other nodes that it is dependent upon or nodes that depend upon it. A node stores node arguments (arguments relating to the actual shape of the dag and number of tasks created for a given stage/task template) and can register itself with the database via the Jobmon Query Service and the Jobmon State Manager.

Parameters:
  • task_template_version – The associated TaskTemplateVersion.

  • node_args – key-value pairs of arg_name and a value.

  • requester – Requester object to communicate with the FastApi services.

task_template_version
node_args
mapped_node_args
node_args_hash = 0
upstream_nodes: Set[Node]
downstream_nodes: Set[Node]
requester = None
property node_id: int

Unique id for each node.

property task_template_version_id: int
property default_name: str

The default name of this node in the array.

add_upstream_node(upstream_node: Node) None

Add a single node to this one’s upstream Nodes.

Parameters:

upstream_node – node to add a dependency on

add_upstream_nodes(upstream_nodes: List[Node]) None

Add many nodes to this one’s upstream Nodes.

Parameters:

upstream_nodes – list of nodes to add dependencies on

add_downstream_node(downstream_node: Node) None

Add a node to this one’s downstream Nodes.

Parameters:

downstream_node – Node that will be dependent on this node

add_downstream_nodes(downstream_nodes: List[Node]) None

Add a list of nodes as this node’s downstream nodes.

Parameters:

downstream_nodes – Nodes that will be dependent on this node.