From ccb0745ebafa38ec5271937345968cab798015c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rapin?= Date: Mon, 26 Apr 2021 15:41:24 +0200 Subject: [PATCH] Record number of objectives (#1111) --- nevergrad/benchmark/test_xpbase.py | 1 + nevergrad/benchmark/xpbase.py | 1 + 2 files changed, 2 insertions(+) diff --git a/nevergrad/benchmark/test_xpbase.py b/nevergrad/benchmark/test_xpbase.py index 7fad8b948..060817098 100644 --- a/nevergrad/benchmark/test_xpbase.py +++ b/nevergrad/benchmark/test_xpbase.py @@ -25,6 +25,7 @@ "optimizer_name", "pseudotime", "num_workers", + "num_objectives", "budget", "error", "batch_mode", diff --git a/nevergrad/benchmark/xpbase.py b/nevergrad/benchmark/xpbase.py index bd670974f..618cd526a 100644 --- a/nevergrad/benchmark/xpbase.py +++ b/nevergrad/benchmark/xpbase.py @@ -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: