Repository navigation
[rl] Verifiers generation server: no per-request access log (3/14) - #5453
Conversation
b75b63c to
79adc15
Compare
79adc15 to
9e3f328
Compare
| # aiohttp logs one INFO line per request: most of the controller's log lines. | ||
| runner = web.AppRunner(app, access_log=None) |
There was a problem hiding this comment.
lets add a comment that rollotus still carry the log? Is this how other libraries manage their logs as well?
9e3f328 to
12e19f1
Compare
|
reply from claude: added the comment: the rollouts still carry each call's prompt and completion. Other servers have the same switch, e.g. vLLM's |
c9dede1 to
3ae063d
Compare
|
Reply from claude: @claude review |
|
Claude finished @felipemello1's task in 53s —— View job Approve, see the review. |
There was a problem hiding this comment.
Verdict: Approve -- one aiohttp kwarg removes a measured log/CPU cost on the controller, and the change is confined to the Verifiers example.
What this PR does. GenerationServer.start() builds its web.AppRunner with access_log=None, so aiohttp's RequestHandler gets no access logger and emits no aiohttp.access line per request. A CPU test starts the server, hits /healthz with aiohttp.access pinned at INFO, and checks that no access record shows up.
Example.
Rollout makes N calls to POST /inference/v1/generate
before: N lines like INFO aiohttp.access: 127.0.0.1 "POST /inference/v1/generate HTTP/1.1" 200 ...
(79-87% of controller log lines, ~6-9% of controller-thread samples)
after: 0 such lines; a GenerateFn exception still goes through logger.exception,
and each call still gets its `generate` span in the structured log
Details
- Gate: the problem is measured (line counts across 4 runs, py-spy samples), the fix is at the layer that owns it (the server construction), and it adds no knob. aiohttp has no setting that is smaller than this.
- Maintainer comment (felipemello1, generation_server.py:118): asked for a comment saying the rollouts still carry the data. Addressed at HEAD, lines 118-119.
- Test value: it is cheap (CPU, loopback only) and guards a regression nothing else would surface, e.g. losing the kwarg when PR 9 moves this file into
torchtitan/rl/generator. Pinningaiohttp.accessat INFO is needed because aiohttp skips building the access line when the logger isn't enabled for INFO, so without the pin the test could pass onmain. - Scope: two files, no unrelated changes.
Not verified: I couldn't run the tests in this environment (permission denied); the reasoning above comes from reading the code.
|
Reply from claude: per Felipe, the access log is now at DEBUG instead of off (227cab6, 61902f7). |
61902f7 to
fece3bf
Compare
TLDR: The Verifiers generation server logged one INFO line per generate call: 79-87% of the controller's log lines and ~6-9% of the controller thread's samples.
AppRunner(access_log=None)turns it off.Stack (14 PRs, merge bottom-up; this PR is in bold)
PRs 2-7 don't need the HTTP design and can be reviewed now. PRs 8-14 wait on the design discussion on PRs 9 and 10.
Results
You may ask:
GenerateFnexception still logs withlogger.exception; other error responses reach the client, and failed rollouts log their reason.generatespan in the controller's structured log.Test plan
test_generation_server_does_not_log_each_requestfails on main. It pins theaiohttp.accesslogger at INFO, since aiohttp skips the line above INFO and the inherited level depends on imports.