Closed albertz closed 9 months ago
It bothers me to introduce a new structure which changes the environment. How about always creating the EnvironmentModifier, but only clean the environment if gs.CLEANUP_ENVIRONMENT
is True and set_env
would just pass the envs to EnvironmentModifier.set.
That way you should be able to accomplish the same thing without updating the environment in two different places.
I really don't want the string.Template.substitute
logic though, so in any case, I need another flag to enable or disable that, maybe per key, or globally. I think per key might be better, because I don't want to break any existing setups, or introduce the situation that you cannot mix it, thus have it incompatible with some setups where you both need this for some env vars, and where you don't want this for other env vars.
Let's move the discussion to https://github.com/rwth-i6/sisyphus/issues/178 to avoid two parallel discussions about the same thing.
As it was discussed in #178.
Fix #178