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

ESSOptimizer: allow passing an optimizer factory #1181

Merged
merged 3 commits into from
Nov 17, 2023

Conversation

dweindl
Copy link
Member

@dweindl dweindl commented Nov 17, 2023

Allow passing a optimizer factory to ESSOptimizer so that overall ESS walltime and function evaluation limits can be respected by the local optimizer.

Allow passing a optimizer factory to ESSOptimizer
so that overall ESS walltime and function evaluation limits
can be respected by the local optimizer.
@codecov-commenter
Copy link

codecov-commenter commented Nov 17, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (4507747) 81.60% compared to head (6ce511c) 81.59%.

Files Patch % Lines
pypesto/optimize/ess/ess.py 84.61% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1181      +/-   ##
===========================================
- Coverage    81.60%   81.59%   -0.02%     
===========================================
  Files          148      148              
  Lines        11704    11713       +9     
===========================================
+ Hits          9551     9557       +6     
- Misses        2153     2156       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@PaulJonasJost PaulJonasJost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Should we add checks for the optimisers, whether they support wall time?

@dweindl
Copy link
Member Author

dweindl commented Nov 17, 2023

Looks good to me. Should we add checks for the optimisers, whether they support wall time?

I had similar thoughts. For this application I went for passing a callable where the user needs to see whether/how a given optimizer can handle those constraints. That works. If there are more use cases, one could think about adding Optimizer.set_maxtime, Optimizer.set_maxiter, .... to have a common interface for common options. Not sure, though, how much that would be used.

@dweindl dweindl merged commit 4eaeb12 into ICB-DCM:develop Nov 17, 2023
17 of 18 checks passed
@dweindl dweindl deleted the ess_optimizer_factory branch November 17, 2023 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants