Skip to content

Conversation

@KilJaeeun
Copy link
Contributor

This change refactors QPS value handling to correctly support multiple float inputs.

Previously, when multiple QPS values were passed (e.g., "1.34 2.0 3.0"), the script treated them as a single string argument, causing an invalid float value error in sharegpt-qa.py.

The updated logic joins all remaining arguments ("${*:4}") and then splits them using IFS, ensuring that each QPS value is parsed as an individual float.

This makes the benchmark script compatible with multiple QPS inputs and prevents the argparse parsing error.

Running ShareGPT benchmark...
usage: sharegpt-qa.py [-h] [--sharegpt-file SHAREGPT_FILE] --base-url BASE_URL
                      --model MODEL --qps QPS [--output OUTPUT]
                      [--log-interval LOG_INTERVAL] [--time TIME] [--verbose]
sharegpt-qa.py: error: argument --qps: invalid float value: '1.34 2.0 3.0'
usage: sharegpt-qa.py [-h] [--sharegpt-file SHAREGPT_FILE] --base-url BASE_URL
                      --model MODEL --qps QPS [--output OUTPUT]
                      [--log-interval LOG_INTERVAL] [--time TIME] [--verbose]
sharegpt-qa.py: error: argument --qps: invalid float value: '1.34 2.0 3.0'
Running short input benchmark...
Warming up with QPS=200...

Refactor QPS value handling to join and split arguments.
Copy link
Collaborator

@Siddhant-Ray Siddhant-Ray left a comment

Choose a reason for hiding this comment

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

Thanks

@Siddhant-Ray Siddhant-Ray merged commit 26d02bd into LMCache:main Nov 24, 2025
1 check failed
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