Support walltime limit in ScipyOptimizer#1671
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1671 +/- ##
===========================================
- Coverage 84.34% 84.31% -0.03%
===========================================
Files 164 164
Lines 14320 14334 +14
===========================================
+ Hits 12078 12086 +8
- Misses 2242 2248 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b34d3cf to
dbabf08
Compare
SciPy optimizers don't support wall time limits directly. However, this can be achieved through callbacks. This is done here.
dbabf08 to
07a89a3
Compare
PaulJonasJost
left a comment
There was a problem hiding this comment.
Thats an amazing workaround, never thought about it 🙈 thanks 🙏🏼
| def fun(x): | ||
| import time | ||
|
|
||
| time.sleep(0.1) |
There was a problem hiding this comment.
Why is 0.1 enough? I would have thought 1.0 is necessary, similar to set_maxtime?
There was a problem hiding this comment.
It's less than the wall time limit to at least allow for some function evaluations. In my tests, it's still sufficiently long to not converge within the wall time limit.
SciPy optimizers don't support wall time limits directly. However, this can be achieved through callbacks. This is done here.