From 2139f5f43a71327edf2615e9f5f63adaab2a5db1 Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 17 Mar 2021 15:14:33 +1000 Subject: [PATCH] Pad scores for missing results when combining --- benchbot_eval/evaluator.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/benchbot_eval/evaluator.py b/benchbot_eval/evaluator.py index 80931d9..73a40e5 100644 --- a/benchbot_eval/evaluator.py +++ b/benchbot_eval/evaluator.py @@ -84,6 +84,10 @@ def evaluate(self): # Amalgamate all of the produced scores if supported by evaluation # method if 'combine' in self.evaluate_fns: + if self.required_envs is not None: + missing_count = len(self.required_envs) - len(scores_data) + if missing_count > 0: + scores_data = scores_data + [{}] * missing_count scores = self.evaluate_fns['combine'](scores_data) print("\nFinal scores for the '%s' task:\n" % (scores['task_details']['name']