Snakemake expand equivalent #3308
Replies: 3 comments 9 replies
-
Hello @netphantom! The way to do this in Kedro at the moment is by using namespaces. You can see an example in the tutorial: https://docs.kedro.org/en/stable/tutorial/add_another_pipeline.html#modular-pipelines Essentially you have to:
There is an evolution of this approach to make things more automatic, described in this blog post https://getindata.com/blog/kedro-dynamic-pipelines/ Could you give it a try and let us know how it went? |
Beta Was this translation helpful? Give feedback.
-
Hi @astrojuanlu ! Tomorrow I will try to implement everything and let you know how it goes. I personally believe that this kind of feature would be very useful for creating fully test matrix and make exploratory analysis complete |
Beta Was this translation helpful? Give feedback.
-
I think I am wrongly setting the parameters.yaml. For the sake of simplicity I report only some of the params here. I have some basic dataset and NN options in a shape like: base_options:
window:
size: 100
prediction_size: 10
training:
epochs: 1000
learning_rate: 0.01
heads:
- At some point I have specified a new namespace: nn_heads:
base_options: ${..base_options}
nn_100:
_overrides:
heads: "100"
base_options: ${merge:${..base_options},${._overrides}}
nn_200:
_overrides:
heads: "200"
base_options: ${merge:${..base_options},${._overrides}} In
In for namespace, variants in settings.DYNAMIC_PIPELINES_MAPPING.items():
for variant in variants:
pipes.append(
pipeline(
pipeline_instance,
inputs={"dataset": f"{namespace}.dataset"},
namespace=f"{namespace}.{variant}",
tags=[variant, namespace],
)
) But if I run with
Am I missing something? |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I am new to Kedro and I have some experience using Snakemake.
I need to run multiple pipelines with different inputs, so I have configured in my
parameters.yml
something like:I would like that Kedro takes into account one at the time each value, and run 3 pipelines.
Using Snakemake, I put the
expand
rule and it took care of it. Is it possible to do the same in Kedro?Thanks
Beta Was this translation helpful? Give feedback.
All reactions