Modernize benchmark from-file#927
Conversation
jaredoconnell
left a comment
There was a problem hiding this comment.
It works well. One thing to consider is that it overwrites the old benchmark, which is fine, but if there is ever a bug in it then it could corrupt the results file.
|
Tick the box to add this pull request to the merge queue (same as
|
Certainly true -- but not new. I had a couple of ideas along the way that I decided not to pursue, but I'm not sure any of it makes much sense. The user controls the output file, and if they don't want to overwrite the input on |
SkiHatDuckie
left a comment
There was a problem hiding this comment.
Works for me as well. I wonder if it would be a good idea to fix the tests in test_benchmark_from_file_entrypoint.py at some point, so that manual testing isn't as necessary.
I hadn't actually noticed that there are no tests, because they're all disabled. I'm both tempted to fix that and also tempted to just merge the fix and worry about that later... |
Signed-off-by: David Butenhof <dbutenho@redhat.com>
Signed-off-by: David Butenhof <dbutenho@redhat.com>
Replace the disabled re-export tests with working code. Signed-off-by: David Butenhof <dbutenho@redhat.com>
| "pytest-timeout~=2.4.0", | ||
| "pytest-httpx~=0.36.2", | ||
| "respx~=0.23.1", | ||
| "trio~=0.33.0", |
There was a problem hiding this comment.
What is the benefit of the new dependency?
There was a problem hiding this comment.
ruff was unhappy about using Path in the async methods, which I found ... interesting. But faced with disabling the warning or using its recommended alternative (only for the tests), I figured I'd go with the alternative.
ASYNC240 Async functions should not use pathlib.Path methods, use trio.Path or anyio.path
--> tests/unit/entrypoints/test_benchmark_from_file_entrypoint.py:226:9
|
224 | assert exported_yaml.exists()
225 | assert json.loads(exported_json.read_text()) == json.loads(
226 | saved_json_report.read_text()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
227 | )
228 | parsed_yaml = yaml.safe_load(exported_yaml.read_text())
jaredoconnell
left a comment
There was a problem hiding this comment.
I don't love the use of a new test dependency, but it's a test dependency. It seems okay.
What I find interesting is that we're doing similar things in product code. Possibly not directly in |
Summary
Modernize
guidellm benchmark from-fileby adopting the full registry typed--outputstyle.Details
The
guidellm benchmark from-filecommand in 0.7.0--output-formats consoledue to an attempt to inject a pathguidellm runReplace the old
--output-formatswith the modern--output kind=<kind>,...style.Test Plan
Manual command testing + tox
Related Issues
guidellm benchmark from-filecrashes withValidationErrorwhen output includesconsoleformat #925Use of AI
git log
commit 32906a2
Author: David Butenhof dbutenho@redhat.com
Date: Mon Jul 13 10:03:20 2026 -0400
commit 346ed21
Author: David Butenhof dbutenho@redhat.com
Date: Mon Jul 13 12:33:42 2026 -0400
commit c31c71d
Author: David Butenhof dbutenho@redhat.com
Date: Tue Jul 14 15:32:14 2026 -0400
Signed-off-by: David Butenhof dbutenho@redhat.com