Implement pipeline autodiscovery
See original GitHub issueFollowing https://github.com/kedro-org/kedro/issues/1284 and a discussion with Ivan, here’s what we’re going to do:
1. Define a function find_pipelines
In kedro.framework.project.__init__.py
, something like this:
def find_pipelines():
registered_pipelines = {}
pipeline in Path(f"{PACKAGE_NAME}.pipelines").iterdir():
importlib.import_module(pipeline)
if hasattr(pipeline, "create_pipeline"):
registered_pipelines[pipeline] = pipeline.create_pipeline()
registered_pipelines["__default__"] = pipeline([])
return registered_pipelines
Name is TBD (note I changed from previously-suggested autoregister
because it doesn’t actually register any more, just finds them). It’s also like setup.py’s find_packages
here.
2. Call this function from project template and all starters
In pipeline_registry.py:
from kedro.framework.project import find_pipelines
def register_pipelines() -> Dict[str, Pipeline]:
"""Register the project's pipelines.
MAKE THIS DOCSTRING MORE INFORMATIVE
Returns:
A mapping from a pipeline name to a ``Pipeline`` object.
"""
pipelines = find_pipelines()
pipelines["__default__"] = sum(pipelines.values())
return pipelines
3. Add documentation, tests, etc.
Issue Analytics
- State:
- Created a year ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
How to setup autodiscovery and creation of new pipelines in ...
Hi all. First time Azure DevOps user here and trying to figure out to migrate to Azure DevOps pipelines. I've managed to setup...
Read more >The pipeline registry — Kedro 0.18.3 documentation - Read the Docs
Pipeline autodiscovery ¶. In the above example, you need to update the register_pipelines() function whenever you create a pipeline that should be returned ......
Read more >Kubernetes Integrations Autodiscovery - Datadog Docs
This page covers how to configure integrations Autodiscovery with Kubernetes. If you are using Docker or Amazon ECS, see the Docker Integrations ...
Read more >How to use custom ingest pipelines with docker autodiscover
I'm having a hard time using custom Elasticsearch ingest pipelines with Filebeat's Docker autodiscovery. I've started out with custom ...
Read more >How to build your CI/CD pipeline for the full API lifecycle
In this example, we will deploy an application to CloudHub using Anypoint CLI and use property placeholders for configuring auto discovery ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great! I pinged @MerelTheisenQB on Friday, since I thought you were on holiday, and she was aligned in terms of creating a new page for the pipeline registry.
I think the functionality is good to go on my current PR; just need to add the documentation. I’ll plan to:
Alternatively, I’d also be happy to merge the current code (after review) and add the 1-2 documentation PRs on top of that.
Great! In that case, I’ve marked my current PR as ready for review. 😃