Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yaml_load overwrites previous experiment yamls when multiple experiment yamls are listed in the pp section of the main yaml #162

Open
uwagura opened this issue Aug 20, 2024 · 0 comments

Comments

@uwagura
Copy link

uwagura commented Aug 20, 2024

Describe the bug
If multiple experiment yamls are listed in the pp section of the main yaml, then only the last listed yaml will be included in the combined yaml. Any other yamls will be overwritten

To Reproduce
Include multiple experiment yamls within a single experiment in the main yaml, like so:

experiments:
    - name: "CEFI_NWA12_COBALT_V1"
      pp:
          - "yaml_include/MOM6_postprocess.yaml" 
          - "yaml_include/Cobalt_postprocess.yaml"

Expected behavior
Ideally, it would be nice to have the components listed in each experiment yaml included in the combined yaml produced afterwards

Additional context
This problem seems to be caused by each of the experiment yamls containing the same keys. In the example listed above, MOM6_postprocess.yaml and Cobalt_postprocess.yaml each contain the following format

postprocess:
    components:
          - <components here> 

When these two yamls are combined with the main yaml, the combined yaml ends up with two postprocessing keys. When the yaml_load function reads these keys, it will overwrite the first postprocess section with the second one, causing the final file to have only the postprocessing components from the second experiment.

This issue could eventually be fixed by a solution to #161

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant