https://kedro.org/ logo
#plugins-integrations
Title
# plugins-integrations
p

puneet makhija

11/30/2023, 1:44 PM
im trying to use kedro-boot in our application to cmmunicate with kedro project i have used the provided example by kedro (data_processing pipeline) kedro run --pipeline data_processing but im confused where to register this (AppPipeline) this below is documented in Github We need to registrer an
AppPipeline
by using
app_pipeline
factory
but how we can register this ?
🧵 1
j

Juan Luis

11/30/2023, 2:08 PM
let's continue the conversation in a thread https://kedro-org.slack.com/archives/C03RKPCLYGY/p1701352362386239
cc @Takieddine Kadiri for continuity
p

puneet makhija

11/30/2023, 2:23 PM
thanks
t

Takieddine Kadiri

12/01/2023, 1:47 PM
In order to consume your kedro pipelines from a remote machine, you need to expose them as an API. In your kedro project: 1. Create a fastapi kedro boot app. See an example here https://github.com/takikadiri/kedro-boot-examples/blob/main/src/spaceflights_fastapi/app.py 2. Declare the pipelines that you need to serve through you fastapi app. App pipelines should be declared in your
pipeline_registry.py
ex:
Copy code
from kedro.pipeline.modular_pipeline import pipeline
from kedro_boot.pipeline import app_pipeline

your_first_pipeline = pipeline([node(your_function, inputs=["input_dataset", "model"], outputs="output_dataset")])
your_second_pipeline = pipeline([node(your_function, inputs=["input_dataset", "model"], outputs="output_dataset")])

your_first_app_pipeline = app_pipeline(
        your_first_pipeline,
        name="your_first_pipeline",
        inputs="input_dataset", # if you want to inject input dataset to your pipeline
        outputs="output_dataset" # to get output from pipeline run
    )

your_second_app_pipeline = app_pipeline(
        your_second_pipeline,
        name="your_second_pipeline",
    )

return {"_default_": your_first_app_pipeline + your_second_app_pipeline}
You can flollow the pipeline serving example in the kedro boot examples. And do slightly the same things in your kedro projects. In the following weeks we'll write a documentation site and plan also to introduce a user friendly interface with an integrated a web server to streamline the pipeline serving process. let us know if it worked for you
2 Views