Coder Social home page Coder Social logo

Comments (6)

noklam avatar noklam commented on June 1, 2024

image

from kedro.

astrojuanlu avatar astrojuanlu commented on June 1, 2024

https://linen-slack.kedro.org/t/16184322/hi-team-a-question-when-using-kedro-params-at-runtime-right-#ad3c8635-2a81-45be-8242-349287387628

from kedro.

noklam avatar noklam commented on June 1, 2024

A more updated fork seems to suggest this is a bug. https://github.com/chy111126/debug_kedro_0182

The problem is the use of env and CLI --params is interacting weirdly.

  1. kedro run --env=add --params="aaa.bbb.abb=2023-11-11"

{'aaa': {'bbb': {'abb': '2023-11-11'}}, 'xyz': {'asdf': 123123}, 'def': {'gg': 123}}

  1. kedro run --params="aaa.bbb.abb=2023-11-11"

{'aaa': {'bbb': {'aba': '2023-11-01', 'abb': '2023-11-11', 'abc': 14}}, 'xyz': {'asdf': 123123}}

The add env only contains one top key def parameter which is not a conflicted key, but the result override the top level key aaa.

from kedro.

noklam avatar noklam commented on June 1, 2024

Further testing, I try to switch to ConfigLoader with 0.18.14 and the issue is gone. I did another test to upgrade to 0.19.1 with OmegaConfig and the issue is back.

from kedro.

noklam avatar noklam commented on June 1, 2024

A temporary workaround is to use settings.py, note this shouldn't be needed because the top-level key has no conflict. We should still investigate the issue.

CONFIG_LOADER_ARGS = {
    "merge_strategy": {"parameters": "destructive"},
}

from kedro.

noklam avatar noklam commented on June 1, 2024
config={'aaa': {'bbb': {'aba': '2023-11-01', 'abb': '2023-11-11', 'abc': 14}}, 'xyz': {'asdf': 123123}}
env_config={'def': {'gg': 123}, 'aaa': {'bbb': {'abb': '2023-11-11'}}}
resulting_config={'aaa': {'bbb': {'abb': '2023-11-11'}}, 'xyz': {'asdf': 123123}, 'def': {'gg': 123}}

It appears that the --params="aaa.bbb.abb=2023-11-11" somehow get pass into to the add environment as parameters, thus the destructive merge overriding it.

from kedro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.