-
Notifications
You must be signed in to change notification settings - Fork 19
468 ABM parameter study #1395
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
base: main
Are you sure you want to change the base?
468 ABM parameter study #1395
Conversation
…nto abm-parameter-study
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1395 +/- ##
==========================================
+ Coverage 97.25% 97.27% +0.02%
==========================================
Files 176 182 +6
Lines 15466 15652 +186
==========================================
+ Hits 15041 15226 +185
- Misses 425 426 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
this allows deduction of template arguments from the constructor, making the make_parameter_study functions obsolete. the simulation type is now deduced from the create_simulation argument, and checks on invocability have been moved to clean up deduced types. Add documentation.
Co-authored-by: annawendler <106674756+annawendler@users.noreply.github.com>
Co-authored-by: annawendler <106674756+annawendler@users.noreply.github.com>
MaxBetzDLR
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.
Changes for documentation of python bindings
| */ | ||
| template <class Simulation> | ||
| template <class Sim> | ||
| void bind_ParameterStudy(py::module_& m, std::string const& name) |
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.
I would move bind_ParameterStudy into a generic binding function (like bind_CoompartmentalModel), that returns the binding object. And then move the model specific definitions of run[...] functions into the model namespace. So you could call '.def(...)' on the return of bind_ParameterStudy.
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.
But I keep the graph parameter and sim types for now, right?
| pymio::bind_class<StudyT, pymio::EnablePickling::Never>(m, name.c_str()) | ||
| .def(py::init<const ParametersT&, double, double, double, size_t>(), py::arg("parameters"), py::arg("t0"), | ||
| py::arg("tmax"), py::arg("dt"), py::arg("num_runs")) | ||
| .def_property_readonly("num_runs", &StudyT::get_num_runs) |
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 py::arg() and strings as documentation. Documentation especially for the functions that should be called by the user.
| [](mio::ParameterStudy<double, Simulation>& self) { //default argument doesn't seem to work with functions | ||
| return self.run([](auto&& g) { | ||
| return draw_sample(g); | ||
| [&create_simulation](StudyT& self) { //default argument doesn't seem to work with functions |
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.
What is this comment of default arguments about?
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.
I think it references the fact that the cpp run function (now run_serial) has a default value for one of its arguments, that is a function type.
Changes and Information
Please briefly list the changes (main added features, changed items, or corrected bugs) made:
If need be, add additional information and what the reviewer should look out for in particular:
Merge Request - Guideline Checklist
Please check our git workflow. Use the draft feature if the Pull Request is not yet ready to review.
Checks by code author
Checks by code reviewer(s)