Skip to content

Conversation

@happyandslow
Copy link
Collaborator

Pull Request Description

This PR adds help message to benchmark script.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of Changes

Hello @happyandslow, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly improves the command-line interface (CLI) of the benchmark.py script by enabling a standard help flag and providing more comprehensive and readable documentation for its arguments. This makes the script's usage more intuitive and discoverable for anyone running benchmarks.

Highlights

  • CLI Usability: The benchmark.py script now supports the standard --help flag, allowing users to easily view available command-line arguments and their descriptions directly from the terminal.
  • Improved Argument Documentation: The help message for the --stage argument has been enhanced to provide a more detailed and clearly formatted list of all available benchmark stages (all, dataset, workload, client, analysis), improving clarity for users.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request improves the help message for the benchmark script, making it more user-friendly. My review includes a suggestion to further enhance the argument parsing by using argparse's built-in choices parameter for the --stage argument. This will add automatic validation and make the script more robust.

parser = argparse.ArgumentParser(description="Run benchmark pipeline")
parser.add_argument("--stage", required=True, help="One of the stages [all, dataset, workload, client, analysis]")
parser = argparse.ArgumentParser(description="Run benchmark pipeline", add_help=True, formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument("--stage", required=True, help="Specify the benchmark stage to run. Possible stages:\n- all: Run all stages (dataset, workload, client, analysis)\n- dataset: Generate the dataset\n- workload: Generate the workload\n- client: Run the client to dispatch workload\n- analysis: Analyze the trace output")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While the detailed help message is a great improvement, you can make this more robust by using the choices parameter in add_argument.

This will provide automatic validation for the --stage argument, ensuring only valid stages are accepted. argparse will also generate a helpful error message if an invalid choice is provided.

This makes the manual validation in the run method (lines 278-281) redundant.

Using choices would also prevent passing an empty string ("") as a stage, which is currently an undocumented alias for all.

Suggested change
parser.add_argument("--stage", required=True, help="Specify the benchmark stage to run. Possible stages:\n- all: Run all stages (dataset, workload, client, analysis)\n- dataset: Generate the dataset\n- workload: Generate the workload\n- client: Run the client to dispatch workload\n- analysis: Analyze the trace output")
parser.add_argument("--stage", required=True, choices=['all', 'dataset', 'workload', 'client', 'analysis'], help="Specify the benchmark stage to run. Possible stages:\n- all: Run all stages (dataset, workload, client, analysis)\n- dataset: Generate the dataset\n- workload: Generate the workload\n- client: Run the client to dispatch workload\n- analysis: Analyze the trace output")

@Jeffwan Jeffwan force-pushed the lexu/benchmark-help-flag branch from 3f465bc to afe4694 Compare July 19, 2025 06:50
@Jeffwan Jeffwan merged commit 418ffc3 into vllm-project:main Jul 19, 2025
2 checks passed
Yaegaki1Erika pushed a commit to Yaegaki1Erika/aibrix that referenced this pull request Jul 23, 2025
* adding help flag to benchmark script
---------

Signed-off-by: Le Xu <[email protected]>
Co-authored-by: Le Xu <[email protected]>
ae86zhizhi pushed a commit to ae86zhizhi/aibrix that referenced this pull request Jul 30, 2025
* adding help flag to benchmark script
---------

Signed-off-by: Le Xu <[email protected]>
Co-authored-by: Le Xu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants