student_runner
student_runner
¶
Real student runner for spec-search experiments.
Replaces the MagicMock() in the experiment runner script with a
callable that actually invokes the student model via vLLM (or any
OpenAI-compatible engine) and returns structured results.
Classes¶
StudentResult
dataclass
¶
StudentResult(
content: str,
score: float = 0.0,
trace_id: str = "",
latency_seconds: float = 0.0,
tokens_used: int = 0,
)
Result from running the student model on a task.
VLLMStudentRunner
¶
VLLMStudentRunner(
host: str = "http://localhost:8001",
model: str = "Qwen/Qwen3.5-9B",
temperature: float = 0.6,
max_tokens: int = 4096,
)
Invoke the student model via a vLLM OpenAI-compatible endpoint.
| PARAMETER | DESCRIPTION |
|---|---|
host
|
vLLM server URL (e.g.
TYPE:
|
model
|
Model name as registered in vLLM (e.g.
TYPE:
|
temperature
|
Sampling temperature.
TYPE:
|
max_tokens
|
Max tokens for the student response.
TYPE:
|
Source code in src/diapason/learning/spec_search/student_runner.py
Functions:¶
build_benchmark_samples_from_traces
¶
build_benchmark_samples_from_traces(
trace_store: Any,
*,
limit: int = 50,
min_feedback: float | None = None,
) -> list
Build PersonalBenchmarkSample objects from the trace store.
Pulls recent traces (optionally filtered by feedback score) and converts them into benchmark samples the teacher can reference.