Updating usage to to_yaml to fix some structured config bugs #400
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Details
In trying to store configurations into the
MephistoDB
for future use, we had been usingOmegaConf.to_container
which seems to not preserve all of the behaviors that are ideal for nested structured configs (in reconstruction). This PR changes to useto_yaml
. This change should not effect previously saved runs, as both the results ofto_container
andto_yaml
are valid parameters for the laterOmegaConf.create()
call.Following discussion in #399, this also removes the
resolve
portion of writing out the configuration, as downstream tasks may want the interpolation and there's no real risk for us including them. We retain storing the yaml rather than using pickles (and getting type safety) as configuration signatures for specific tasks may change over time, and we want the old ones to be properly loadable/examinable.@ytsheng please see if this resolves the issue you were having in your setup.
Testing
Unit testing