Commit 7b07866
authored
Support dashed arguments for benchmark args (#441)
## Summary
<!--
Include a short paragraph of the changes introduced in this PR.
If this PR requires additional context or rationale, explain why
the changes are necessary.
-->
For all arguments in `BenchmarkGenerativeTextArgs` support dashed
versions of the name during validation to match the CLI. Additionally
alias the argument `data_request_formatter` to `request_type`.
## Details
<!--
Provide a detailed list of all changes introduced in this pull request.
-->
Alias are configured so that if both options are specified, the original
name takes precedence. E.g. the order of precedence is `max_seconds >
max-seconds`.
~~For `data_request_formatter` the request type alias takes precedence.
E.g. `request_type > request-type > data_request_formatter`.~~ Changed
this because it caused precedence issues with CLI arg. Order is now
`data_request_formatter > data-request-formatter > request_type >
request-type`.
## Test Plan
The following scenario file can be used to test. Modify which fields are
uncommented to test precedence.
```yaml
target: <hostname>
#request_type: text_completions
#request-type: text_completions
data_request_formatter: text_completions
profile: concurrent
rate: 2
max_seconds: 30
data:
prompt_tokens: 256
output_tokens: 128
```
## Related Issues
<!--
Link any relevant issues that this PR addresses.
-->
- Resolves #
---
- [x] "I certify that all code in this PR is my own, except as noted
below."
## Use of AI
- [ ] Includes AI-assisted code completion
- [ ] Includes code generated by an AI application
- [ ] Includes AI-generated tests (NOTE: AI written tests should have a
docstring that includes `## WRITTEN BY AI ##`)1 file changed
+18
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
1796 | 1798 | | |
1797 | 1799 | | |
1798 | 1800 | | |
1799 | | - | |
1800 | | - | |
1801 | | - | |
| 1801 | + | |
| 1802 | + | |
1802 | 1803 | | |
1803 | 1804 | | |
1804 | 1805 | | |
| |||
1832 | 1833 | | |
1833 | 1834 | | |
1834 | 1835 | | |
| 1836 | + | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
| 1840 | + | |
| 1841 | + | |
| 1842 | + | |
| 1843 | + | |
1835 | 1844 | | |
1836 | 1845 | | |
1837 | 1846 | | |
| |||
1878 | 1887 | | |
1879 | 1888 | | |
1880 | 1889 | | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
1881 | 1896 | | |
1882 | 1897 | | |
1883 | 1898 | | |
| |||
0 commit comments