Conversation
…e strategies in EgorConfig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a major refactor to the EGO optimizer configuration and internal logic, focusing on extensibility and code clarity. The most significant changes are the replacement of hardcoded TREGO and CoEGO configurations with flexible strategy patterns for both iteration (e.g., standard EGO vs. TREGO) and variable activity (e.g., full vs. cooperative/CoEGO). This enables cleaner code, easier customization, and future extensibility. Additionally, related documentation and examples have been updated to reflect these changes.
Key changes:
1. Strategy Pattern for Optimizer Configuration
Introduced
IterationStrategy(withStandardEgoStrategy,TregoStrategy) andActivityStrategy(withFullActivity,CooperativeActivity) traits, replacing the previousTregoConfigandCoegoConfigstructs. Configuration now uses boxed trait objects, providing extensibility and cleaner separation of concerns. [1] [2] [3] [4] [5] [6]Updated
EgorConfigandValidEgorConfigto use these new strategies, removing direct fields for TREGO and CoEGO configuration. [1] [2]2. Cooperative Activity (CoEGO) Refactor
Moved the logic for generating variable activity groups for CoEGO into the new
CooperativeActivitystrategy, removing the previous methods from the solver. This centralizes and clarifies how variable grouping is handled. [1] [2] [3] [4]Adjusted tests to use the new
CooperativeActivitydirectly, simplifying test code and improving clarity. [1] [2]3. Documentation and Example Updates
TregoStrategyandCooperativeActivityin practice. [1] [2] [3]4. API Simplification and Cleanup
5. Minor Usability Improvements
run_egor) to use the new.trego(true)method, aligning with the updated API.These changes modernize the configuration and internal logic of the EGO optimizer, making it more modular, maintainable, and user-friendly.