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[source]
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)[source]

A node represents an individual task within a Dag.

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

Unique id for each node.

property task_template_version_id: int[source]
property default_name: str[source]

The default name of this node in the array.

_hash_node_args() int[source]

A hash of the node.

The hash is the encoded result of the args and values concatenated together.

add_upstream_node(upstream_node: Node) None[source]

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[source]

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[source]

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[source]

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

Parameters:

downstream_nodes – Nodes that will be dependent on this node.

__repr__() str[source]

Repr the node attributes.

__eq__(other: object) bool[source]

Check if two nodes have equal hashes.

__lt__(other: Node) bool[source]

Check if this hash is less than anothers.

__hash__() int[source]

Create a hash that will be a unique identifier for the node.