Refactor optimizer wrappers
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 270
- Forks
- 123
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 3
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests. Start by locating the parent optimizer-wrapper class and its optimizer-specific subclasses, then compare their parameter setup, communication, and solution-creation paths. Done means shared behavior is handled by the parent call, optimizer-specific work remains in subclass hooks, and class attributes are initialized through the class structure with less duplication.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100