-
Notifications
You must be signed in to change notification settings - Fork 18
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 save_parameter_samples
#370
Conversation
ed605e2
to
d6d2374
Compare
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.
Hi @nefrathenrici
Just a couple of small points to address then merge away
LGTM!
src/TOMLInterface.jl
Outdated
default_param_data::Dict, | ||
save_path, | ||
save_file; | ||
pad_zeros = 3, |
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.
Is there a reason we hard-code this to 3?
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.
No, I set it to be an optional keyword argument.
src/TOMLInterface.jl
Outdated
- rng - The random number generator used in sampling | ||
""" | ||
function save_parameter_samples( | ||
distribution::ParameterDistribution{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.
This function would work with any distribution right? It doesn't need to be a Samples
-type?
Unless there is a reason to restrict to this, we could allow others
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.
As long as sample
is defined for the given distribution, it would work. I will remove the type constraint!
This adds a function
save_parameter_samples
which takes samples from the given Samples distribution and saves them to individual TOML files for use in model runs.