Add the verifier HTTP server#2
Open
AbdelStark wants to merge 1 commit into
Open
Conversation
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 changed
This adds the verifier HTTP server described in the architecture docs.
The PR includes:
GET /health,GET /stats,POST /verify, andPOST /verify/batchVerifierClient(rust_server_url=...)support in the Python training harness, with local fallback when the server is unavailable or a backend is not supported by the Rust route yetWhy
The repository already describes the Rust verifier server as the boundary between the Python GRPO loop and deterministic reward functions, and the Python harness already accepted a
rust_server_url. The executable crate did not expose that service yet; it only printed a test hint.This makes that boundary real. A training loop can now call a long-lived verifier process over HTTP, batch verification requests, and keep Python as the orchestration layer instead of the only verification path.
Behavior notes
domainstays as the caller-facing domain name in the response.verifieris optional. When it is present, the router uses it to select the backend; this lets callers keep domain names likegsm8kwhile routing throughmath_numerical.score: 0.0and a reason, which keeps batch responses ordered and easy to consume.Validation
cargo testcargo clippy --all-targets -- -D warningspython3 -m compileall -q python/rlvrcargo run -- --addr 127.0.0.1:18080curl http://127.0.0.1:18080/healthreturned{"status":"ok","verifiers":16}