Repository navigation
fix(benchmarks): OPS-8740 drop httpx backend attribution from the HTTP sweep harness - #14886
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. WalkthroughChangesHTTP benchmark simplification
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The benchmark now uses and reports one HTTP fetch path per sweep cell without a remaining concrete merge risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
The sweep selected a backend by writing DYN_HTTP_BACKEND and labelled the result with the string it was handed (runner.py: os.environ[...] = backend, then RunResult(backend=backend, ...)). Since #14563 the facade warns and falls back to aiohttp for any non-aiohttp value, so a run requested as "httpx" is measured by AiohttpClient and still printed under an "httpx" column. It does not crash or skip -- it emits a clean-looking A/B table in which both sides are aiohttp, with the two columns differing only by cold-start noise. Measured before the change, against a local server: run_one('httpx') -> label='httpx' client actually used=AiohttpClient run_one('aiohttp') -> label='aiohttp' client actually used=AiohttpClient There is one backend now, so remove the selection rather than relabel it: run_one() takes no backend argument and no longer touches the environment, RunResult/Summary carry no backend field, and report.py prints a single column. That also deletes the A/B scaffolding the comparison needed -- _by_backend(), the alternating run order, and the two-column grid. The README block that documented how to reproduce this sweep was removed in #14563, so the harness was orphaned as well as wrong. Tests pin the attribution away: no backend selector on run_one, no backend field on either result type, and a run leaves DYN_HTTP_BACKEND untouched. All five fail on the pre-fix code. Relates to #14563 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Dmitry Tokarev <dtokarev@nvidia.com>
Rewrite the docstrings and comments that this change adds. Remove the em-dashes and the sentence fragments. Each comment now states one fact, checked against the current main: - The root conftest.py adds pre_merge, gpu_0 and defaulted to an unmarked test, and pr.yaml runs defaulted tests in the CPU parallel job of the dynamo-runtime pipeline. The logs of the last CI run show all five tests in that job, on amd64 and on arm64. - The shared HTTP client stays None after run_one([]), so no current test creates it. The conftest docstring now says that the fixture only guards a future test. - A run_one that writes DYN_HTTP_BACKEND=aiohttp without a backend parameter fails only test_run_one_leaves_dyn_http_backend_unset. Its docstring now names that case. Remove the docstring of test_run_one_does_not_clobber_an_operator_set_backend, because it only restated the name of the test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Dmitry Tokarev <dtokarev@nvidia.com>
05f1533 to
c9a0b5c
Compare
The autouse fixture in benchmarks/multimodal/http/tests/conftest.py closed the shared HTTP client after each test, but no test creates that client. run_one() calls close_http_client() before and after each run, and the tests pass an empty URL list, so no fetch happens. Measured on c9a0b5c: with the file removed, all 5 tests pass with -W error, and the shared client is still None after run_one([]). Reported by rmccorm4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Dmitry Tokarev <dtokarev@nvidia.com>
… one column The signature and dataclass tests never ran the sweep or the report, so they could not see the defect that a user sees. Measured on c9a0b5c: a sweep that runs each cell twice, or a grid header that names httpx, left all 5 tests passing. Replace those two tests with one test that runs the real sweep, run, summary and report code. It stubs only the media server and the URL list, so no request leaves the process. It checks that each pair of a request rate and a delay runs once, that the output names no backend, and that each grid has one column. On the pre-fix sources from main, the new test fails with assert 8 == 4, because each of the 4 cells ran twice. It also fails alone for each of three mutations: a second run per cell, a grid header that names httpx, and a second grid column without backend names. Keep both environment tests, because each catches a defect that the other two tests miss: - A run that writes DYN_HTTP_BACKEND=aiohttp fails only test_run_one_leaves_dyn_http_backend_unset. - A run that deletes the variable fails only test_run_one_does_not_clobber_an_operator_set_backend. Their docstrings now say so. Reported by rmccorm4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Dmitry Tokarev <dtokarev@nvidia.com>
✅ Dynamo PR CI passed — run 36937609182 (attempt 1) on
|
Linear: OPS-8740
Summary
The HTTP sweep in
benchmarks/multimodal/httpselects a backend and labels each result with it. Only one backend exists since #14563.run_one()writesDYN_HTTP_BACKEND, and it stores the name that the caller passed inRunResult.backend. The facade logs a warning for any value other thanaiohttpand uses aiohttp. So a run that asks forhttpxuses aiohttp but prints under anhttpxcolumn. The sweep does not fail. It prints an A/B table in which both columns measured aiohttp.This change removes the selection, because there is nothing left to select:
runner.py:run_one()takes nobackendargument and does not write to the environment.RunResulthas nobackendfield.stats.py:Summaryhas nobackendfield.report.py: the table and the grid have one column, and_DISPLAY_ORDERis gone.sweep.py: each cell runs once._by_backend(), the alternating run order, and the two-column grid are gone.A second commit rewrites the comments of this change in plain English. Each comment states one fact, checked against the current main.
Two commits address review. One removes a test fixture that no test needed. The other replaces two structural tests with a test that runs the sweep, because the structural tests did not run the sweep or the report.
Start the review at
runner.py. Two lines caused the bug:os.environ["DYN_HTTP_BACKEND"] = backendandRunResult(backend=backend, ...).Relates to #14563 and #14474.
Validation
Measured on the branch rebased onto
5a47eb6312, with this command on main and on this branch:On main, the log shows
DYN_HTTP_BACKEND='httpx' is not supported; using aiohttp.two times. The table still prints two columns, and they differ only by noise:On this branch, the sweep prints one column:
Other results:
runner.py,stats.py,report.pyandsweep.pyfrom main, all 3 tests fail. The sweep test fails withassert 8 == 4, because each of the 4 cells ran twice. With this branch, all 3 pass.httpx, or a second grid column fails onlytest_sweep_runs_each_cell_once_and_prints_one_column. A run that writesDYN_HTTP_BACKEND=aiohttpfails onlytest_run_one_leaves_dyn_http_backend_unset. A run that deletes the variable fails onlytest_run_one_does_not_clobber_an_operator_set_backend.vllm-runtime-testimage (amd64, uid 1000,--network none), the marker expression of the CPU parallel job selects all 3 tests. They pass with-W error. The expression of the sequential job selects none of them.git range-diffshows the original commit as identical, and no conflicts came up.pre-commit run --all-filesexits 0.Note
Without
DYN_MM_ALLOW_INTERNAL=1, every request of the sweep fails, on main and on this branch. Since #14474, afetch_bytescall without a policy refuses loopback addresses at connect time, and the sweep fetches from a server onlocalhost. The sweep still exits 0. This comes from #14474 and is outside the scope of this change.🤖 Generated with Claude Code