Iñigo Hidalgo
02/21/2024, 3:41 PMdataset_config:
primary_key: [date, timeseries_id, unit_id]
Using OmegaConf resolvers could I somehow select dataset_config.primary_key[1:]
in another parameter?Iñigo Hidalgo
02/21/2024, 3:42 PMdatajoely
02/21/2024, 3:42 PMlambda x,y : x[y:]
Iñigo Hidalgo
02/21/2024, 3:45 PMCONFIG_LOADER_ARGS = {
"custom_resolvers": {
"index_list": lambda x, y: x[y:]
}}
${index_list:dataset_config.primary_key, 1}
?datajoely
02/21/2024, 3:46 PMdatajoely
02/21/2024, 3:46 PMIñigo Hidalgo
02/21/2024, 3:47 PMIñigo Hidalgo
02/21/2024, 3:57 PMIñigo Hidalgo
02/21/2024, 3:57 PMIñigo Hidalgo
02/21/2024, 4:02 PM${index_list:dataset_config.primary_key, 1}
this is returning ataset_config.primary_key
So it's parsing my interpolation key as a string,
This works though: ${index_list:${dataset_config.primary_key}, 1}
datajoely
02/21/2024, 4:04 PMdef
can you put a breakpoint in it?Iñigo Hidalgo
02/21/2024, 4:05 PMIñigo Hidalgo
02/21/2024, 4:06 PMIñigo Hidalgo
02/21/2024, 4:06 PMdatajoely
02/21/2024, 4:09 PMIñigo Hidalgo
02/21/2024, 4:13 PMMerel
02/21/2024, 4:42 PMNok Lam Chan
02/21/2024, 5:01 PMJuan Luis
02/21/2024, 5:25 PMJanick Spirig
02/22/2024, 6:21 PM${index_list:${dataset_config.primary_key}, 1}
? Do you then have primary_key: [timeseries_id, unit_id]
available in a dict?Iñigo Hidalgo
02/22/2024, 6:58 PMdataset_config:
primary_key: [date, timeseries_id, unit_id]
...
somewhere:
else:
single_timeseries_id: ${index_list:${dataset_config.primary_key}, 1}
I could then access params:somewhere.else.single_timeseries_id
which would be passed to the node as [timeseries_id, unit_id]
Iñigo Hidalgo
02/22/2024, 7:05 PMmigrate these pipelines from ancient Kedro versions@Juan Luis i have to admit, i cheated there. in the end, the cost-benefit just wasn't in favor of actually migrating that older code to newer kedro. instead i was able to get buy-in to start reimplementing it in a much more modular way.