The problem occurs when one of the trial.index is not present in history["trial_index"].
In practical cases, I have observed this happening only for the last item in history["trial_index"], differing from the last item in [trial.index for trial in trials].
The problem resolves automatically when the optimas run is finished or another history checkpoint is reached without this issue.
Sometimes, when optimas is still running, opening the current history file from
ExplorationDiagnostics
fails.I have tracked the error to this line: https://github.com/optimas-org/optimas/blob/9490ea379fcc2b0457177937f3c6de03402a813b/optimas/generators/base.py#L296
The problem occurs when one of the
trial.index
is not present inhistory["trial_index"]
. In practical cases, I have observed this happening only for the last item inhistory["trial_index"]
, differing from the last item in[trial.index for trial in trials]
.The problem resolves automatically when the optimas run is finished or another history checkpoint is reached without this issue.