Skip to content

Commit

Permalink
Comment some potentially to-be-removed code
Browse files Browse the repository at this point in the history
  • Loading branch information
yngve-sk committed Nov 18, 2024
1 parent d9acf08 commit e235ced
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/everest/everest_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,11 @@ def _handle_finished_batch_event(self, event: Event):
convert_to_maximize(result) for result in event.results
)
results: List[FunctionResults | GradientResults] = []

# Q: Maybe this whole clause can be removed?
# Not sure why it is there, putting the best function result first
# +-----------------------------------------------------------------+
# | |
best_value = -np.inf
best_results = None
for item in converted_results:
Expand All @@ -680,6 +685,8 @@ def _handle_finished_batch_event(self, event: Event):

if best_results is not None:
results = [best_results, *results]
# | |
# +-----------------------------------------------------------------+
last_batch = -1

_batches = {}
Expand Down

0 comments on commit e235ced

Please sign in to comment.