When switching to OmegaConfLoader, it seems isoformatted dates (e.g. 2025-01-08) are no longer automatically converted to date objects. I thought an easy fix would be to create a custom resolver to do the conversion for me. But then I got an error stating that a date
object was not a valid primitive type when creating OmegaConf objects. The issue seems to be when soft-merging params, you convert resolved dict objects back into OmegaConf objects which caused the error. Is this a bug?
no ETA yet, I think it will take some time if we want to address it by turning config into DictConfig
to solve other problems as well. Though I think for this particularly problem we should remove the use of OmegaConf and keep the recursive merge. I haven't checked if it will break anything, I believe this was not added intentionally.
I think an easy fix is to keep using the DictConfig
obj internally in the getitem
function of OmegaConfLoader
Not sure if the soft merge matters here, this bug happen at the KedroContext level which the config has already been merged.
The merge here is between the "final" config and runtime_params, a bit of legacy with how parameters
override works in the old day.
I took a quick stab on this https://github.com/kedro-org/kedro/pull/4405, and passed the fail commands described in the original issue.