Hi guys, I want to reuse a kedro pipline with diff...
# questions
r
Hi guys, I want to reuse a kedro pipline with different config, deployed from the same repo. What would be a good pattern to do this? Have a separate config directory?
So, I have a pipeline with a certain timeseries aggregation, say
60 seconds
. I want to deploy the exact same pipeline with a different parameter, say
120 seconds
, but also anticipate some changes to the config in the future.
m
Use Kedro envs
👍🏼 1
n
This is exactly what Environment for: https://docs.kedro.org/en/stable/configuration/configuration_basics.html#configuration-environments You only need to add the config to override (provided that your other config is in
base
). You may need to set the merging strategy depending if you need a soft-merge.
r
Ok, what if we have multiple pipelines per deployment...so like
pipeline_a
and
pipeline_b
in `dev`/`test`/`prod`. Can we nest them or something?
@Nok Lam Chan Still curious about this one, can you nest kedro environments?
m
You have base and other by default inherit config from it.
n
Kedro has a dual environment default, that is
base
+
local
(you will see that created in starters).
base
is where you would put most of your configuration in, and then if you need to override a certain parameters, you can override it in
local
.
local
is what we called a default run environment, you can change this easily just by creating a folder in the same level. When you want to use, let say,
production
instead of
local
, you can run your pipeline as
kedro run --env production
There are two different strategy how config being override (search
merge_strategy
),you can find more details in the docs.
What do you mean by
nested
? If you have multiple pipelines, the usual practice is to give a namespace to it so it won't have parameters conflicts between different pipelines. If the parameters are shared instead, then you can keep it as is.
r
Ok, understood, will go to namespaces for this. Thanks!