-
Notifications
You must be signed in to change notification settings - Fork 282
Implement the join_inputs_design into the current SDA workflows.
#3634
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
Conversation
mdietze
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, this provides an immediate fix, but really you should be passing in the new input_design object too, not just the new ensemble.size variable. That change is needed to get the desired result of sampling jointly once at the start of the SDA and then keeping that design as the SDA iterates.
mdietze
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checked are was reminded that input_design is now the first argument to write.ensemble.configs and it's not optional, so adding that fix is actually required in this PR, not just a good next step for a future PR.
pecan/modules/uncertainty/R/ensemble.R
Line 228 in ccc5135
| write.ensemble.configs <- function(input_design , ensemble.size, defaults, ensemble.samples, settings, model, |
I'd recommend that you add a call to modules/uncertainty/R/generate_joint_ensemble_design once in your code early on, that you save the design to restart, and that you read that design during restart rather than generating a new one (i.e., that if you have an "if restart" option, then the input_design is generated in the
"else")
join_inputs_design into the current SDA workflows.
| TimeseriesPlot = FALSE, | ||
| debug = FALSE, | ||
| pause = FALSE, | ||
| Profiling = FALSE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed unnecessary flags.
| control=list(TimeseriesPlot = FALSE, | ||
| OutlierDetection=FALSE, | ||
| parallel_qsub = TRUE, | ||
| parallel_qsub = FALSE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set the parallel_qsub as FALSE because we can't use both local and remote qsub for the model execution.
| run_parallel = TRUE, | ||
| MCMC.args = NULL), | ||
| MCMC.args = NULL, | ||
| local.execution = TRUE), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the local.execution when we just want to run the jobs locally.
| #' @param pre_enkf_params Used for passing pre-existing time-series of process error into the current SDA runs to ignore the impact by the differences between process errors. | ||
| #' @param ensemble.samples Pass ensemble.samples from outside to avoid GitHub check issues. | ||
| #' @param ensemble.samples list of ensemble parameters across PFTs. Default is NULL. | ||
| #' @param control List of flags controlling the behavior of the SDA. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be easier to read as a bulleted list -- consider making this line be something like @param control List of flags controlling the behavior of the SDA. See details, then moving all the flag descriptions on lines 22-34 into their own section of the details?
Merge branch 'develop' of https://github.com/PecanProject/pecan into SDA_data # Conflicts: # modules/uncertainty/R/ensemble.R
| } | ||
|
|
||
| # Sample parameters if we don't have it. | ||
| if (is.null(ensemble_samples)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It needs to be detected a different way, but this function is still the one responsible for running get.parameter.samples if there's not already a samples.Rdata
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
| sobol_obj <- sensitivity::soboljansen(model = NULL, X1 = X1, X2 = X2) | ||
| return(sobol_obj) | ||
| } | ||
| # This ensures that regardless of whether the sobol or non-sobol version is called |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment seems useful, not sure why it was removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted.
f31ab1f
Description
Motivation and Context
Review Time Estimate
Types of changes
Checklist: