class documentation
class NodeSpecs: (source)
Namespace that defines all specifications for a node's lifecycle hooks.
Method | after |
Hook to be invoked after a node runs. The arguments received are the same as those used by kedro.runner.run_node as well as the outputs of the node run. |
Method | before |
Hook to be invoked before a node runs. The arguments received are the same as those used by kedro.runner.run_node |
Method | on |
Hook to be invoked if a node run throws an uncaught error. The signature of this error hook should match the signature of before_node_run along with the error that was raised. |
@hook_spec
def after_node_run(self, node:
def after_node_run(self, node:
Node
, catalog: DataCatalog
, inputs: Dict[ str, Any]
, outputs: Dict[ str, Any]
, is_async: bool
, session_id: str
):
(source)
¶
Hook to be invoked after a node runs. The arguments received are the same as those used by kedro.runner.run_node as well as the outputs of the node run.
Parameters | |
node:Node | The Node that ran. |
catalog:DataCatalog | A DataCatalog containing the node's inputs and outputs. |
inputs:Dict[ | The dictionary of inputs dataset. The keys are dataset names and the values are the actual loaded input data, not the dataset instance. |
outputs:Dict[ | The dictionary of outputs dataset. The keys are dataset names and the values are the actual computed output data, not the dataset instance. |
isbool | Whether the node was run in async mode. |
sessionstr | The id of the session. |
@hook_spec
def before_node_run(self, node:
def before_node_run(self, node:
Node
, catalog: DataCatalog
, inputs: Dict[ str, Any]
, is_async: bool
, session_id: str
) -> Optional[ Dict[ str, Any]]
:
(source)
¶
Hook to be invoked before a node runs. The arguments received are the same as those used by kedro.runner.run_node
Parameters | |
node:Node | The Node to run. |
catalog:DataCatalog | A DataCatalog containing the node's inputs and outputs. |
inputs:Dict[ | The dictionary of inputs dataset. The keys are dataset names and the values are the actual loaded input data, not the dataset instance. |
isbool | Whether the node was run in async mode. |
sessionstr | The id of the session. |
Returns | |
Optional[ |
|
@hook_spec
def on_node_error(self, error:
def on_node_error(self, error:
Exception
, node: Node
, catalog: DataCatalog
, inputs: Dict[ str, Any]
, is_async: bool
, session_id: str
):
(source)
¶
Hook to be invoked if a node run throws an uncaught error. The signature of this error hook should match the signature of before_node_run along with the error that was raised.
Parameters | |
error:Exception | The uncaught exception thrown during the node run. |
node:Node | The Node to run. |
catalog:DataCatalog | A DataCatalog containing the node's inputs and outputs. |
inputs:Dict[ | The dictionary of inputs dataset. The keys are dataset names and the values are the actual loaded input data, not the dataset instance. |
isbool | Whether the node was run in async mode. |
sessionstr | The id of the session. |