Skip to content

Commit

Permalink
metric conditioned on multi
Browse files Browse the repository at this point in the history
  • Loading branch information
gtarpenning committed Aug 1, 2023
1 parent 2487be2 commit 312de6e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jobs/sweep_schedulers/optuna_scheduler/optuna_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,10 @@ def _get_run_history(self, run_id: str) -> List[int]:
history = api_run.scan_history(keys=names + ["_step"])
metrics = []
for log in history:
metrics += [tuple(log.get(key) for key in names)]
if self.is_multi_objective:
metrics += [tuple(log.get(key) for key in names)]
else:
metrics += [log.get(names[0])]

if len(metrics) == 0 and api_run.lastHistoryStep > -1:
logger.debug("No metrics, but lastHistoryStep exists")
Expand Down

0 comments on commit 312de6e

Please sign in to comment.