-
Notifications
You must be signed in to change notification settings - Fork 908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Omegaconf breaks with a custom resolver providing a datetime #3620
Comments
Should this get moved to discussion or is it ready to be discussed? @ankatiyar |
This hasn't been discussed yet, it's in the Inbox |
This was the original PR that creates this regression. The PR was about removing custom syntax, there is a minor refactoring that use OmegaConf to remove the custom nest dict update function. This is the root cause of the bug. Things to do IMO:
Another way to confirm this is to reproduce the error and run this in older version (maybe 0.18.14) |
I am coming back to this as I currently cannot bump our code from 0.18.14 to 0.19.8. A full minimal example is at https://github.com/PetitLepton/kedro-runtime-params. |
@PetitLepton thanks for bumping this, I think we have a clear solution here already, which is do not use Omegaconf in |
Description
This case came up in a user question (@PetitLepton) - https://linen-slack.kedro.org/t/16417334/hi-folks-i-encountered-an-unexpected-behavior-regarding-the-#8d5f69d7-25ce-409f-b009-0a6a50cd064c
Context
The user has a custom resolver in their config which converts a string to a
pandas.Timestamp
type -settings.py
:parameters.yml
This works fine when you do a
kedro run
without any run time parameters but fails with the following error when you do akedro run --params="the_test=1"
:This is because when there's run time params, there is an additional merge step -
kedro/kedro/framework/context/context.py
Lines 203 to 205 in 80ad182
This happens after the parameter with the custom resolver has already been resolved into the
pandas.Timestamp
type andomegaconf
apparently does not support non primitive types in the config.Possible Implementation
Context
Possible Alternatives
omegaconf
'sDictConfig
type instead of converting todict
as we do right now, where the resolution happens at access time. Related issue: Spike: Enable access to OmegaConfigLoader DictConfig instead of dict only #2973The text was updated successfully, but these errors were encountered: