-
Notifications
You must be signed in to change notification settings - Fork 14
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
Improve handling of failed evaluations #154
Conversation
…g/optimas into feature/failed_trials
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…g/optimas into feature/failed_trials
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…g/optimas into feature/failed_trials
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…g/optimas into feature/failed_trials
Thanks for this PR @AngelFP. Could you fix the conflicts with the |
Good you noticed that. Conflicts solved :) |
# is changed to the exploration directory after the call to `libE`. | ||
# As a workaround, the cwd is stored and then set again at the end of | ||
# `run`. | ||
cwd = os.getcwd() |
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.
Should we bring this up to the libEnsemble
team?
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.
Good point. I opened a new issue Libensemble/libensemble#1244
Addresses #143, #144.
This PR adds a status parameter to
Trial
, which can be eitherCANDIDATE
,RUNNING
,COMPLETED
orFAILED
. This status is also used to informAx
of whether a trial has failed, so that it can be properly handled by the surrogate model. Failed trials in the Ax Service generators can be labeled asFAILED
orABANDONED
, where the latter implies that the failed trial will not be suggested again. This behavior is controlled by the new parameterabandon_failed_trials
(True
by default).With the proposed implementation, trials will be considered as failed if any of these two conditions are met:
TemplateEvaluator
.NaN
for the value of any of the objectives. This applies to all evaluators.Case 2 includes the case in which the evaluation or analysis function failed to provide a value of the objective. Previously, this would result in the objective being returned with
0
as value, which could confuse the optimizer.Changes
TrialStatus
class.status
property toTrial
and other related methods.trial_status
tohistory
.NaN
s.FAILED
trials in the Ax generators. By default they are set asABANDONED
so that they are not suggested again. This behavior can be controlled with theabandon_failed_trials
argument.sim_specs["out"]
.completed
andevaluated
trials. Anevaluated
trial is one whose evaluation has completed or failed.cwd
to change when running with threading comms.