Skip to content

Commit

Permalink
Record number of objectives (#1111)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrapin authored Apr 26, 2021
1 parent c4daab5 commit ccb0745
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions nevergrad/benchmark/test_xpbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"optimizer_name",
"pseudotime",
"num_workers",
"num_objectives",
"budget",
"error",
"batch_mode",
Expand Down
1 change: 1 addition & 0 deletions nevergrad/benchmark/xpbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ def _log_results(self, pfunc: fbase.ExperimentFunction, t0: float, num_calls: in
assert opt is not None
# ExperimentFunction can directly override this evaluation function if need be
# (pareto_front returns only the recommendation in singleobjective)
self.result["num_objectives"] = opt.num_objectives
self.result["loss"] = pfunc.evaluation_function(*opt.pareto_front())
self.result["elapsed_budget"] = num_calls
if num_calls > self.optimsettings.budget:
Expand Down

0 comments on commit ccb0745

Please sign in to comment.