kedro.framework.hooks.specs.PipelineSpecs¶
- class kedro.framework.hooks.specs.PipelineSpecs[source]¶
Namespace that defines all specifications for a pipeline’s lifecycle hooks.
Methods
after_pipeline_run
(run_params, run_result, ...)Hook to be invoked after a pipeline runs.
before_pipeline_run
(run_params, pipeline, ...)Hook to be invoked before a pipeline runs.
on_pipeline_error
(error, run_params, ...)Hook to be invoked if a pipeline run throws an uncaught Exception.
- after_pipeline_run(run_params, run_result, pipeline, catalog)[source]¶
Hook to be invoked after a pipeline runs.
- Parameters:
The params used to run the pipeline. Should have the following schema:
{ "session_id": str "project_path": str, "env": str, "kedro_version": str, "tags": Optional[List[str]], "from_nodes": Optional[List[str]], "to_nodes": Optional[List[str]], "node_names": Optional[List[str]], "from_inputs": Optional[List[str]], "to_outputs": Optional[List[str]], "load_versions": Optional[List[str]], "extra_params": Optional[Dict[str, Any]] "pipeline_name": str, "namespace": Optional[str], "runner": str, }
pipeline (
Pipeline
) – ThePipeline
that was run.catalog (
CatalogProtocol
) – An implemented instance ofCatalogProtocol
used during the run.
- Return type:
- before_pipeline_run(run_params, pipeline, catalog)[source]¶
Hook to be invoked before a pipeline runs.
- Parameters:
The params used to run the pipeline. Should have the following schema:
{ "session_id": str "project_path": str, "env": str, "kedro_version": str, "tags": Optional[List[str]], "from_nodes": Optional[List[str]], "to_nodes": Optional[List[str]], "node_names": Optional[List[str]], "from_inputs": Optional[List[str]], "to_outputs": Optional[List[str]], "load_versions": Optional[List[str]], "extra_params": Optional[Dict[str, Any]] "pipeline_name": str, "namespace": Optional[str], "runner": str, }
pipeline (
Pipeline
) – ThePipeline
that will be run.catalog (
CatalogProtocol
) – An implemented instance ofCatalogProtocol
to be used during the run.
- Return type:
- on_pipeline_error(error, run_params, pipeline, catalog)[source]¶
Hook to be invoked if a pipeline run throws an uncaught Exception. The signature of this error hook should match the signature of
before_pipeline_run
along with the error that was raised.- Parameters:
error (
Exception
) – The uncaught exception thrown during the pipeline run.The params used to run the pipeline. Should have the following schema:
{ "session_id": str "project_path": str, "env": str, "kedro_version": str, "tags": Optional[List[str]], "from_nodes": Optional[List[str]], "to_nodes": Optional[List[str]], "node_names": Optional[List[str]], "from_inputs": Optional[List[str]], "to_outputs": Optional[List[str]], "load_versions": Optional[List[str]], "extra_params": Optional[Dict[str, Any]] "pipeline_name": str, "namespace": Optional[str], "runner": str, }
pipeline (
Pipeline
) – ThePipeline
that will was run.catalog (
CatalogProtocol
) – An implemented instance ofCatalogProtocol
used during the run.
- Return type: