From fbd31d215fbe69d1801c38e21ab2048881d6e174 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 9 Feb 2026 23:53:00 +0000 Subject: [PATCH 1/5] Initial plan From 1d3b0deff3607b27acfdbafd9b455db4f0f10cb1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 9 Feb 2026 23:55:35 +0000 Subject: [PATCH 2/5] refactor: remove rich usage and replace with plain Python printing Co-authored-by: Ki-Seki <60967965+Ki-Seki@users.noreply.github.com> --- pyproject.toml | 1 - src/gimbench/match/evaluators.py | 48 ++++++++++++++++---------------- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6d95637..ff1f18f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,6 @@ requires-python = ">=3.10" dependencies = [ "datasets>=4.4.1", "gimkit>=0.1.1", - "rich>=14.2.0", "vllm>=0.14.0", ] diff --git a/src/gimbench/match/evaluators.py b/src/gimbench/match/evaluators.py index 7ace6fa..e7ba52c 100644 --- a/src/gimbench/match/evaluators.py +++ b/src/gimbench/match/evaluators.py @@ -136,42 +136,42 @@ def evaluate(self) -> EvalResult: @staticmethod def print_beautiful_stats(eval_results: EvalResult) -> None: - from rich.console import Console - from rich.panel import Panel - from rich.table import Table - from rich.text import Text - - console = Console() - args = eval_results.args - info_text = Text.from_markup( - f"[bold]Model:[/bold] [cyan]{args.model_name}[/cyan] " - f"[bold]GIM Prompt:[/bold] [green]{args.use_gim_prompt}[/green] " - f"[bold]Output Type:[/bold] [magenta]{args.output_type}[/magenta]" - ) - console.print(Panel(info_text, title="Run Arguments", border_style="blue", expand=False)) - - table = Table() - table.add_column("Tags", justify="right", style="magenta") - table.add_column("Predicted", justify="right", style="green") - table.add_column("Regex", justify="right", style="blue") - table.add_column("Matched", justify="right", style="yellow") - table.add_column("Prediction Rate", justify="right", style="green") - table.add_column("Match Rate", justify="right", style="yellow") + + # Print run arguments panel + print("\n" + "=" * 80) + print("Run Arguments".center(80)) + print("=" * 80) + print(f"Model: {args.model_name}") + print(f"GIM Prompt: {args.use_gim_prompt}") + print(f"Output Type: {args.output_type}") + print("=" * 80 + "\n") + + # Print table header + headers = ["Tags", "Predicted", "Regex", "Matched", "Prediction Rate", "Match Rate"] + col_widths = [10, 10, 10, 10, 17, 17] + header_line = " | ".join(h.rjust(w) for h, w in zip(headers, col_widths, strict=True)) + separator = "-+-".join("-" * w for w in col_widths) + + print(header_line) + print(separator) + + # Print table rows for result in eval_results.evaled_items: pred_rate = f"{result.num_has_prediction / result.num_tags:.2%}" if result.num_tags > 0 else "N/A" match_rate = f"{result.num_regex_match / result.num_regex:.2%}" if result.num_regex > 0 else "N/A" - table.add_row( + row = [ str(result.num_tags), str(result.num_has_prediction), str(result.num_regex), str(result.num_regex_match), pred_rate, match_rate, - ) + ] + print(" | ".join(val.rjust(w) for val, w in zip(row, col_widths, strict=True))) - console.print(table) + print() def conduct_eval(args: Namespace, dataset: Dataset): From 7d71a4917d25460ff964db6f941e9344e4be7f87 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Feb 2026 00:08:54 +0000 Subject: [PATCH 3/5] refactor: remove print_beautiful_stats method entirely Co-authored-by: Ki-Seki <60967965+Ki-Seki@users.noreply.github.com> --- src/gimbench/match/evaluators.py | 41 -------------------------------- 1 file changed, 41 deletions(-) diff --git a/src/gimbench/match/evaluators.py b/src/gimbench/match/evaluators.py index e7ba52c..1a4ff52 100644 --- a/src/gimbench/match/evaluators.py +++ b/src/gimbench/match/evaluators.py @@ -134,48 +134,7 @@ def evaluate(self) -> EvalResult: evaled_items=evaled_items, ) - @staticmethod - def print_beautiful_stats(eval_results: EvalResult) -> None: - args = eval_results.args - - # Print run arguments panel - print("\n" + "=" * 80) - print("Run Arguments".center(80)) - print("=" * 80) - print(f"Model: {args.model_name}") - print(f"GIM Prompt: {args.use_gim_prompt}") - print(f"Output Type: {args.output_type}") - print("=" * 80 + "\n") - - # Print table header - headers = ["Tags", "Predicted", "Regex", "Matched", "Prediction Rate", "Match Rate"] - col_widths = [10, 10, 10, 10, 17, 17] - header_line = " | ".join(h.rjust(w) for h, w in zip(headers, col_widths, strict=True)) - separator = "-+-".join("-" * w for w in col_widths) - - print(header_line) - print(separator) - - # Print table rows - for result in eval_results.evaled_items: - pred_rate = f"{result.num_has_prediction / result.num_tags:.2%}" if result.num_tags > 0 else "N/A" - match_rate = f"{result.num_regex_match / result.num_regex:.2%}" if result.num_regex > 0 else "N/A" - - row = [ - str(result.num_tags), - str(result.num_has_prediction), - str(result.num_regex), - str(result.num_regex_match), - pred_rate, - match_rate, - ] - print(" | ".join(val.rjust(w) for val, w in zip(row, col_widths, strict=True))) - - print() - - def conduct_eval(args: Namespace, dataset: Dataset): evaluator = MatchEvaluator(args, dataset) eval_results = evaluator.evaluate() - MatchEvaluator.print_beautiful_stats(eval_results) eval_results.dump() From 44e9019dc334f837dda638d7c3630ee36fa4e1bb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 10 Feb 2026 00:30:49 +0000 Subject: [PATCH 4/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/gimbench/match/evaluators.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gimbench/match/evaluators.py b/src/gimbench/match/evaluators.py index 1a4ff52..a87ae27 100644 --- a/src/gimbench/match/evaluators.py +++ b/src/gimbench/match/evaluators.py @@ -134,6 +134,7 @@ def evaluate(self) -> EvalResult: evaled_items=evaled_items, ) + def conduct_eval(args: Namespace, dataset: Dataset): evaluator = MatchEvaluator(args, dataset) eval_results = evaluator.evaluate() From 8bfc77cacd44d1512eac4aabb60a468caa1bf9c3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Feb 2026 00:33:51 +0000 Subject: [PATCH 5/5] chore: update uv.lock after removing rich dependency Co-authored-by: Ki-Seki <60967965+Ki-Seki@users.noreply.github.com> --- uv.lock | 2 -- 1 file changed, 2 deletions(-) diff --git a/uv.lock b/uv.lock index 5636919..c1151c4 100644 --- a/uv.lock +++ b/uv.lock @@ -1324,7 +1324,6 @@ source = { editable = "." } dependencies = [ { name = "datasets" }, { name = "gimkit" }, - { name = "rich" }, { name = "vllm" }, ] @@ -1339,7 +1338,6 @@ dev = [ requires-dist = [ { name = "datasets", specifier = ">=4.4.1" }, { name = "gimkit", specifier = ">=0.1.1" }, - { name = "rich", specifier = ">=14.2.0" }, { name = "vllm", specifier = ">=0.14.0" }, ]