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

Refactor optimizer wrappers #220

Open
ewu63 opened this issue Mar 20, 2021 · 0 comments
Open

Refactor optimizer wrappers #220

ewu63 opened this issue Mar 20, 2021 · 0 comments
Labels
maintenance This is for maintaining the repo

Comments

@ewu63
Copy link
Collaborator

ewu63 commented Mar 20, 2021

Description of feature

There is a ton of shared code between different optimizer wrappers:

  • setting up the parameters
  • comm splitting and bcast after
  • creating the solution after

There are also tons of class attributes which are set by each optimizer without using the class structure properly. All these can be reorganized with significantly less code duplication.

Potential solution

  • Create a __call__ function in the parent class, which does the shared stuff:
    • This can call optimizer-specific functions which does the actual work (generating inputs, calling the optimizer, etc.)
  • In the init, properly set the class attributes.
@ewu63 ewu63 added the maintenance This is for maintaining the repo label Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance This is for maintaining the repo
Projects
None yet
Development

No branches or pull requests

1 participant