lifecycle.api.NodeExecutionMethodΒΆ
- class hamilton.lifecycle.api.NodeExecutionMethodΒΆ
API for executing a node. This takes in tags, callable, node name, and kwargs, and is responsible for executing the node and returning the result. Note this is not (currently) able to be layered together, although we may add that soon.
- final do_node_execute(*, run_id: str, node_: Node, kwargs: Dict[str, Any], task_id: str | None = None) Any ΒΆ
Method that is called to implement node execution. This can replace the execution of a node with something all together, augment it, or delegate it.
- Parameters:
run_id β ID of the run, unique in scope of the driver.
node β Node that is being executed
kwargs β Keyword arguments that are being passed into the node
task_id β ID of the task, defaults to None if not in a task setting
- abstract run_to_execute_node(*, node_name: str, node_tags: Dict[str, Any], node_callable: Any, node_kwargs: Dict[str, Any], task_id: str | None, **future_kwargs: Any) Any ΒΆ
This method is responsible for executing the node and returning the result.
- Parameters:
node_name β Name of the node.
node_tags β Tags of the node.
node_callable β Callable of the node.
node_kwargs β Keyword arguments to pass to the node.
task_id β The ID of the task, none if not in a task-based environment
future_kwargs β Additional keyword arguments β this is kept for backwards compatibility
- Returns:
The result of the node execution β up to you to return this.