Skip to content

Commit

Permalink
SacessOptimizer: avoid FileNotFoundError if run with ridiculously low…
Browse files Browse the repository at this point in the history
… walltime limit (#1177)

It was possible that SacessOptimizer would quit before even starting the first
iteration if a tiny walltime limit is set. This led to a FileNotFoundError when
trying to collect the temporary results. Fixed here by starting at least one
iteration.

Closes #1172
  • Loading branch information
dweindl authored Nov 17, 2023
1 parent f944d3c commit c951d17
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pypesto/optimize/ess/sacess.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,8 @@ def run(
i_iter = 0
ess_results = pypesto.Result(problem=problem)

while self._keep_going():
# run ESS until exit criteria are met, but start at least one iteration
while self._keep_going() or i_iter == 0:
# run standard ESS
ess, cur_ess_results = self._run_ess(
refset=refset,
Expand Down

0 comments on commit c951d17

Please sign in to comment.