kedro-boot


Namekedro-boot JSON
Version 0.2.2 PyPI version JSON
download
home_pagehttps://github.com/takikadiri/kedro-boot
SummaryA kedro plugin that streamlines the integration between Kedro projects and external applications, making it easier for you to develop production-ready data science applications.
upload_time2024-04-21 21:43:03
maintainerNone
docs_urlNone
authorTakieddine Kadiri
requires_python>=3.8
licenseApache Software License (Apache 2.0)
keywords kedro-plugin framework data apps pipelines machine learning data pipelines data science data engineering model serving mlops dataops
VCS
bugtrack_url
requirements kedro
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![Kedro Boot Logo - Ligh](.github/logo_light.png#gh-light-mode-only)
![Kedro Boot Logo - Dark](.github/logo_dark.png#gh-dark-mode-only)
[![Python version](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue.svg)](https://pypi.org/project/kedro/)
[![PyPI version](https://badge.fury.io/py/kedro-boot.svg)](https://badge.fury.io/py/kedro-boot)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/takikadiri/kedro-boot/blob/main/LICENSE)
[![Powered by Kedro](https://img.shields.io/badge/powered_by-kedro-ffc900?logo=kedro)](https://kedro.org)

# What is kedro-boot ?
Kedro Boot simplifies the integration of your Kedro pipelines with any applications. It's a framework for creating APIs and SDKs for your Kedro projects.
It offers these key functionalities: 

- :syringe: **Data injection**: Streamline the process of feeding data from any application into Kedro pipelines.
- :zap: **Low-Latency**: Execute multiple pipeline runs with minimal delay with optimisation for time-sensitive web applications.

This enables using Kedro pipelines in a wide range of use cases, including model serving, data apps (streamlit, dash), statistical simulations, parallel processing of unstructured data, streaming...  It also streamlines the deployment of your Kedro pipelines into various Data & AI Platforms (e.g. Databricks, DataRobot...).

_If you're new to [kedro](https://github.com/kedro-org/kedro), we invite you to visit [kedro docs](https://docs.kedro.org/en/stable/)_

# How do I use Kedro Boot ?

Any application can consume kedro pipelines through REST APIs or as a library (SDK). ``kedro-boot`` provides utilities and abstractions for each of these integration patterns. 

## Getting started

### Use case 1 : The standalone mode - How to run a kedro pipeline from another application

In this section, we assume you want to trigger the run of a kedro pipeline from another application which holds the entry point. This refer to applications that have their own CLI entry points (e.g. ``streamlit run``) and cannot be embedded in kedro's entry point (e.g. you cannot open streamlit with ``kedro run``). Low code UI (Streamlit, Dash...) and Data & AI Platforms are examples of such applications.

> [!IMPORTANT]  
> The 1st key concept of ``kedro-boot`` is the ``KedroBootSession``. It is basically a standard ``KedroSession`` with 2 main differences: 
> - you can run the same session multiple times with many speed optimisation (including dataset caching)
> - you can pass data and parameters at runtime : ``session.run(inputs={"your_dataset_name": your_data}, itertime_params={"my_param": your_new_param})`` 

The ``KedroBootSession`` should be created with either ``boot_project`` or ``boot_package`` (if the project as been previously packaged with ``kedro package``). A basic example would be the following:

```python
from kedro_boot.app.booter import boot_project
from kedro_boot.app.booter import boot_package
from kedro_boot.framework.compiler.specs import CompilationSpec

session = boot_project(
    project_path="<your_project_path>",
    compilation_specs=[CompilationSpec(inputs=["your_dataset_name"])], # Would be infered if not given
    kedro_args={ # kedro run args
        "pipeline": "your_pipeline", # IMPORTANT : You must create one KedroBootSession per pipeline, except for namespaced pipelines
        "conf_source": "<your_conf_source>",
    },
)

# session = boot_package(
#     package_name="<your_package_name>",
#     compilation_specs=[CompilationSpec(inputs=["your_dataset_name"])],
#     kedro_args={
#         "pipeline": "your_pipeline",
#         "conf_source": "<your_conf_source>",
#     },
# )

run_results = session.run(inputs={"your_dataset_name": your_data})
run_results2 = session.run(inputs={"your_dataset_name": your_data2})
```

You can found a complete example of a steamlit app that serve an ML model in the [Kedro Boot Examples](examples/README.md#data-app-with-streamlit-standalone-mode) project. We invite you to test it to gain a better understanding of Kedro Boot's ``boot_project`` or ``boot_package`` interfaces. 

> [!TIP]  
> The ``CompilationSpec`` gives you advanced control on how to configure the behaviour (which dataset to preload and cache, which arguments to pass on each iteration...). See [the documentation]() for more details. 

### Use case 2 : The embedded mode - Launching an application within kedro

> [!IMPORTANT]  
> The 2nd key concept of ``kedro-boot`` is the ``KedroBootApp`` which is an implementation of the ``AbstractKedroBootApp``. When used inside a kedro project, this class automatically creates a ``KedroBootSession``  which is passed to a ``_run``  abstract method. You can inherit from it to customize the way the way your pipeline is ran (e.g. running it mulitple times) or to start an application inside a kedro run (e.g. serve the pipeline as API) .

This mode involves using ``kedro-boot`` to embed an application inside a Kedro project, leveraging kedro's entry points, session and config loader for managing application lifecycle. It's suitable for use cases when the application is lightweight and owned by the same team that developed the kedro pipelines.

Hereafter is an example of a ``KedroBootApp`` on how to loop over a pipeline for a given number of iterations passed trhough a config file 

```python
from kedro_boot.app import AbstractKedroBootApp
from kedro_boot.framework.session import KedroBootSession


class KedroBootApp(AbstractKedroBootApp):
    def _run(self, kedro_boot_session: KedroBootSession):
        # leveraging config_loader to manage app's configs
        my_app_configs = kedro_boot_session.config_loader[
            "my_app"
        ]  # You should delcare this config pattern in settings.py

        for _ in my_app_configs.get("num_iteration"):  # Doing mutliples pipeline runs
            kedro_boot_session.run(
                namespace="my_namespace",
            )
```

The Kedro Boot App could be declared either in kedro's ``settings.py`` or as ``kedro boot`` run CLI args :

- Declaring ``KedroBootApp`` through ``settings.py``

```python
from your_package.your_module import KedroBootApp

APP_CLASS = KedroBootApp
APP_ARGS = {} # Any class init args
```

The Kedro Boot App could be started with:

```
kedro boot run <kedro_run_args>
````

- Declaring Kedro Boot App through kedro boot run CLI (Take precedence)

```
kedro boot run --app path.to.your.KedroBootApp <kedro_run_args>
````

You can find an example of a [Monte Carlo App embedded into a kedro project](examples/README.md#monte-carlo-simulation-embeded-mode).

## Advanced use cases

### Consuming Kedro pipeline through REST API

``kedro-boot`` implements natively some ``KedroBootApp`` as described in [use case 2](#the-embedded-mode-launching-an-app-from-kedro).

You can serve your kedro pipelines as a REST API using kedro-boot FastAPI Server

First you should install kedro-boot with fastapi extra dependency
```
pip install kedro-boot[fastapi]
````

Then you can serve your fastapi app with :

```
kedro boot fastapi --app path.to.your.fastapi.app <kedro_run_args>
```

Your fastapi app objects will be mapped with kedro pipeline objects, and the run results will be injected into your KedroFastAPI object through [FastAPI dependency injection](https://fastapi.tiangolo.com/tutorial/dependencies/). Here is an illustration of the kedro <-> fastapi objects mapping: 

![Kedro FastAPI objects mapping](.github/kedro_fastapi_mapping.PNG)

A default FastAPI app is used if no FastAPI app given. It would serve a single endpoint that run in background your selected pipeline

```
kedro boot fastapi <kedro_run_args>
```

These production-ready features would be natively included in your FastAPI apps:

- Embedded [Gunicorn web server](https://gunicorn.org/) (only for Linux and macOS)
- [Pyctuator](https://github.com/SolarEdgeTech/pyctuator) that report some service health metrology and application states. Usually used by service orchestrators (kubernetes) or monitoring to track service health and ensure it's high availability
- Multiple environments configurations, leveraging kedro's ``OmegaConfigLoader``. ``["fastapi*/"]`` config pattern could be used to configure the web server. Configs could also be passed as CLI args (refer to ``--help``)

You can learn more by testing the [spaceflights Kedro FastAPI example](examples/README.md#rest-api-with-kedro-fastapi-server) that showcases serving multiples endpoints operations that are mapped to differents pipeline namespaces.


## Understanding the integration process

Any python applications could consume kedro pipeline as a library. The integration process involves two steps:

- Registring kedro pipeline
- Creating a ``KedroBootSession``

### Registring Kedro pipelines

Kedro Boot prepare the catalog for the application consumption through a compilation process that follow a compilation specs. 

Compilation specs defines the namespaces and their datasets (inputs, outputs, parameters) that would be exposed to the application. It specify also if artifacts datasets should be infered during the compilation process (*artifacts datasets are loaded in ``MemoryDataset`` at runtime in order to speed up iteration time*)

The compilation specs are either given by the Application or infered from the Kedro Pipeline. 

Here is an example of registring a pipeline that contains inference and evaluation namespaces:

```python
# create inference namespace. All the inference pipeline's datasets will be exposed to the app, except "regressor" and "model_options.
inference_pipeline = pipeline(
    [features_nodes, prediction_nodes],
    inputs={"regressor": "training.regressor"},
    parameters="model_options",
    namespace="inference",
)
# create evaluation namespace. All the evaluation pipeline's datasets will be exposed to the app, except "feature_store", "regressor" and "model_options.
evaluation_pipeline = pipeline(
    [model_input_nodes, prediction_nodes, evaluation_nodes],
    inputs={"features_store": "features_store", "regressor": "training.regressor"},
    parameters="model_options",
    namespace="evaluation",
)

spaceflights_pipelines = inference_pipeline + evaluation_pipeline

return {"__default__": spaceflights_pipelines}
```

In this example, all the namespaces and ther namespaced datasets (inputs, outputs, parameters) would infer compilation specs and therefore would be exposed to the ``KedroBootApp``. 

You can use kedro-viz to visualize the datasets that woulc be exposed to the kedro boot apps. In the figure below, for the ``inference`` namespace, we see clearly that ``inference.feature_store`` and ``inference.predictions`` will be exposed to the applicaton (the blue one).

![pipeline_namespace](.github/pipeline_namespace.png)

Below are the differents categories of datasets that forms the compiled catalog.

- Inputs: inputs datasets that are be injected by the app at iteration time.
- Outputs: outputs dataset that hold the run results.
- Parameters: parameters that are injected by the app at iteration time.
- Artifacts: artifacts datasets that are materialized (loaded as ``MemoryDataset``) at startup time.
- Templates: template datasets that contains ``${itertime_params: param_name}``. Their attributes are interpolated at iteration time. 

You can compile the catalog without actually using it in a Kedro Boot App. This is helpful for verifying if the expected artifacts datasets are correctly infered or if the template datasets are correctly detected. Here is an example of the catalog compilation report for a pipeline that contains an ``inference`` namespace.

```
kedro boot compile
```
Compilation results:
```
INFO  catalog compilation completed for the namespace 'inference'. Here is the report:                                                          
    - Input datasets to be replaced/rendered at iteration time: {'inference.features_store'}
    - Output datasets that hold the results of a run at iteration time: {'inference.predictions'}
    - Parameter datasets to be replaced/rendered at iteration time: set()
    - Artifact datasets to be materialized (preloader as memory dataset) at startup time: {'training.regressor'}
    - Template datasets to be rendered at iteration time: set()
		
INFO  Catalog compilation completed.           
```

We can see that the ``training.regressor`` is being infered as artifact, it will be loaded as memory dataset to speed up iterations and prevent memory leak in a web app use case.

Note that when infering compilation specs, a pipeline that have no namespaces is also exposed to the kedro boot apps (have a compilation spec), but does not expose any datasets. Applications could provide their own compilation specs in order to specify the datasets that are needed to be exposed.

## Why does Kedro Boot exist ?

Kedro Boot unlock the value of your kedro pipelines by giving you a structured way for integrating them in a larger application. We developed kedro-boot to achieve the following: 

- Streamline deployment of kedro pipelines in batch, streaming and web app context.
- Encourage reuse and prevent rewriting pipeline's logic by the team that own the front application
- Leverage kedro's capabilities for business logic separation and authoring
- Leverage kedro's capabilities for managing an application lifecycle

Kedro Boot apps utilize Kedro's pipeline as a means to construct and manage business logic and some part or I/O. Kedro's underlying principles and internals ensure the maintainability, clarity, reuse, and visibility (kedro-viz) of business logic within Kedro Boot Apps, thanks to Kedro's declarative nature.

## Where do I test Kedro Boot ?

You can refer to the [Kedro Boot Examples](examples) project; it will guide you through four examples of Kedro Boot usages.

## Can I contribute ?

We'd be happy to receive help to maintain and improve the package. Any PR will be considered.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/takikadiri/kedro-boot",
    "name": "kedro-boot",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "kedro-plugin, framework, data apps, pipelines, machine learning, data pipelines, data science, data engineering, model serving, mlops, dataops",
    "author": "Takieddine Kadiri",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/45/78/f73601cf7498777e8b454ec0d17af5a686f7a2ccf0f1871924becd38d869/kedro-boot-0.2.2.tar.gz",
    "platform": null,
    "description": "![Kedro Boot Logo - Ligh](.github/logo_light.png#gh-light-mode-only)\n![Kedro Boot Logo - Dark](.github/logo_dark.png#gh-dark-mode-only)\n[![Python version](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue.svg)](https://pypi.org/project/kedro/)\n[![PyPI version](https://badge.fury.io/py/kedro-boot.svg)](https://badge.fury.io/py/kedro-boot)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/takikadiri/kedro-boot/blob/main/LICENSE)\n[![Powered by Kedro](https://img.shields.io/badge/powered_by-kedro-ffc900?logo=kedro)](https://kedro.org)\n\n# What is kedro-boot ?\nKedro Boot simplifies the integration of your Kedro pipelines with any applications. It's a framework for creating APIs and SDKs for your Kedro projects.\nIt offers these key functionalities: \n\n- :syringe: **Data injection**: Streamline the process of feeding data from any application into Kedro pipelines.\n- :zap: **Low-Latency**: Execute multiple pipeline runs with minimal delay with optimisation for time-sensitive web applications.\n\nThis enables using Kedro pipelines in a wide range of use cases, including model serving, data apps (streamlit, dash), statistical simulations, parallel processing of unstructured data, streaming...  It also streamlines the deployment of your Kedro pipelines into various Data & AI Platforms (e.g. Databricks, DataRobot...).\n\n_If you're new to [kedro](https://github.com/kedro-org/kedro), we invite you to visit [kedro docs](https://docs.kedro.org/en/stable/)_\n\n# How do I use Kedro Boot ?\n\nAny application can consume kedro pipelines through REST APIs or as a library (SDK). ``kedro-boot`` provides utilities and abstractions for each of these integration patterns. \n\n## Getting started\n\n### Use case 1 : The standalone mode - How to run a kedro pipeline from another application\n\nIn this section, we assume you want to trigger the run of a kedro pipeline from another application which holds the entry point. This refer to applications that have their own CLI entry points (e.g. ``streamlit run``) and cannot be embedded in kedro's entry point (e.g. you cannot open streamlit with ``kedro run``). Low code UI (Streamlit, Dash...) and Data & AI Platforms are examples of such applications.\n\n> [!IMPORTANT]  \n> The 1st key concept of ``kedro-boot`` is the ``KedroBootSession``. It is basically a standard ``KedroSession`` with 2 main differences: \n> - you can run the same session multiple times with many speed optimisation (including dataset caching)\n> - you can pass data and parameters at runtime : ``session.run(inputs={\"your_dataset_name\": your_data}, itertime_params={\"my_param\": your_new_param})`` \n\nThe ``KedroBootSession`` should be created with either ``boot_project`` or ``boot_package`` (if the project as been previously packaged with ``kedro package``). A basic example would be the following:\n\n```python\nfrom kedro_boot.app.booter import boot_project\nfrom kedro_boot.app.booter import boot_package\nfrom kedro_boot.framework.compiler.specs import CompilationSpec\n\nsession = boot_project(\n    project_path=\"<your_project_path>\",\n    compilation_specs=[CompilationSpec(inputs=[\"your_dataset_name\"])], # Would be infered if not given\n    kedro_args={ # kedro run args\n        \"pipeline\": \"your_pipeline\", # IMPORTANT : You must create one KedroBootSession per pipeline, except for namespaced pipelines\n        \"conf_source\": \"<your_conf_source>\",\n    },\n)\n\n# session = boot_package(\n#     package_name=\"<your_package_name>\",\n#     compilation_specs=[CompilationSpec(inputs=[\"your_dataset_name\"])],\n#     kedro_args={\n#         \"pipeline\": \"your_pipeline\",\n#         \"conf_source\": \"<your_conf_source>\",\n#     },\n# )\n\nrun_results = session.run(inputs={\"your_dataset_name\": your_data})\nrun_results2 = session.run(inputs={\"your_dataset_name\": your_data2})\n```\n\nYou can found a complete example of a steamlit app that serve an ML model in the [Kedro Boot Examples](examples/README.md#data-app-with-streamlit-standalone-mode) project. We invite you to test it to gain a better understanding of Kedro Boot's ``boot_project`` or ``boot_package`` interfaces. \n\n> [!TIP]  \n> The ``CompilationSpec`` gives you advanced control on how to configure the behaviour (which dataset to preload and cache, which arguments to pass on each iteration...). See [the documentation]() for more details. \n\n### Use case 2 : The embedded mode - Launching an application within kedro\n\n> [!IMPORTANT]  \n> The 2nd key concept of ``kedro-boot`` is the ``KedroBootApp`` which is an implementation of the ``AbstractKedroBootApp``. When used inside a kedro project, this class automatically creates a ``KedroBootSession``  which is passed to a ``_run``  abstract method. You can inherit from it to customize the way the way your pipeline is ran (e.g. running it mulitple times) or to start an application inside a kedro run (e.g. serve the pipeline as API) .\n\nThis mode involves using ``kedro-boot`` to embed an application inside a Kedro project, leveraging kedro's entry points, session and config loader for managing application lifecycle. It's suitable for use cases when the application is lightweight and owned by the same team that developed the kedro pipelines.\n\nHereafter is an example of a ``KedroBootApp`` on how to loop over a pipeline for a given number of iterations passed trhough a config file \n\n```python\nfrom kedro_boot.app import AbstractKedroBootApp\nfrom kedro_boot.framework.session import KedroBootSession\n\n\nclass KedroBootApp(AbstractKedroBootApp):\n    def _run(self, kedro_boot_session: KedroBootSession):\n        # leveraging config_loader to manage app's configs\n        my_app_configs = kedro_boot_session.config_loader[\n            \"my_app\"\n        ]  # You should delcare this config pattern in settings.py\n\n        for _ in my_app_configs.get(\"num_iteration\"):  # Doing mutliples pipeline runs\n            kedro_boot_session.run(\n                namespace=\"my_namespace\",\n            )\n```\n\nThe Kedro Boot App could be declared either in kedro's ``settings.py`` or as ``kedro boot`` run CLI args :\n\n- Declaring ``KedroBootApp`` through ``settings.py``\n\n```python\nfrom your_package.your_module import KedroBootApp\n\nAPP_CLASS = KedroBootApp\nAPP_ARGS = {} # Any class init args\n```\n\nThe Kedro Boot App could be started with:\n\n```\nkedro boot run <kedro_run_args>\n````\n\n- Declaring Kedro Boot App through kedro boot run CLI (Take precedence)\n\n```\nkedro boot run --app path.to.your.KedroBootApp <kedro_run_args>\n````\n\nYou can find an example of a [Monte Carlo App embedded into a kedro project](examples/README.md#monte-carlo-simulation-embeded-mode).\n\n## Advanced use cases\n\n### Consuming Kedro pipeline through REST API\n\n``kedro-boot`` implements natively some ``KedroBootApp`` as described in [use case 2](#the-embedded-mode-launching-an-app-from-kedro).\n\nYou can serve your kedro pipelines as a REST API using kedro-boot FastAPI Server\n\nFirst you should install kedro-boot with fastapi extra dependency\n```\npip install kedro-boot[fastapi]\n````\n\nThen you can serve your fastapi app with :\n\n```\nkedro boot fastapi --app path.to.your.fastapi.app <kedro_run_args>\n```\n\nYour fastapi app objects will be mapped with kedro pipeline objects, and the run results will be injected into your KedroFastAPI object through [FastAPI dependency injection](https://fastapi.tiangolo.com/tutorial/dependencies/). Here is an illustration of the kedro <-> fastapi objects mapping: \n\n![Kedro FastAPI objects mapping](.github/kedro_fastapi_mapping.PNG)\n\nA default FastAPI app is used if no FastAPI app given. It would serve a single endpoint that run in background your selected pipeline\n\n```\nkedro boot fastapi <kedro_run_args>\n```\n\nThese production-ready features would be natively included in your FastAPI apps:\n\n- Embedded [Gunicorn web server](https://gunicorn.org/) (only for Linux and macOS)\n- [Pyctuator](https://github.com/SolarEdgeTech/pyctuator) that report some service health metrology and application states. Usually used by service orchestrators (kubernetes) or monitoring to track service health and ensure it's high availability\n- Multiple environments configurations, leveraging kedro's ``OmegaConfigLoader``. ``[\"fastapi*/\"]`` config pattern could be used to configure the web server. Configs could also be passed as CLI args (refer to ``--help``)\n\nYou can learn more by testing the [spaceflights Kedro FastAPI example](examples/README.md#rest-api-with-kedro-fastapi-server) that showcases serving multiples endpoints operations that are mapped to differents pipeline namespaces.\n\n\n## Understanding the integration process\n\nAny python applications could consume kedro pipeline as a library. The integration process involves two steps:\n\n- Registring kedro pipeline\n- Creating a ``KedroBootSession``\n\n### Registring Kedro pipelines\n\nKedro Boot prepare the catalog for the application consumption through a compilation process that follow a compilation specs. \n\nCompilation specs defines the namespaces and their datasets (inputs, outputs, parameters) that would be exposed to the application. It specify also if artifacts datasets should be infered during the compilation process (*artifacts datasets are loaded in ``MemoryDataset`` at runtime in order to speed up iteration time*)\n\nThe compilation specs are either given by the Application or infered from the Kedro Pipeline. \n\nHere is an example of registring a pipeline that contains inference and evaluation namespaces:\n\n```python\n# create inference namespace. All the inference pipeline's datasets will be exposed to the app, except \"regressor\" and \"model_options.\ninference_pipeline = pipeline(\n    [features_nodes, prediction_nodes],\n    inputs={\"regressor\": \"training.regressor\"},\n    parameters=\"model_options\",\n    namespace=\"inference\",\n)\n# create evaluation namespace. All the evaluation pipeline's datasets will be exposed to the app, except \"feature_store\", \"regressor\" and \"model_options.\nevaluation_pipeline = pipeline(\n    [model_input_nodes, prediction_nodes, evaluation_nodes],\n    inputs={\"features_store\": \"features_store\", \"regressor\": \"training.regressor\"},\n    parameters=\"model_options\",\n    namespace=\"evaluation\",\n)\n\nspaceflights_pipelines = inference_pipeline + evaluation_pipeline\n\nreturn {\"__default__\": spaceflights_pipelines}\n```\n\nIn this example, all the namespaces and ther namespaced datasets (inputs, outputs, parameters) would infer compilation specs and therefore would be exposed to the ``KedroBootApp``. \n\nYou can use kedro-viz to visualize the datasets that woulc be exposed to the kedro boot apps. In the figure below, for the ``inference`` namespace, we see clearly that ``inference.feature_store`` and ``inference.predictions`` will be exposed to the applicaton (the blue one).\n\n![pipeline_namespace](.github/pipeline_namespace.png)\n\nBelow are the differents categories of datasets that forms the compiled catalog.\n\n- Inputs: inputs datasets that are be injected by the app at iteration time.\n- Outputs: outputs dataset that hold the run results.\n- Parameters: parameters that are injected by the app at iteration time.\n- Artifacts: artifacts datasets that are materialized (loaded as ``MemoryDataset``) at startup time.\n- Templates: template datasets that contains ``${itertime_params: param_name}``. Their attributes are interpolated at iteration time. \n\nYou can compile the catalog without actually using it in a Kedro Boot App. This is helpful for verifying if the expected artifacts datasets are correctly infered or if the template datasets are correctly detected. Here is an example of the catalog compilation report for a pipeline that contains an ``inference`` namespace.\n\n```\nkedro boot compile\n```\nCompilation results:\n```\nINFO  catalog compilation completed for the namespace 'inference'. Here is the report:                                                          \n    - Input datasets to be replaced/rendered at iteration time: {'inference.features_store'}\n    - Output datasets that hold the results of a run at iteration time: {'inference.predictions'}\n    - Parameter datasets to be replaced/rendered at iteration time: set()\n    - Artifact datasets to be materialized (preloader as memory dataset) at startup time: {'training.regressor'}\n    - Template datasets to be rendered at iteration time: set()\n\t\t\nINFO  Catalog compilation completed.           \n```\n\nWe can see that the ``training.regressor`` is being infered as artifact, it will be loaded as memory dataset to speed up iterations and prevent memory leak in a web app use case.\n\nNote that when infering compilation specs, a pipeline that have no namespaces is also exposed to the kedro boot apps (have a compilation spec), but does not expose any datasets. Applications could provide their own compilation specs in order to specify the datasets that are needed to be exposed.\n\n## Why does Kedro Boot exist ?\n\nKedro Boot unlock the value of your kedro pipelines by giving you a structured way for integrating them in a larger application. We developed kedro-boot to achieve the following: \n\n- Streamline deployment of kedro pipelines in batch, streaming and web app context.\n- Encourage reuse and prevent rewriting pipeline's logic by the team that own the front application\n- Leverage kedro's capabilities for business logic separation and authoring\n- Leverage kedro's capabilities for managing an application lifecycle\n\nKedro Boot apps utilize Kedro's pipeline as a means to construct and manage business logic and some part or I/O. Kedro's underlying principles and internals ensure the maintainability, clarity, reuse, and visibility (kedro-viz) of business logic within Kedro Boot Apps, thanks to Kedro's declarative nature.\n\n## Where do I test Kedro Boot ?\n\nYou can refer to the [Kedro Boot Examples](examples) project; it will guide you through four examples of Kedro Boot usages.\n\n## Can I contribute ?\n\nWe'd be happy to receive help to maintain and improve the package. Any PR will be considered.\n",
    "bugtrack_url": null,
    "license": "Apache Software License (Apache 2.0)",
    "summary": "A kedro plugin that streamlines the integration between Kedro projects and external applications, making it easier for you to develop production-ready data science applications.",
    "version": "0.2.2",
    "project_urls": {
        "Homepage": "https://github.com/takikadiri/kedro-boot"
    },
    "split_keywords": [
        "kedro-plugin",
        " framework",
        " data apps",
        " pipelines",
        " machine learning",
        " data pipelines",
        " data science",
        " data engineering",
        " model serving",
        " mlops",
        " dataops"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3caaa790a8b151200dda693b46a6b9c119b7a435e5a97489994c46935a0c116e",
                "md5": "e319bc96d62e4687ba571d44ba133baf",
                "sha256": "153661313c04375a8021e2371b9c04b956fbf655a73b0c317ce11b32d74b9a61"
            },
            "downloads": -1,
            "filename": "kedro_boot-0.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e319bc96d62e4687ba571d44ba133baf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 40339,
            "upload_time": "2024-04-21T21:43:02",
            "upload_time_iso_8601": "2024-04-21T21:43:02.257081Z",
            "url": "https://files.pythonhosted.org/packages/3c/aa/a790a8b151200dda693b46a6b9c119b7a435e5a97489994c46935a0c116e/kedro_boot-0.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4578f73601cf7498777e8b454ec0d17af5a686f7a2ccf0f1871924becd38d869",
                "md5": "11a1b2c265aa1431ca635851fac9aac5",
                "sha256": "9f3657c31e89711299fc8ee1f54d65121d2fc4d07bc1e72f9a6371f6159fc95e"
            },
            "downloads": -1,
            "filename": "kedro-boot-0.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "11a1b2c265aa1431ca635851fac9aac5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 36932,
            "upload_time": "2024-04-21T21:43:03",
            "upload_time_iso_8601": "2024-04-21T21:43:03.391251Z",
            "url": "https://files.pythonhosted.org/packages/45/78/f73601cf7498777e8b454ec0d17af5a686f7a2ccf0f1871924becd38d869/kedro-boot-0.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-21 21:43:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "takikadiri",
    "github_project": "kedro-boot",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "kedro",
            "specs": [
                [
                    ">=",
                    "0.19.1"
                ],
                [
                    "<",
                    "0.20"
                ]
            ]
        }
    ],
    "lcname": "kedro-boot"
}
        
Elapsed time: 0.24078s