-
Notifications
You must be signed in to change notification settings - Fork 47
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
Refactor callable lookup mechanism #441
Conversation
2ec5add
to
531e029
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.
I in general like the new approach. However, I am a bit puzzled by the amount of deleted examples.
The callable now operates with dataframe input/output, replacing the positional indexing approach with a clean label-based approach using parameter and target names.
Will be replaced with a proper one showing the difference between single target, desirability, and Pareto optimization.
The current version provides minimal additional insights compared to what is already presented in `custom_analytical.py`. Instead of just reiterating the same logic, it should rather compare different hybrid optimizers. For now, it is dropped because refactoring is not worth it.
814cb61
to
3bedbc3
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.
Like it a lot. Some things could still be improved though :)
Co-authored-by: Martin Fitzner <17951239+Scienfitz@users.noreply.github.com>
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.
Approve to unblock in case you want to get this done over the holidays
6a7d0ca
to
21f611c
Compare
* Rename filter argument to to_keep * Make target dataframe positional-only * Revise docstring
21f611c
to
a6cc05a
Compare
This PR refactors the callable lookup mechanism in the simulation module, fixing one of the major limitations of the module and preparing it for multi-target simulation.
In particular:
arrays_to_dataframes
decorator utility has been added that allows to conveniently construct such callables from array-based onescustom_analytical
example has been renamed tocustom_blackbox
and was rewritten from scratch, using the new approach and fixing the existing issues.filter_df
function has been fixed such that it now correctly handles the edge case of an empty filter.