From d4030466d0366f1dbaf34729a7e315d978e8ec39 Mon Sep 17 00:00:00 2001 From: IlyasMoutawwakil Date: Wed, 15 Nov 2023 05:32:39 +0100 Subject: [PATCH] fix gather --- optimum_benchmark/aggregators/gather.py | 2 -- optimum_benchmark/report.py | 13 ++++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/optimum_benchmark/aggregators/gather.py b/optimum_benchmark/aggregators/gather.py index b258d4e7..144b0edb 100644 --- a/optimum_benchmark/aggregators/gather.py +++ b/optimum_benchmark/aggregators/gather.py @@ -27,8 +27,6 @@ def gather(root_folders: List[Path]) -> pd.DataFrame: if (len(results_dfs) == 0) or (len(configs_dfs) == 0): raise ValueError(f"No results found in {root_folder}") - elif len(results_dfs) != len(configs_dfs): - raise ValueError(f"Results and configs do not match in {root_folder}") # Merge inference and config dataframes full_dfs = {} diff --git a/optimum_benchmark/report.py b/optimum_benchmark/report.py index a5ac11a4..26c2b9f8 100644 --- a/optimum_benchmark/report.py +++ b/optimum_benchmark/report.py @@ -1,10 +1,5 @@ import sys -from .aggregators.display import display_cli -from .aggregators.gather import gather_cli -from .aggregators.plot import plot_cli -from .aggregators.summarize import summarize_cli - HELP = """ Usage: optimum-report Actions: @@ -24,12 +19,20 @@ def main(): sys.argv = sys.argv[1:] if action == "gather": + from .aggregators.gather import gather_cli + gather_cli() elif action == "display": + from .aggregators.display import display_cli + display_cli() elif action == "summarize": + from .aggregators.summarize import summarize_cli + summarize_cli() elif action == "plot": + from .aggregators.plot import plot_cli + plot_cli() elif action in ["-h", "--help"]: print(HELP)