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

Add UQ parameter reading / writing functionality #162

Merged
merged 5 commits into from
May 26, 2022

Conversation

bielim
Copy link
Contributor

@bielim bielim commented May 18, 2022

This code adds the module UQParameters.jl, which provides functionality for reading UQ parameters from .toml files and writing them back to .toml files. It also allows for convenient writing of EKP parameter ensembles. The code used to live in CLIMAParameters but was moved here due to its dependency on EnsembleKalmanProcesses.jl.

The discussion on whether or not the use of eval should be permitted has been postponed to a potential future PR. eval is currently not used in the code due to the security leak it introduces, but its use would make the code in its current form as well as its maintenance in the future considerably simpler.

This introduces dependencies on CLIMAParameters and TOML.
@odunbar
Copy link
Collaborator

odunbar commented May 18, 2022

Awesome, thanks @bielim
I think before merge there are a couple of important things to do

  1. use the latest changes to CLIMAParameters/src/file_parsing.jl as a guide to help improve the interface
  2. remove the idea of "defaults" as for calibration we only care about the parameters in this file. This will allow us to remove dependency on CLIMAParameters

Copy link
Collaborator

@odunbar odunbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having now gone through it now, there seems little to do here. as the CP dependence doesn't actually get used in the code.

Project.toml Outdated Show resolved Hide resolved
src/file_parsing_uq.jl Show resolved Hide resolved
test/UQ_Parameters/runtests.jl Outdated Show resolved Hide resolved
Co-authored-by: Charles Kawczynski <[email protected]>
Melanie added 2 commits May 18, 2022 16:49
- Turn `file_parsing_uq.jl` into module `UQParameters.jl`
- Remove `CLIMAParameters.jl` dependency
- Fix some indentations and other minor cosmetic issues
@bielim
Copy link
Contributor Author

bielim commented May 23, 2022

bors r+

bors bot added a commit that referenced this pull request May 23, 2022
162: Add UQ parameter reading / writing functionality r=bielim a=bielim

This code adds the module `UQParameters.jl`, which provides functionality for reading UQ parameters from `.toml` files and writing them back to `.toml` files. It also allows for convenient writing of EKP parameter ensembles. The code used to live in `CLIMAParameters` but was moved here due to its dependency on `EnsembleKalmanProcesses.jl`. 

The discussion on whether or not the use of `eval` should be permitted has been postponed to a potential future PR. `eval` is currently not used in the code due to the security leak it introduces, but its use would make the code in its current form as well as its maintenance in the future considerably simpler. 

Co-authored-by: Melanie <[email protected]>
Co-authored-by: bielim <[email protected]>
@bors
Copy link
Contributor

bors bot commented May 23, 2022

Build failed:

@bielim
Copy link
Contributor Author

bielim commented May 26, 2022

bors r+

@bors
Copy link
Contributor

bors bot commented May 26, 2022

Build succeeded:

@bors bors bot merged commit 10c2d3f into main May 26, 2022
@bors bors bot deleted the mb/add_UQ_parameter_parsing_and_writing branch May 26, 2022 22:54
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

Successfully merging this pull request may close these issues.

3 participants