diff --git a/documentation/gitbook/how-to-run/multi-configs.md b/documentation/gitbook/how-to-run/multi-configs.md index 928e1318a..738de3399 100644 --- a/documentation/gitbook/how-to-run/multi-configs.md +++ b/documentation/gitbook/how-to-run/multi-configs.md @@ -1,6 +1,6 @@ --- description: >- - How to use multiple configuration files. + Patching together multiple configuration files. --- # Using Multiple Configuration Files @@ -40,6 +40,38 @@ flepimop patch config_sample_2pop.yml config_sample_2pop_outcomes_part.yml You may provide an arbitrary number of separate configuration files to combine to create a complete configuration. +## Caveats + At this time, only `simulate` supports multiple configuration files. Also, the patching operation is fairly crude: configuration options override previous ones completely, though with a warning. The files provided from left to right are from lowest priority (i.e. for the first file, only options specified in no other files are used) to highest priority (i.e. for the last file, its options override any other specification). -We are expanding coverage of this capability to other flepimop actions, e.g. inference, and are exploring options for smarter patching. \ No newline at end of file +We are expanding coverage of this capability to other flepimop actions, e.g. inference, and are exploring options for smarter patching. + +However, currently there are pitfalls like + +```yaml +# config1 +seir_modifiers: + scenarios: ["one", "two"] + one: + # ... + two: + # ... +``` + +```yaml +# config2 +seir_modifiers: + scenarios: ["one", "three"] + one: + # ... + three: + # ... +``` + +Then you might expect + +```bash +flepimop simulate config1.yml config2.yml +``` + +...to override seir scenario one and add scenario three, but what actually happens is that the entire seir_modifiers from config1 is overriden by config2. Specifying the configuration files in the reverse order would lead to a different outcome (the config1 seir_modifiers overrides config2 settings). If you're doing complex combinations of configuration files, you should use `flepimop patch ...` to ensure you're getting what you expect. \ No newline at end of file