-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/add solution updater patience #36
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
Feature/add solution updater patience #36
Conversation
src/services/solution_updater_service/core/service/solution_updater_service.py
Outdated
Show resolved
Hide resolved
dJaniga
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.
Thanks Marcin for doing this implementation!
There are some suggestion which in my option will improve code readability and maintenance. Let's have discussion and challenge my point of view :)
src/orchestration/risk_management_service/core/service/risk_management_service.py
Show resolved
Hide resolved
src/services/solution_updater_service/core/service/solution_updater_service.py
Outdated
Show resolved
Hide resolved
src/orchestration/risk_management_service/core/service/risk_management_service.py
Outdated
Show resolved
Hide resolved
src/orchestration/risk_management_service/core/service/risk_management_service.py
Outdated
Show resolved
Hide resolved
src/services/solution_updater_service/core/service/solution_updater_service.py
Outdated
Show resolved
Hide resolved
src/services/solution_updater_service/core/service/solution_updater_service.py
Outdated
Show resolved
Hide resolved
src/services/solution_updater_service/core/service/solution_updater_service.py
Show resolved
Hide resolved
dJaniga
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.
@MarcinStolarczyk01 2 small comments and ready to go :)
src/services/solution_updater_service/core/service/solution_updater_service.py
Outdated
Show resolved
Hide resolved
Introduced the `patience` parameter in `SolutionUpdaterService` and associated tests to enhance optimization control. Replaced unnecessary convergence check logic and ensured proper comparison handling for `None` values in the optimization loop. This improves flexibility and robustness of the solution updater process.
Add patience parameter to stop optimization after stagnation
Description
This PR extends SolutionUpdater by a "patience" parameter which defines how many iterations with the same best results in a row will stop optimization loop.
Type of Change:
Issue Solution updater should terminate when candidates converge to value and stale for P iteration #25
How Has This Been Tested?
Describe the tests that you ran to verify your changes. Include details on the testing environment, test cases, and any relevant configurations. If applicable, provide steps to reproduce the testing process.
We encourage you to keep the code coverage percentage at 90% and above.
have not been included
Testing Environment:
If your PR includes UI changes or modifications to the command-line interface (CLI), provide before and after screenshots.
Checklist
Ensure that all the following tasks are completed before submitting your PR:
requirements.txtorpyproject.tomlhas been updated accordingly.