Hello all, i have a base/parameters.yml, but I wan...
# questions
s
Hello all, i have a base/parameters.yml, but I want to have a local/parameters.yml and have some parameters override. but I get the following error "Duplicate keys found in.." What am I doing wrong or how can I resolve it? i use kedro 0.19.9
h
Someone will reply to you shortly. In the meantime, this might help:
d
Hi Sergei, when running locally, your local configuration should override the base parameters, so it should work as expected. Could you share your local and base parameter files here to help us troubleshoot?
s
not sure what to present but having this in base and local param files will cause a duplication error. i think It is also states in the documentation, I'm just not sure how to do it otherwise {"feature" : 10}
d
that's strange, I just copied my
parameters.yml
from base to local (fully duplicate) and everything works well, but if I'm copying that file and put it into base folder again, it will be
Duplicate keys found error
. So maybe you need to confirm that you don't duplicate values inside of base or inside of local.
s
the kets are duplicated, and i don't see a limitation why a value can't be duplicated as well. but isn't that the whole point of overwriting?
d
I think you can duplicate values, but cannot duplicate keys inside of one configuration folder (base or local)
y
I confirm this is something that has existed basically forever: https://github.com/kedro-org/kedro/issues/825
s
i don't duplicate them in same folder, but they are duplicated between base/local folders base/parameters.yml: duplicate_key: value local/parameters.yml duplicate_key: value_2 what is the best practice to override parameters locally?
d
Sergei, I tested your setup - it works for me, no error. Local will just override base. I see the error only if duplicate_key repeats in base, or in local