Repository navigation
Conversation
Signed-off-by: HuiyingLi <[email protected]>
Signed-off-by: HuiyingLi <[email protected]>
4 tasks
Contributor
|
deduping - closing in favor of #3048 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
When verification is enabled,
SimpleAgent.rundumps the run request, merges the model response, validates the entire verify model, and dumps it again before sending it to the resources server. Large token arrays are traversed and allocated again even though the resources server validates its typed/verifyrequest on ingress.Build the verify wire dictionary with one run-request dump and attach the already serialized response directly. Keep resources-server ingress validation and final
SimpleAgentVerifyResponsevalidation. Copy the response's top-level dictionary before extracting the internal trajectory so caller-owned data is not mutated.Closes #3011.
Validation
simple_agent/app.py.pre-commit run --all-filespasses in a clean worktree at this commit.Qwen/Qwen2.5-0.5B-Instructcompleted three tasks at concurrency 1 and again at concurrency 3. All rewards were 1.0; the run with full observation capture had 3/3 healthy rollouts. Inspected generated token IDs/log probabilities, response IDs, trajectories, and captured model calls.Focused benchmark
A local benchmark compared payload construction and a real
ServerClientHTTP hop to a typed resources server in a separate process. Decoded request bodies were equal in all three cases; object-key order was ignored. Each HTTP request was checked against the fingerprint of its expected wire body. The benchmark script is kept locally and is not included in this PR.Local run with 128 requests per variant/concurrency (1 and 32):
The benchmark reports client CPU, retained allocation blocks, peak traced bytes, requests/s, and p50/p99 latency. Allocation sampling is separate from timing. The HTTP measurement includes construction, transport, resources validation, an echoed verify response, and final response validation; it excludes model inference and session seeding. The construction benchmark uses the old/new expressions; actual
SimpleAgent.runbehavior is covered separately by regression tests and live rollouts.These are focused measurements on a shared local machine, not a general rollout-throughput claim. In this short run, 64K HTTP throughput changed from 19.77 to 23.96 requests/s at concurrency 1 and 32.52 to 32.93 at concurrency 32; small and large-metadata cases at concurrency 32 had lower throughput after the change.
Checklist
pre-commit run --all-files) (so CI lint/format/copyright pass).git commit -s) (so the DCO check passes).