Hi - short and simple question I can't find easy a...
# questions
a
Hi - short and simple question I can't find easy answer to - how to verify which env I am running kedro in? I'm specifying some env but some values in catalog parameters seem to not be set correctly and I want to debug this. I see there is
context.config_loader.env
, but can I actually read params of catalog values like
_foo_bar
?
K 1
you could also set it with the
KEDRO_ENV
var
a
yes maybe I worded the question wrong, I wanted to make sure I'm using correct values of catalog params - how can I read those?
To expand on this issue I'm relying on
catalog_xxx.yml
that's put in local env to replace some of the params in base env - and they seem to be set incorrectly
values for omegaconf like
_foo_bar
that used to be globals
d
so it’s done by folder not filename
all folders within the folder are scooped into one
and then keys present in the custom env override base
a
so I need to put it to
local/catalog/xxx.yml
for it to work?
d
instead of local you’d do
prod
IIRC local may take precedence in every case
a
So the thing is all the interpolated values are resolved within the environment first and then merged - so
_foo_bar
from the run env is not being resolved into the
base
catalog entry
thankyou 1
Use the
globals:
resolver for this
a
oh my
but I want to use OmegaConf
is it a setting of omegaconf or its a separate config loader?
how should I handle for example when the catalog is the same for all envs only some part of the paths changes? I've used to do it by changing the
_variables
in each env that are part of the path - you're saying that I can't replace those with omegaconf?
thanks for this insight @Ankita Katiyar 🙂
a
Woops sorry, I was about to send the docs link too. Let me know if
globals
resolver works for you!
a
well if it resolves before catalog does it will do
a
It does, the globals are loaded and merged from both environments first and then resolved into the catalog/parameters where they are mentioned
a
and to answer my own question for others: you can check what current catalog resolves to with
context.config_loader['catalog']
K 1