https://kedro.org/ logo
#questions
Title
# questions
v

viveca

08/15/2023, 12:55 PM
Hi, I’m looking at namespaces and modular pipelines. Must say, it’s somewhat confusing, and also some things seems to have changed in newer versions of kedro. For one, how should I understand this note a bit further down in the docs https://docs.kedro.org/en/0.18.12/nodes_and_pipelines/modular_pipelines.html#using-a-modular-pipeline-multiple-times
parameters
references will not be namespaced, but
params:
references will. In my mental model, it should not matter if I specify the whole parameter dictionary as “parameters” or if I give an individual element of it “params:elem”. This seems like a detail of how I implemented my node function. But indeed, when I tried this out, “params:elem”-type parameters will be “hidden” under the given namespace when creating a namespaced pipeline from a template one, while the “parameters” dict will stay global. So basically “params:elem” and the “elem” attribute of “parameters” will refer to different values, for instance when I have a node function that takes
input=["parameters", "params:elem"]
. What’s the reasoning here, conceptually? Thanks, Viveca
👍🏼 1
d

datajoely

08/15/2023, 1:37 PM
Namespaces weren’t applied to parameters in 0.17.x
but they have been for a bout a year and a half now
v

viveca

08/15/2023, 2:13 PM
So how do I think about the difference between “parameters” and “params:“?
d

datajoely

08/15/2023, 2:16 PM
parameters is everything in one big dictionary - if I had my way I’d deprecate it.
Explicit is better than implicit
,
params:address
is an explicit reference
n

Nok Lam Chan

08/15/2023, 2:21 PM
I think the reasoning behind is
params
are namespaced by default.
parameters
is an exception - and it’s kind of a legacy thing for backward compatibility. It is only useful when you need the whole dictionary of your parameters (i.e. when you need to log the parameters ).
I sympathise that it is quite hard to understand as I have the same question myself. I updated this doc recently There is an open issue for updating this piece of doc in a holistic way
👍🏼 1
v

viveca

08/15/2023, 2:31 PM
I see, thanks for the replies. My suspicion was that the difference is due to something internal about how “parameters” vs “params:” is translated.
15 Views