diff --git a/benchmark/ResultsBase.py b/benchmark/ResultsBase.py index 94add18..708f38a 100644 --- a/benchmark/ResultsBase.py +++ b/benchmark/ResultsBase.py @@ -149,9 +149,11 @@ class BaseReport(abc.ABC): class StubReport(BaseReport): - def __init__(self, file_name): - self.compare = False + def __init__(self, file_name, compare=False): + self.compare = compare super().__init__(file_name=file_name, best_file=False) + if self.compare: + self._load_best_results(self.score_name, self.data["model"]) def print_line(self, line) -> None: pass diff --git a/benchmark/scripts/be_flask.py b/benchmark/scripts/be_flask.py index e42342e..fc639b7 100755 --- a/benchmark/scripts/be_flask.py +++ b/benchmark/scripts/be_flask.py @@ -20,7 +20,9 @@ TEST = "test" def process_data(file_name, data): - report = StubReport(os.path.join(Folders.results, file_name)) + report = StubReport( + os.path.join(Folders.results, file_name), compare=app.config[COMPARE] + ) new_list = [] for result in data["results"]: symbol = report._compute_status(result["dataset"], result["score"]) @@ -116,8 +118,7 @@ def config(framework): def main(args_test=None): arguments = Arguments(prog="be_flask") - arguments.xset("model", required=False) - arguments.xset("score", required=False).xset("compare") + arguments.xset("compare") args = arguments.parse(args_test) config = EnvData().load() app.config[FRAMEWORK] = config[FRAMEWORK] diff --git a/benchmark/scripts/templates/partials/table_select_design.html b/benchmark/scripts/templates/partials/table_select_design.html index 7d6b5fb..6c01aae 100644 --- a/benchmark/scripts/templates/partials/table_select_design.html +++ b/benchmark/scripts/templates/partials/table_select_design.html @@ -1,7 +1,16 @@