From ecf24139e9c095551989ac96d13d3e4895f913bb Mon Sep 17 00:00:00 2001 From: Samuel Monson Date: Wed, 25 Jun 2025 12:04:17 -0400 Subject: [PATCH 1/4] Lock click to pre 8.2 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a78b1fc5..cfecc4c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ keywords = [ "vllm", ] dependencies = [ - "click", + "click>=8.0.0,<8.2.0", "datasets", "ftfy>=6.0.0", "httpx[http2]<1.0.0", From 23376b1c181353bb85184c83673ebdb4d632741d Mon Sep 17 00:00:00 2001 From: Samuel Monson Date: Wed, 25 Jun 2025 12:04:55 -0400 Subject: [PATCH 2/4] Drop deprecated types-click --- .pre-commit-config.yaml | 1 - pyproject.toml | 1 - 2 files changed, 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8d6bbf2e..f60d0673 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -42,7 +42,6 @@ repos: pydantic_settings, # types - types-click, types-PyYAML, types-requests, types-toml, diff --git a/pyproject.toml b/pyproject.toml index cfecc4c1..ad5ce1ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -91,7 +91,6 @@ dev = [ "mdformat-gfm~=0.3.6", # type-checking - "types-click~=7.1.8", "types-PyYAML~=6.0.1", "types-requests~=2.32.0", "types-toml", From a177665ceff1a73cc5a9a91cadccbbf25f01c642 Mon Sep 17 00:00:00 2001 From: Samuel Monson Date: Thu, 10 Jul 2025 10:57:09 -0400 Subject: [PATCH 3/4] Arg type must be a sequence not set --- src/guidellm/__main__.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/guidellm/__main__.py b/src/guidellm/__main__.py index 3babc24a..f0bd9043 100644 --- a/src/guidellm/__main__.py +++ b/src/guidellm/__main__.py @@ -19,8 +19,8 @@ from guidellm.utils import DefaultGroupHandler from guidellm.utils import cli as cli_tools -STRATEGY_PROFILE_CHOICES = set( - list(get_args(ProfileType)) + list(get_args(StrategyType)) +STRATEGY_PROFILE_CHOICES = list( + set(list(get_args(ProfileType)) + list(get_args(StrategyType))) ) @@ -320,10 +320,7 @@ def run( ) -@benchmark.command( - "from-file", - help="Load a saved benchmark report." -) +@benchmark.command("from-file", help="Load a saved benchmark report.") @click.argument( "path", type=click.Path(file_okay=True, dir_okay=False, exists=True), From bb61071fe1bbedf27174ca804cf5f68a043aaed0 Mon Sep 17 00:00:00 2001 From: Samuel Monson Date: Thu, 10 Jul 2025 11:24:59 -0400 Subject: [PATCH 4/4] Fix missing check for command name --- src/guidellm/utils/default_group.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/guidellm/utils/default_group.py b/src/guidellm/utils/default_group.py index b3f0f03b..0fe37aa5 100644 --- a/src/guidellm/utils/default_group.py +++ b/src/guidellm/utils/default_group.py @@ -68,7 +68,8 @@ def resolve_command(self, ctx, args): cmd_name, cmd, args = super().resolve_command(ctx, args) if hasattr(ctx, "arg0"): args.insert(0, ctx.arg0) - cmd_name = cmd.name + if cmd is not None: + cmd_name = cmd.name return cmd_name, cmd, args def format_commands(self, ctx, formatter): @@ -79,7 +80,7 @@ def format_commands(self, ctx, formatter): return super().format_commands(ctx, formatter) -class DefaultCommandFormatter: +class DefaultCommandFormatter(click.HelpFormatter): """ Wraps a formatter to edit the line for the default command to mark it with the specified mark string.