I am having some trouble with the following behaviour. I use .ini config files with nested sections, and import the flags from there, but when Guild resolves the files and write a copy to the run dir, the format changes and the nesting is lost. I would need it to keep the same formatting.
I have a config file with nested sections, like:
[ingredients]
greens = cabbage
[ingredients.meat]
type = pork belly
marbled = true
[ingredients.carbs]
type = noodles
[ingredients.carbs.make]
[ingredients.carbs.make.water]
add_miso = true
container = cooking pot
temp = 100
And a guild file:
cook:
exec: cat source_config.cfg
flags-import: all
flags-dest: config:source_config.cfg
Running this operation gives prints out the resulting config file in the run dir:
I can understand what happened, but for my purposes, this is a destructive change: I can’t read this config file inside the run.
Practically speaking, I use guild to run machine learning experiments backed by Spacy. I read in the created config file with confection (Spacy’s config handler), which doesn’t support reading those dicts. The upshot is that I can’t use guild to run sweeps. Would love to see a solution to this.
Yeah, I can see how this behavior is annoying - the radical change in format it is a bit surprising but I’m guessing this is the behavior in the Python INI support (perhaps later versions).
I’ll create a project that replicates and see what we can do to address it. Stay tuned!
I opened an issue in GitHub to track this. We’ll look to integrate that in the followup release to 0.9.0 — it looks like the right approach! Thanks a lot for that