Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for kedro run lifecycle #3482

Merged
merged 15 commits into from
Jan 15, 2024
Merged
3 changes: 2 additions & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
* Added logging about not using async mode in `SequentiallRunner` and `ParallelRunner`.

## Documentation changes
* Added documentations about `bootstrap_project` and `configure_project`.
* Added documentation about `bootstrap_project` and `configure_project`.
* Added documentation about `kedro run` and hook execution order.

## Community contributions

Expand Down
16 changes: 9 additions & 7 deletions docs/source/hooks/introduction.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Hooks
# Introduction to Hooks

## Concepts

Expand All @@ -8,18 +8,18 @@

Kedro defines Hook specifications for particular execution points where users can inject additional behaviour. Currently, the following Hook specifications are provided in [kedro.framework.hooks](/kedro.framework.hooks):

* `after_context_created`
* `after_catalog_created`
* `before_node_run`
* `after_node_run`
* `on_node_error`
* `before_pipeline_run`
* `after_pipeline_run`
* `on_pipeline_error`
* `before_dataset_loaded`
* `after_dataset_loaded`
* `before_node_run`
* `after_node_run`
* `before_dataset_saved`
* `after_dataset_saved`
* `after_context_created`
* `after_pipeline_run`
* `on_node_error`
* `on_pipeline_error`

The naming convention for non-error Hooks is `<before/after>_<noun>_<past_participle>`, in which:

Expand All @@ -32,6 +32,8 @@

[kedro.framework.hooks](/kedro.framework.hooks) lists the full specifications for which you can inject additional behaviours by providing an implementation.

This diagram illustrates the execution order of hooks during `kedro run`:
![kedro run hook execution order](../meta/images/kedro_run_lifecycle.png)

Check warning on line 36 in docs/source/hooks/introduction.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/source/hooks/introduction.md#L36

[Kedro.Spellings] Did you really mean 'kedro'?
Raw output
{"message": "[Kedro.Spellings] Did you really mean 'kedro'?", "location": {"path": "docs/source/hooks/introduction.md", "range": {"start": {"line": 36, "column": 3}}}, "severity": "WARNING"}

### CLI Hooks

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.