verifiers 0.4.1.dev149__py3-none-any.whl → 0.4.1.dev151__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- verifiers/v1/__init__.py +0 -14
- verifiers/v1/cli/gepa.py +1 -1
- verifiers/v1/configs/agent.py +2 -2
- verifiers/v1/configs/cli/env.py +3 -3
- verifiers/v1/configs/env.py +1 -1
- verifiers/v1/configs/runtime.py +1 -1
- verifiers/v1/env.py +1 -1
- verifiers/v1/episode.py +1 -1
- verifiers/v1/errors.py +1 -1
- verifiers/v1/gepa/config.py +1 -2
- verifiers/v1/graph.py +2 -2
- verifiers/v1/interception/pool.py +2 -2
- verifiers/v1/mcp/launch.py +1 -1
- verifiers/v1/runtimes/backends/prime.py +1 -1
- verifiers/v1/runtimes/limiters.py +2 -4
- verifiers/v1/runtimes/native_compose.py +1 -1
- verifiers/v1/trace.py +3 -3
- verifiers/v1/types.py +5 -5
- verifiers/v1/utils/loaders.py +1 -1
- verifiers/v1/utils/scope.py +1 -1
- {verifiers-0.4.1.dev149.dist-info → verifiers-0.4.1.dev151.dist-info}/METADATA +2 -4
- {verifiers-0.4.1.dev149.dist-info → verifiers-0.4.1.dev151.dist-info}/RECORD +25 -33
- verifiers/v1/configs/serve.py +0 -65
- verifiers/v1/serve/__init__.py +0 -24
- verifiers/v1/serve/client.py +0 -321
- verifiers/v1/serve/delta.py +0 -303
- verifiers/v1/serve/encoding.py +0 -68
- verifiers/v1/serve/pool.py +0 -409
- verifiers/v1/serve/server.py +0 -333
- verifiers/v1/serve/types.py +0 -63
- {verifiers-0.4.1.dev149.dist-info → verifiers-0.4.1.dev151.dist-info}/WHEEL +0 -0
- {verifiers-0.4.1.dev149.dist-info → verifiers-0.4.1.dev151.dist-info}/entry_points.txt +0 -0
- {verifiers-0.4.1.dev149.dist-info → verifiers-0.4.1.dev151.dist-info}/licenses/LICENSE +0 -0
verifiers/v1/__init__.py
CHANGED
|
@@ -50,12 +50,6 @@ if TYPE_CHECKING:
|
|
|
50
50
|
SelectConfig,
|
|
51
51
|
TaskMatchConfig,
|
|
52
52
|
)
|
|
53
|
-
from verifiers.v1.configs.serve import (
|
|
54
|
-
ElasticPoolConfig,
|
|
55
|
-
ServeConfig,
|
|
56
|
-
StaticPoolConfig,
|
|
57
|
-
pool_serve_kwargs,
|
|
58
|
-
)
|
|
59
53
|
from verifiers.v1.configs.task import (
|
|
60
54
|
DecoratedFunctionConfig,
|
|
61
55
|
RewardFunctionConfig,
|
|
@@ -227,7 +221,6 @@ _NAME_TO_MODULE = {
|
|
|
227
221
|
"Deployment": "verifiers.v1.runtimes.deployment",
|
|
228
222
|
"DeploymentConfig": "verifiers.v1.configs.deployment",
|
|
229
223
|
"DockerConfig": "verifiers.v1.configs.runtime",
|
|
230
|
-
"ElasticPoolConfig": "verifiers.v1.configs.serve",
|
|
231
224
|
"Env": "verifiers.v1.env",
|
|
232
225
|
"EnvConfig": "verifiers.v1.configs.env",
|
|
233
226
|
"EnvError": "verifiers.v1.errors",
|
|
@@ -295,7 +288,6 @@ _NAME_TO_MODULE = {
|
|
|
295
288
|
"SelectConfig": "verifiers.v1.configs.select",
|
|
296
289
|
"SemanticEdge": "verifiers.v1.semantic",
|
|
297
290
|
"SemanticEdgeSet": "verifiers.v1.semantic",
|
|
298
|
-
"ServeConfig": "verifiers.v1.configs.serve",
|
|
299
291
|
"SharedEnvConfig": "verifiers.v1.configs.env",
|
|
300
292
|
"SharedTasksetConfig": "verifiers.v1.configs.taskset",
|
|
301
293
|
"SharedToolsetConfig": "verifiers.v1.mcp",
|
|
@@ -303,7 +295,6 @@ _NAME_TO_MODULE = {
|
|
|
303
295
|
"SingleAgentEnvConfig": "verifiers.v1.configs.env",
|
|
304
296
|
"State": "verifiers.v1.state",
|
|
305
297
|
"StateT": "verifiers.v1.state",
|
|
306
|
-
"StaticPoolConfig": "verifiers.v1.configs.serve",
|
|
307
298
|
"StopFunctionConfig": "verifiers.v1.configs.task",
|
|
308
299
|
"SubprocessConfig": "verifiers.v1.configs.runtime",
|
|
309
300
|
"SystemMessage": "verifiers.v1.types",
|
|
@@ -369,7 +360,6 @@ _NAME_TO_MODULE = {
|
|
|
369
360
|
"narrowed_env_annotation": "verifiers.v1.configs.cli.env",
|
|
370
361
|
"parse_judge_choice": "verifiers.v1.utils.score",
|
|
371
362
|
"parse_pytest_outcomes": "verifiers.v1.utils.score",
|
|
372
|
-
"pool_serve_kwargs": "verifiers.v1.configs.serve",
|
|
373
363
|
"read_answer_file_or_last_reply": "verifiers.v1.utils.score",
|
|
374
364
|
"resolve_client": "verifiers.v1.clients",
|
|
375
365
|
"resolve_env_config": "verifiers.v1.utils.loaders",
|
|
@@ -508,16 +498,12 @@ __all__ = [ # noqa: RUF022 - grouped by public API area
|
|
|
508
498
|
"SingleAgentEnv",
|
|
509
499
|
"EnvConfig",
|
|
510
500
|
"SharedEnvConfig",
|
|
511
|
-
"ServeConfig",
|
|
512
501
|
"resolve_env_field",
|
|
513
502
|
"merge_defaults",
|
|
514
503
|
"narrowed_env_annotation",
|
|
515
504
|
"SingleAgentEnvConfig",
|
|
516
505
|
"AgentConfig",
|
|
517
|
-
"StaticPoolConfig",
|
|
518
|
-
"ElasticPoolConfig",
|
|
519
506
|
"default_agent_harness",
|
|
520
|
-
"pool_serve_kwargs",
|
|
521
507
|
"RetryConfig",
|
|
522
508
|
"RetryRule",
|
|
523
509
|
# agent
|
verifiers/v1/cli/gepa.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Registered as the `gepa` console script. Optimizes a v1 taskset's `Task.system_prompt` via
|
|
4
4
|
GEPA (Genetic-Pareto): alternating rollouts with a teacher LM reflecting on results — see
|
|
5
|
-
`verifiers.v1.gepa`. CLI resolution
|
|
5
|
+
`verifiers.v1.gepa`. CLI resolution goes through `verifiers.v1.cli.resolve`: a
|
|
6
6
|
leading bare token is the taskset id, the `env` subconfig is narrowed from the ids so
|
|
7
7
|
`--env.taskset.*` / `--env.<role>.*` stay typed and `-h` renders them, `@ file.toml` loads,
|
|
8
8
|
and the actual parse is `pydantic_config.cli`.
|
verifiers/v1/configs/agent.py
CHANGED
|
@@ -83,13 +83,13 @@ class AgentConfig(BaseConfig):
|
|
|
83
83
|
def _scoring_overrides(
|
|
84
84
|
self, scoring: ScoringConfig, info: SerializationInfo
|
|
85
85
|
) -> dict:
|
|
86
|
-
# Preserve unset fields across
|
|
86
|
+
# Preserve unset fields across process and trace roundtrips so they
|
|
87
87
|
# continue to inherit from the task instead of becoming explicit overrides.
|
|
88
88
|
return scoring.model_dump(mode=info.mode, exclude_unset=True)
|
|
89
89
|
|
|
90
90
|
@field_serializer("sampling")
|
|
91
91
|
def _sampling_overrides(self, sampling: SamplingConfig | None) -> dict | None:
|
|
92
|
-
# An unresolved agent carries only overrides across
|
|
92
|
+
# An unresolved agent carries only overrides across process boundaries.
|
|
93
93
|
# resolve_agent fills every field before the config is recorded on a trace.
|
|
94
94
|
return sampling.model_dump(exclude_unset=True) if sampling is not None else None
|
|
95
95
|
|
verifiers/v1/configs/cli/env.py
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
every config that owns one. `merge_defaults` (`utils/generic.py`) layers shared env
|
|
3
3
|
defaults under it.
|
|
4
4
|
|
|
5
|
-
A run composes the blocks it needs — `[env]` (what runs, `configs/env.py`)
|
|
6
|
-
|
|
5
|
+
A run composes the blocks it needs — `[env]` (what runs, `configs/env.py`) — plus its
|
|
6
|
+
own fields. Nothing here is a base class: the eval
|
|
7
7
|
CLI, GEPA, and a trainer each declare their blocks and call these.
|
|
8
8
|
|
|
9
9
|
Declare the env field as `SerializeAsAny[EnvConfig] = Field(default_factory=
|
|
10
10
|
single_agent_env_config)`. The `SerializeAsAny` is load-bearing: pydantic serializes
|
|
11
11
|
by declared type, so a plain `EnvConfig` silently drops a narrowed subclass's agents
|
|
12
|
-
and knobs from `model_dump()
|
|
12
|
+
and knobs from `model_dump()`."""
|
|
13
13
|
|
|
14
14
|
from pydantic import ValidationError
|
|
15
15
|
from pydantic_config import BaseConfig
|
verifiers/v1/configs/env.py
CHANGED
|
@@ -70,7 +70,7 @@ class EnvConfig(SharedEnvConfig):
|
|
|
70
70
|
id: ID = ""
|
|
71
71
|
"""Which `Env` runs. Empty = the taskset's own, else `SingleAgentEnv`; set
|
|
72
72
|
to pair a reusable env with any taskset (an explicit id wins over the bundled)."""
|
|
73
|
-
# SerializeAsAny:
|
|
73
|
+
# SerializeAsAny: a dump must carry the resolved subclass's fields.
|
|
74
74
|
taskset: SerializeAsAny[TasksetConfig] = TasksetConfig()
|
|
75
75
|
"""The seed taskset — the rows every rollout starts from (`--env.taskset.id`)."""
|
|
76
76
|
|
verifiers/v1/configs/runtime.py
CHANGED
|
@@ -218,7 +218,7 @@ class PrimeConfig(NetworkPolicyConfig):
|
|
|
218
218
|
"""Seconds of inactivity before the sandbox self-deletes (None disables)."""
|
|
219
219
|
creates_per_min: int | None = None
|
|
220
220
|
"""Pace sandbox creation to this many per minute, enforced run-wide across every
|
|
221
|
-
|
|
221
|
+
process of the run (None/<= 0 disables it). (Tunnel creation is limited separately
|
|
222
222
|
— see interception.tunnel.prime.tunnel_limiter.)"""
|
|
223
223
|
|
|
224
224
|
mounts: dict[str, PrimeVolume] = Field(default_factory=dict)
|
verifiers/v1/env.py
CHANGED
|
@@ -54,7 +54,7 @@ def _as_error(e: Exception) -> Error:
|
|
|
54
54
|
class RunSlot:
|
|
55
55
|
"""One planned episode, observable while it happens: `traces` collects the
|
|
56
56
|
current attempt (a retry restarts the list), `episode`/`done` land when final.
|
|
57
|
-
A runner that can't watch live traces
|
|
57
|
+
A runner that can't watch live traces stamps `started`
|
|
58
58
|
at dispatch so the slot still reads as running."""
|
|
59
59
|
|
|
60
60
|
task: Task
|
verifiers/v1/episode.py
CHANGED
|
@@ -118,7 +118,7 @@ class Episode(BaseModel, Generic[DataT, StateT, AgentConfigT]):
|
|
|
118
118
|
float_decimals: int | None = RECORD_FLOAT_DECIMALS,
|
|
119
119
|
exclude: dict | set | None = None,
|
|
120
120
|
) -> dict[str, Any]:
|
|
121
|
-
"""JSON record without raw trace tensors, which
|
|
121
|
+
"""JSON record without raw trace tensors, which a python-mode `model_dump` keeps.
|
|
122
122
|
Per-token node streams are numpy arrays (`graph.RECORD_STREAMS`): encode it with
|
|
123
123
|
`to_json`, or with orjson and `OPT_SERIALIZE_NUMPY`. Per-token float streams are
|
|
124
124
|
rounded to `float_decimals` (`None` keeps every digit). `exclude` is a pydantic
|
verifiers/v1/errors.py
CHANGED
|
@@ -13,7 +13,7 @@ Four mechanisms, each in one place:
|
|
|
13
13
|
3. Surfacing (`session.RolloutSession.error`): a model or tool call fails behind the harness
|
|
14
14
|
subprocess and comes back as HTTP, so the interception server stashes the real error there and
|
|
15
15
|
the rollout re-raises it once the harness returns — not a secondary `HarnessError`.
|
|
16
|
-
4. Capture (`Rollout
|
|
16
|
+
4. Capture (`Rollout`): the one place that records a failure (typed
|
|
17
17
|
or not) onto the trace and never lets it cancel sibling rollouts. A bad rollout is data, not a
|
|
18
18
|
crash.
|
|
19
19
|
|
verifiers/v1/gepa/config.py
CHANGED
|
@@ -4,8 +4,7 @@ GEPA optimizes one taskset's `Task.system_prompt` by alternating rollouts (`eval
|
|
|
4
4
|
teacher LM reflecting on the reflective dataset (`make_reflective_dataset`) — see
|
|
5
5
|
`verifiers.v1.gepa.adapter.GEPAAdapter`. It owns an `env` field (the
|
|
6
6
|
environment: its taskset, seats, limits) and adds the optimization loop's own knobs (model,
|
|
7
|
-
reflection model, train/val split, budget).
|
|
8
|
-
always runs in-process, since its adapter protocol is itself synchronous (see
|
|
7
|
+
reflection model, train/val split, budget). GEPA always runs in-process, since its adapter protocol is itself synchronous (see
|
|
9
8
|
`GEPAAdapter`)."""
|
|
10
9
|
|
|
11
10
|
from pathlib import Path
|
verifiers/v1/graph.py
CHANGED
|
@@ -69,7 +69,7 @@ RECORD_FLOAT_DECIMALS = 4
|
|
|
69
69
|
"""Default precision of per-token float streams in JSON records (`to_record`). Full-precision
|
|
70
70
|
digits are noise to every record reader and the least compressible bytes of a trace; four
|
|
71
71
|
decimals leave a logprob within 1e-4 of what the trainer saw. `to_record(float_decimals=...)`
|
|
72
|
-
overrides it per dump (`None` keeps every digit).
|
|
72
|
+
overrides it per dump (`None` keeps every digit). A python-mode dump keeps
|
|
73
73
|
full precision — training never reads the record."""
|
|
74
74
|
|
|
75
75
|
|
|
@@ -115,7 +115,7 @@ def _serialize_stream(
|
|
|
115
115
|
values: list | np.ndarray, info: FieldSerializationInfo, rounded: bool
|
|
116
116
|
) -> list | dict:
|
|
117
117
|
"""JSON dumps: a list. Python dumps: a list too, unless the context sets `token_arrays`,
|
|
118
|
-
when
|
|
118
|
+
when it is a raw-bytes `__nd__` dict for a binary wire."""
|
|
119
119
|
context = info.context or {}
|
|
120
120
|
if info.mode_is_json():
|
|
121
121
|
decimals = context.get("float_decimals", RECORD_FLOAT_DECIMALS)
|
|
@@ -6,8 +6,8 @@ is rate-capped per API token — so one-tunnel-per-rollout caps how wide a remot
|
|
|
6
6
|
server) can fan out. Each shared `InterceptionServer` multiplexes rollouts behind one
|
|
7
7
|
tunnel; the harness is unchanged, authenticating with a per-rollout secret the server routes
|
|
8
8
|
by. Two shapes: `ElasticInterceptionPool` warms one server, then grows on demand (`multiplex`
|
|
9
|
-
rollouts each, always prime tunnels — the only kind the framework can mint) and fits both
|
|
10
|
-
bounded eval runner and
|
|
9
|
+
rollouts each, always prime tunnels — the only kind the framework can mint) and fits both a
|
|
10
|
+
bounded eval runner and an unbounded request load; `StaticInterceptionPool` is a
|
|
11
11
|
fixed set of servers (each with its own tunnel choice, e.g. bring-your-own endpoints), balanced
|
|
12
12
|
least-loaded.
|
|
13
13
|
"""
|
verifiers/v1/mcp/launch.py
CHANGED
|
@@ -56,7 +56,7 @@ class _PackageBuildState:
|
|
|
56
56
|
users: int = 0
|
|
57
57
|
|
|
58
58
|
|
|
59
|
-
# Coordination and caching are process-local.
|
|
59
|
+
# Coordination and caching are process-local. Separate worker processes each
|
|
60
60
|
# build once; within an event loop, concurrent rollouts share the completed artifact.
|
|
61
61
|
_PACKAGE_BUILD_STATES: dict[
|
|
62
62
|
tuple[Path, asyncio.AbstractEventLoop], _PackageBuildState
|
|
@@ -111,7 +111,7 @@ async def leased_client() -> AsyncIterator[Any]:
|
|
|
111
111
|
def set_base_sandbox_labels(labels: list[str]) -> None:
|
|
112
112
|
"""Set process-wide base labels attached to every Prime sandbox, extended by each
|
|
113
113
|
runtime's ``PrimeConfig.labels``. Call it in the process that creates the sandboxes
|
|
114
|
-
(
|
|
114
|
+
(a host that spawns worker processes sets it in each one) — e.g. a trainer stamps its run
|
|
115
115
|
name so every sandbox of a run is findable on the platform."""
|
|
116
116
|
global BASE_LABELS
|
|
117
117
|
BASE_LABELS = list(labels)
|
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
A leaky bucket backed by a lock file under the user cache (``~/.cache/verifiers``, falling
|
|
4
4
|
back to the temp dir when no home is resolvable), so a provider's creation rate (Prime
|
|
5
|
-
sandboxes and tunnels) is enforced across EVERY process that shares the
|
|
6
|
-
bucket
|
|
7
|
-
not just within one process. A bucket is named by the limiter's name and a scope the caller
|
|
8
|
-
picks; the runtimes pass the run id, so one run's backlog (or the reservations a killed run
|
|
5
|
+
sandboxes and tunnels) is enforced across EVERY process that shares the bucket, not just
|
|
6
|
+
within one process. A bucket is named by the limiter's name and a scope the caller picks; the runtimes pass the run id, so one run's backlog (or the reservations a killed run
|
|
9
7
|
left behind) never delays another run.
|
|
10
8
|
"""
|
|
11
9
|
|
|
@@ -605,7 +605,7 @@ async def _import_image(client, project, container: str, config: PrimeConfig) ->
|
|
|
605
605
|
name = "vf-compose-" + hashlib.sha256(identity.encode()).hexdigest()
|
|
606
606
|
locks = CACHE_DIR / "compose-images"
|
|
607
607
|
locks.mkdir(parents=True, exist_ok=True)
|
|
608
|
-
#
|
|
608
|
+
# Worker processes share the build cache; only one prepares a given image.
|
|
609
609
|
with (locks / name).open("a") as lock:
|
|
610
610
|
while True:
|
|
611
611
|
try:
|
verifiers/v1/trace.py
CHANGED
|
@@ -60,7 +60,7 @@ EXCLUDE_FIELDS: dict = {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
"""Raw tensor fields kept
|
|
63
|
+
"""Raw tensor fields kept by `model_dump` but excluded from disk serialization."""
|
|
64
64
|
|
|
65
65
|
RECORD_DUMP_EXCLUDE: dict = {
|
|
66
66
|
"nodes": {"__all__": EXCLUDE_FIELDS["nodes"]["__all__"] | set(graph.RECORD_STREAMS)}
|
|
@@ -669,7 +669,7 @@ class Trace(BaseModel, Generic[DataT, StateT, AgentConfigT]):
|
|
|
669
669
|
|
|
670
670
|
@field_serializer("mm_token_type_id_map")
|
|
671
671
|
def serialize_mm_token_type_id_map(self, mapping: dict[int, int]) -> dict[str, int]:
|
|
672
|
-
"""
|
|
672
|
+
"""Binary wire formats forbid int map keys (msgpack's `strict_map_key`) —
|
|
673
673
|
dump str keys; validation coerces them back to int."""
|
|
674
674
|
return {str(k): v for k, v in mapping.items()}
|
|
675
675
|
|
|
@@ -980,7 +980,7 @@ class Trace(BaseModel, Generic[DataT, StateT, AgentConfigT]):
|
|
|
980
980
|
float_decimals: int | None = RECORD_FLOAT_DECIMALS,
|
|
981
981
|
exclude: dict | set | None = None,
|
|
982
982
|
) -> dict[str, Any]:
|
|
983
|
-
"""JSON record without raw tensors, which
|
|
983
|
+
"""JSON record without raw tensors, which a python-mode `model_dump` keeps.
|
|
984
984
|
Per-token node streams are numpy arrays (`graph.RECORD_STREAMS`): encode it with
|
|
985
985
|
`to_json`, or with orjson and `OPT_SERIALIZE_NUMPY`. Per-token float streams are
|
|
986
986
|
rounded to `float_decimals` (`None` keeps every digit). `exclude` is a pydantic
|
verifiers/v1/types.py
CHANGED
|
@@ -10,9 +10,9 @@ from typing_extensions import TypedDict
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
def encode_ndarray(arr: np.ndarray) -> dict:
|
|
13
|
-
"""A numpy array as a msgpack-safe dict (dtype + shape + raw bytes). The bytes ride
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
"""A numpy array as a msgpack-safe dict (dtype + shape + raw bytes). The bytes ride a
|
|
14
|
+
binary wire natively (msgpack's `bin` type) — no base64 — so a payload for such a wire
|
|
15
|
+
must come from `model_dump(mode="python")` (`mode="json"` would coerce the bytes to str)."""
|
|
16
16
|
arr = np.ascontiguousarray(arr)
|
|
17
17
|
return {
|
|
18
18
|
"__nd__": True,
|
|
@@ -35,8 +35,8 @@ def as_list(values: list | np.ndarray) -> list:
|
|
|
35
35
|
def _token_stream(dtype: type[np.generic], item_type: str):
|
|
36
36
|
"""The field type of a per-token stream: a numpy array of `dtype`.
|
|
37
37
|
|
|
38
|
-
One list entry per token is a Python object the cyclic garbage collector walks and
|
|
39
|
-
|
|
38
|
+
One list entry per token is a Python object the cyclic garbage collector walks and a
|
|
39
|
+
serializer packs one by one; an array is one object it skips and raw bytes on the wire, so
|
|
40
40
|
a process holding many long episodes (an RL orchestrator) keeps full collections short.
|
|
41
41
|
Validation takes a list, an array or an `__nd__` dict; the models that hold streams
|
|
42
42
|
serialize them (`graph.MessageNode.serialize_token_stream`). Typed as an array alone,
|
verifiers/v1/utils/loaders.py
CHANGED
|
@@ -321,7 +321,7 @@ def env_config_type(taskset_id: str, env_id: str = "") -> type[EnvConfig]:
|
|
|
321
321
|
|
|
322
322
|
def resolve_env_config(data: dict | EnvConfig | None) -> EnvConfig:
|
|
323
323
|
"""Narrow raw env-config data to the concrete env class's config type and
|
|
324
|
-
validate. The one entry every consumer takes (CLI, TOML,
|
|
324
|
+
validate. The one entry every consumer takes (CLI, TOML, a plain-data dump),
|
|
325
325
|
so role fields always validate against the real config class."""
|
|
326
326
|
if isinstance(data, EnvConfig):
|
|
327
327
|
cls = env_config_type(data.taskset.id, data.id)
|
verifiers/v1/utils/scope.py
CHANGED
|
@@ -11,7 +11,7 @@ _process_scope: str | None = None
|
|
|
11
11
|
|
|
12
12
|
def run_scope() -> str:
|
|
13
13
|
"""``$VF_RUN_ID``, set by every entrypoint (the `vf-*` CLIs and the prime-rl launchers)
|
|
14
|
-
and inherited by
|
|
14
|
+
and inherited by every process they spawn. A process started without one
|
|
15
15
|
gets a scope of its own, minted once per process."""
|
|
16
16
|
global _process_scope
|
|
17
17
|
run_id = os.environ.get("VF_RUN_ID")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: verifiers
|
|
3
|
-
Version: 0.4.1.
|
|
3
|
+
Version: 0.4.1.dev151
|
|
4
4
|
Summary: Verifiers: Environments for LLM Reinforcement Learning
|
|
5
5
|
Project-URL: Homepage, https://github.com/primeintellect-ai/verifiers
|
|
6
6
|
Project-URL: Documentation, https://github.com/primeintellect-ai/verifiers
|
|
@@ -31,7 +31,6 @@ Requires-Dist: httpx>=0.27.0
|
|
|
31
31
|
Requires-Dist: loguru>=0.7.0
|
|
32
32
|
Requires-Dist: math-verify>=0.8.0
|
|
33
33
|
Requires-Dist: mcp==2.2.0
|
|
34
|
-
Requires-Dist: msgpack>=1.1.2
|
|
35
34
|
Requires-Dist: numpy>=2.1.0
|
|
36
35
|
Requires-Dist: openai<3.0.0,>=2.54.0
|
|
37
36
|
Requires-Dist: orjson>=3.10.0
|
|
@@ -39,8 +38,7 @@ Requires-Dist: prime-pydantic-config[toml]>=0.4.3
|
|
|
39
38
|
Requires-Dist: prime-sandboxes>=0.5.5
|
|
40
39
|
Requires-Dist: prime-tunnel>=0.1.17
|
|
41
40
|
Requires-Dist: pydantic>=2.12.3
|
|
42
|
-
Requires-Dist:
|
|
43
|
-
Requires-Dist: renderers[multimodal]>=0.1.13.dev17
|
|
41
|
+
Requires-Dist: renderers[multimodal]>=0.2.0
|
|
44
42
|
Requires-Dist: tenacity>=8.5.0
|
|
45
43
|
Requires-Dist: tomli-w>=1.0.0
|
|
46
44
|
Requires-Dist: typing-extensions>=4.12.2
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
verifiers/__init__.py,sha256=F5IVMw6mhGaPBMCw7QKk0la_r5mMwydP2hdTTdQucik,352
|
|
2
|
-
verifiers/v1/__init__.py,sha256=
|
|
2
|
+
verifiers/v1/__init__.py,sha256=gVnDxIQXsDjha93fZzdLw2b1G5i8i28drSf75JHmmHY,18617
|
|
3
3
|
verifiers/v1/agent.py,sha256=_PBWiO3dmAGQvD4rCb5SIW6nLvYd7BBsPf1qxsQIXPw,47290
|
|
4
|
-
verifiers/v1/env.py,sha256=
|
|
5
|
-
verifiers/v1/episode.py,sha256
|
|
6
|
-
verifiers/v1/errors.py,sha256=
|
|
4
|
+
verifiers/v1/env.py,sha256=O8T22R5WO_a8_CSjjRp4JLB-3CVBbTSNIYqZCqkX9_g,18088
|
|
5
|
+
verifiers/v1/episode.py,sha256=bQnelv7mCvId3SP58VTDpPkoPDINP9NATEWDWtZ6APQ,6790
|
|
6
|
+
verifiers/v1/errors.py,sha256=OieUBIOZ6FW7oKygbXIRoag6RrPxKYpMPfEYPcCnVVE,5863
|
|
7
7
|
verifiers/v1/grading.py,sha256=Z8J9-UiQA_P8MOMn1CAGsD_SgmrQd6-H_VPmD27ezss,9685
|
|
8
|
-
verifiers/v1/graph.py,sha256=
|
|
8
|
+
verifiers/v1/graph.py,sha256=wsVUZmCSfu6FuEwEI1cDrroABFbBRnJX9yNVdNOi45A,48126
|
|
9
9
|
verifiers/v1/harness.py,sha256=Hvul6cbb9uWQl4GmHubvcRHqKdfeCY3n44r_ga0csfI,16806
|
|
10
10
|
verifiers/v1/judge.py,sha256=T-TyYVcLGIoyUADYKy_pCBj2CTLhERlct5pmmWqPpTA,10507
|
|
11
11
|
verifiers/v1/rollout.py,sha256=G18iKufPGkG7YYEgOnUbSocJpesdN2n-c1Q_GsSa2Y8,45967
|
|
@@ -14,13 +14,13 @@ verifiers/v1/session.py,sha256=fuw4eEVxTw_KlkSspxbgejEhmSXJYjX7bUquq2LJ_CU,29640
|
|
|
14
14
|
verifiers/v1/state.py,sha256=EckF2bWp-vV4b1jYJ9sLI5xrfGuI5spIgYYwW926toI,595
|
|
15
15
|
verifiers/v1/task.py,sha256=qiR_0iu5bR73VBbExs8nd3MIT89yoi6AW52V5uR_KLQ,15500
|
|
16
16
|
verifiers/v1/taskset.py,sha256=LE_3ogL7itU2Amk-N20cHkZ7Ev6MznJ0HpC8B1xb4w0,9482
|
|
17
|
-
verifiers/v1/trace.py,sha256=
|
|
18
|
-
verifiers/v1/types.py,sha256=
|
|
17
|
+
verifiers/v1/trace.py,sha256=qNUg5pNSym8iGZ4fZZ8NPKdU20kOmdVLhUbaaWKwQyg,40104
|
|
18
|
+
verifiers/v1/types.py,sha256=mEy4C9Hl3fK9091kxqalqbVZNRnSI5A0npRHchpsFsM,14800
|
|
19
19
|
verifiers/v1/acp/__init__.py,sha256=jY7nLAbB6uzSl-f6YCz05zBH5tarBLErNTkvV0vlaho,16613
|
|
20
20
|
verifiers/v1/acp/runner.py,sha256=sFsg0UgWeDjpjihejUidIV2yTapVj1Ap0cDTaEktjkI,15484
|
|
21
21
|
verifiers/v1/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
22
|
verifiers/v1/cli/debug.py,sha256=khQTSGzWAaYUv6zZpyixLF1KRYe8SDj-3G3Ji2SAd4s,11698
|
|
23
|
-
verifiers/v1/cli/gepa.py,sha256=
|
|
23
|
+
verifiers/v1/cli/gepa.py,sha256=osoZBqS0QoE4x82ylUX1_WFOY5MotsGm08DXDqc14VQ,4362
|
|
24
24
|
verifiers/v1/cli/output.py,sha256=vCscZ-g-sa-SLWDDQNoXBWelC_Je8lBdodvZGOe__eo,3285
|
|
25
25
|
verifiers/v1/cli/resolve.py,sha256=Q1EHM7wWQo0YkwJA898qtZbYLaIkjIVq3Q7kUp2YIxs,4346
|
|
26
26
|
verifiers/v1/cli/resume.py,sha256=hqV5AxxqeIInJeEZQerQznuijhMNijFEFcHZIltfLdE,470
|
|
@@ -32,24 +32,23 @@ verifiers/v1/clients/client.py,sha256=HT3aQiOyYYjvz_cKEXchtUSD07-4VehebWUJL9AyON
|
|
|
32
32
|
verifiers/v1/clients/eval.py,sha256=pWHgnRU8QQE6jnjJdwJNdvR8BeJ-z_OfjIB1tcwLpkc,8340
|
|
33
33
|
verifiers/v1/clients/train.py,sha256=JhGX7Q9MYIEAEM5fIDvNQH_wMlGS3SG32RNdsJhcNyA,20518
|
|
34
34
|
verifiers/v1/configs/__init__.py,sha256=X7u6X7B3ieD1HZl79Tv1kg-yPHbT0QLvAebaGqxVtvA,317
|
|
35
|
-
verifiers/v1/configs/agent.py,sha256=
|
|
35
|
+
verifiers/v1/configs/agent.py,sha256=xn9j1WcBIGz7LjgW8WOWDvSvk7vPLztisSLVcT2foxk,7530
|
|
36
36
|
verifiers/v1/configs/client.py,sha256=IvYQuPLVWr8qZNdMbQ9lRXK0wZ4vOjK67lO1lgD2fmM,6149
|
|
37
37
|
verifiers/v1/configs/deployment.py,sha256=Eggd8phUNVcq_f56Haw-OT5U6fTBLDhBnXFJ5AEb7MI,389
|
|
38
|
-
verifiers/v1/configs/env.py,sha256=
|
|
38
|
+
verifiers/v1/configs/env.py,sha256=DgjIbU5NxLGV7h4v-2lcDJF-y4S_VqnEqNNrNt7Ztrk,7532
|
|
39
39
|
verifiers/v1/configs/harness.py,sha256=I9DcHzml17T7SYHobP7E6jHwNSL2eSqEtckioQ2pGNQ,3356
|
|
40
40
|
verifiers/v1/configs/interception.py,sha256=3gFD8j1Mpvdl5WtXYRnZ66fAqMYi-NR5OjSbUm_IWJc,3778
|
|
41
41
|
verifiers/v1/configs/judge.py,sha256=nP5rE430PCtyLYIZ772EpWXEPZxg6GaiUgeGXOEj0v8,2222
|
|
42
42
|
verifiers/v1/configs/retries.py,sha256=GIrwS0lnMKnlQ_Wj1Z2J6NlEYK4jX5weZxYmQmLcpUI,1793
|
|
43
|
-
verifiers/v1/configs/runtime.py,sha256=
|
|
43
|
+
verifiers/v1/configs/runtime.py,sha256=7To2aecnYuv_ThVt5OIlKUiocldmt4O0hZzkSwuJsBI,11773
|
|
44
44
|
verifiers/v1/configs/sampling.py,sha256=bd6lietww4htrNYmUEqwK5yfKMhUT3nEjHoCg5xl_ys,1174
|
|
45
45
|
verifiers/v1/configs/scoring.py,sha256=8t5NrQU9b8R9dGdcG-aQm_U1m3TgeMIbw_XUN4esoF0,3115
|
|
46
46
|
verifiers/v1/configs/select.py,sha256=_HdcepQaJ1sDCYcs7Vqx72npDwHGOgUjsLDZmcgnonU,4743
|
|
47
|
-
verifiers/v1/configs/serve.py,sha256=oa_0BrAVEKboU344w0hYkSaXj8lf26t0H87gvncAo0Q,2716
|
|
48
47
|
verifiers/v1/configs/task.py,sha256=3CB9pumHdxAHlxLKuLEiCfQPW37tNqy_HC6DgG2GKj4,2958
|
|
49
48
|
verifiers/v1/configs/taskset.py,sha256=rQow8AJL34n-ZVQ_4GPjPIW5fzBL5QU_RTjJO9tlmwU,945
|
|
50
49
|
verifiers/v1/configs/cli/__init__.py,sha256=YMDUPdbRlDJ77dhj3QqzmyRhqNgUvuQdpj_bdBqzZPM,78
|
|
51
50
|
verifiers/v1/configs/cli/debug.py,sha256=1vddnShdwYzRJp0Ubl9sp7sgnR3m2JKHkAOk741UnWU,2748
|
|
52
|
-
verifiers/v1/configs/cli/env.py,sha256=
|
|
51
|
+
verifiers/v1/configs/cli/env.py,sha256=MdN9VyGqecALu6IILYffjMXNcPcdAXvafisKq52Eajg,2584
|
|
53
52
|
verifiers/v1/configs/cli/run.py,sha256=j6ccPxFPiWsmCAmbZcc_EtElNOMaKS9YiiSDMqudczw,3794
|
|
54
53
|
verifiers/v1/configs/cli/validate.py,sha256=j6qRi2EvacXTCARnVhkFRtX9xF3IP3eVVt-Zv2ER5Vw,4073
|
|
55
54
|
verifiers/v1/dialects/__init__.py,sha256=MNOYM2NdTlSxGK4VtoEjMtD5zya2MpjPDX5jMvZUWEo,736
|
|
@@ -70,7 +69,7 @@ verifiers/v1/envs/user_sim/__init__.py,sha256=nnT695HdqjAEouYL5wtVu6MhIp2wf5yuK-
|
|
|
70
69
|
verifiers/v1/envs/user_sim/env.py,sha256=deI4r-Utn_v4E_Vb9P_X3LzFh2GRkCO4OlQt8BOCMGY,4942
|
|
71
70
|
verifiers/v1/gepa/__init__.py,sha256=6nmdRE0-34AKioPHBjTxUg5Jo_2z7tMX-OU3zMNpAJI,197
|
|
72
71
|
verifiers/v1/gepa/adapter.py,sha256=YFQKf4H-sxZevylJWaBC5PDs2YDTalwIgtx39HzWDFg,6252
|
|
73
|
-
verifiers/v1/gepa/config.py,sha256=
|
|
72
|
+
verifiers/v1/gepa/config.py,sha256=e1qYZOKzvfN6hehFSKba4hEdbR22yQEYeSEFOCqchYI,4735
|
|
74
73
|
verifiers/v1/gepa/dataset.py,sha256=cS4MtQVoBOnAHKs8REQm5lKGeqUpdXPU1hROU67aBG4,2130
|
|
75
74
|
verifiers/v1/gepa/reflection.py,sha256=V1VSXuszkw5Fikwqwe5KSwunhlibudZ7F8csUXraENk,1144
|
|
76
75
|
verifiers/v1/gepa/runner.py,sha256=eYULQ0EiKHPGObrOlxq-0YRpKQMzl1tis_H64uFh6hk,5869
|
|
@@ -124,7 +123,7 @@ verifiers/v1/harnesses/utils/mcp.py,sha256=EtDraHEqgsOB6xKvcF2z9C6HlQyKoST0ZDvmy
|
|
|
124
123
|
verifiers/v1/harnesses/utils/replay.py,sha256=RJMzD-3K0oz_Q0zhjSH4nhwxn95R8e9Q_CCN5sZp9RA,1720
|
|
125
124
|
verifiers/v1/interception/__init__.py,sha256=PMysLlBer-tRpMO2J_ffetK6H77T_lmhJuRwYZb8y3I,4018
|
|
126
125
|
verifiers/v1/interception/base.py,sha256=KlXpWgcpAs_vzJxXRTVArZ9ilSV_vNfsX6vlZ35Y7kc,2249
|
|
127
|
-
verifiers/v1/interception/pool.py,sha256=
|
|
126
|
+
verifiers/v1/interception/pool.py,sha256=F9rMz9lh0EYIp-kkybiPameKhdRXPvjGViCdzOI1ci4,6464
|
|
128
127
|
verifiers/v1/interception/server.py,sha256=Rcl-CQ9CuntFjY3eKMpTL7OCmDYiDALnpl-3KFTLzyk,52461
|
|
129
128
|
verifiers/v1/interception/tunnel/__init__.py,sha256=4ZqR9F7cmLUg17qvk4sXtLpWAN4epdiMgA2l9jetMbU,721
|
|
130
129
|
verifiers/v1/interception/tunnel/base.py,sha256=UrHXwbpB_qdh4WHWZHpi2D-wEHcHgg06_0U66XFqm3M,2370
|
|
@@ -137,7 +136,7 @@ verifiers/v1/judges/reference.txt,sha256=Ej35kGXiT2uJ0LcHIeez49rCS_9uHmCQKoVdn93
|
|
|
137
136
|
verifiers/v1/judges/rubric.py,sha256=yRaOnc6S6cqrLuySkMsgxsBFCRUA2bBjYSa5qOT-inQ,16158
|
|
138
137
|
verifiers/v1/judges/rubric.txt,sha256=3KA2ZeYYdcDweJhUGopxu9EFgARhu2aWft5S5cj8Bc8,323
|
|
139
138
|
verifiers/v1/mcp/__init__.py,sha256=zJw_R6n-rDqB80_Zs1VGCrYVCZGi8nS7qGaSUKFsB50,479
|
|
140
|
-
verifiers/v1/mcp/launch.py,sha256=
|
|
139
|
+
verifiers/v1/mcp/launch.py,sha256=lDfbuPwNJZTlc5Jt50AQ1J5J8q9VqkXVqbxcDqXJOqI,32221
|
|
141
140
|
verifiers/v1/mcp/server.py,sha256=-NJT4kCULOmg_Cc8JJmUq8ZvvPeaNAC8YCtLBwkEBMA,14157
|
|
142
141
|
verifiers/v1/mcp/toolset.py,sha256=GMLjCb2A8OhQZhRU9i8RXcLc68mXC5Niqhwz1UT-dGQ,2615
|
|
143
142
|
verifiers/v1/runtimes/__init__.py,sha256=JrBktZBcRLSnnZh_Er9IuGOVBGYUybJSPHi1q_b-UrI,3386
|
|
@@ -145,22 +144,15 @@ verifiers/v1/runtimes/base.py,sha256=_9AWq7KMW3QNV05NARMB4i_kSZpDqrRZoOech349WqQ
|
|
|
145
144
|
verifiers/v1/runtimes/compose.py,sha256=ttKfNBFGL1wGRX7Ek4oguENMjwRgb2Epp2SWZ8PLizQ,15946
|
|
146
145
|
verifiers/v1/runtimes/deployment.py,sha256=HnofN0L4ubKT0O370Liby06c9kkgbMtH3jB4bI1eJck,7466
|
|
147
146
|
verifiers/v1/runtimes/egress.py,sha256=4zsNS3Z2A2HyoCcbgaLizA30uJabYrbgYAYUfvyzeBk,23703
|
|
148
|
-
verifiers/v1/runtimes/limiters.py,sha256=
|
|
149
|
-
verifiers/v1/runtimes/native_compose.py,sha256=
|
|
147
|
+
verifiers/v1/runtimes/limiters.py,sha256=RWR4HdYoa72yeWF_lM7YRLflm10euE3_gPfNG0BuaOc,2742
|
|
148
|
+
verifiers/v1/runtimes/native_compose.py,sha256=kRQl7q1-untJHBYAPpDES5kLaHtmyY9wuFFBipj8cBo,39292
|
|
150
149
|
verifiers/v1/runtimes/private_network.py,sha256=8r8VODHB5k5WqbwJIx-dmMcPJKPNsIVbDu3JdrQLU2Y,6613
|
|
151
150
|
verifiers/v1/runtimes/runtime.py,sha256=-CvhH42y0F0dPeNgDRVBeajkRK_vZYp2qxKY1XVf-s0,9897
|
|
152
151
|
verifiers/v1/runtimes/strategies.py,sha256=nQC_dsuYwpPz46js2LNY5nuGyFXv8znKU7_xH5s9aVk,8624
|
|
153
152
|
verifiers/v1/runtimes/backends/custom.py,sha256=Iz1Brd4dBTpO1zYVc2KA0u5sxz5ZUROY_Cdme5W33hM,2875
|
|
154
153
|
verifiers/v1/runtimes/backends/docker.py,sha256=S6xwCYUR8RwNcdG45H0Bw_lNDo7_049MG0Y3CznoMtM,31476
|
|
155
|
-
verifiers/v1/runtimes/backends/prime.py,sha256=
|
|
154
|
+
verifiers/v1/runtimes/backends/prime.py,sha256=Lf92Wo64W9rgejTE5KBVZFqfCDaQYmRYiAmiyGnn9S8,24444
|
|
156
155
|
verifiers/v1/runtimes/backends/subprocess.py,sha256=dCfazoyJHwrfb2fMNRv6QzD6EsYlZXcEDT0x-8MAp3I,8419
|
|
157
|
-
verifiers/v1/serve/__init__.py,sha256=4Oe4xFVu-lyCHpG6u9e0TbmV7ZVYHiwFZXW8UO0H7mA,595
|
|
158
|
-
verifiers/v1/serve/client.py,sha256=el91rqoUpf_1Ty8-QVs_AV0MyNaQaQtxHYTLR2LwQHc,13948
|
|
159
|
-
verifiers/v1/serve/delta.py,sha256=HkCiitDn3SCBJBxOzRX4rD7ykN7b58XVS4qnQxteP4s,12324
|
|
160
|
-
verifiers/v1/serve/encoding.py,sha256=hBZFucAZK9riXOV3DaHcskq9zHTT8gVGkoFVOPfnr30,2499
|
|
161
|
-
verifiers/v1/serve/pool.py,sha256=SF1d94vpH2CpDnSwpeITRkGLVbBzfD0CQodVZ_HCJew,18358
|
|
162
|
-
verifiers/v1/serve/server.py,sha256=KS1OiRMNRnhncQXlzwrdjh5g0-xT3Ov74aFdgJ1b1ZY,14536
|
|
163
|
-
verifiers/v1/serve/types.py,sha256=Ua_dE4sC-APox-0Pnm-jgWcrLa9Qywafel32KrawY5I,1752
|
|
164
156
|
verifiers/v1/tasksets/__init__.py,sha256=2ijE3qIlLoUA02g6iysOwWQylyBBQL1GhSpjv8_bp0w,521
|
|
165
157
|
verifiers/v1/tasksets/harbor/__init__.py,sha256=FjW4tM3rgGALMK-8p7ux26G4-d4ZFVmaAmO6Fni6e_g,214
|
|
166
158
|
verifiers/v1/tasksets/harbor/taskset.py,sha256=Ganz72MxzVn7zfdk-GCK3KMULAelGRtDQBdE6tXYMjc,42720
|
|
@@ -186,19 +178,19 @@ verifiers/v1/utils/generic.py,sha256=lKIzu5rvwnuSlr_kTFdupf-ElubjjvOo0vnBHYMUpC4
|
|
|
186
178
|
verifiers/v1/utils/git.py,sha256=MTRinOvG4EddfjdahHkFZUihHmhJ37n5ROtgjzjE1NA,8366
|
|
187
179
|
verifiers/v1/utils/image.py,sha256=OFw_wdwVtbdwa8uJ3X3vYfhpUAi0CTH5HMBupjVsRRQ,282
|
|
188
180
|
verifiers/v1/utils/interrupt.py,sha256=-HM8bG7X0ssPOSkdIUmvOKxCBDtFNs_7T49WbfiXP4U,1029
|
|
189
|
-
verifiers/v1/utils/loaders.py,sha256=
|
|
181
|
+
verifiers/v1/utils/loaders.py,sha256=Oq0nzTxnrfE6mKXBjD2aj4LF3MqFpK-WWrObVQQ_SQ8,13049
|
|
190
182
|
verifiers/v1/utils/logging.py,sha256=T5acH53_-ycAdDOIiLmuH8yizVV5qvWJnIhCMn0y1Ug,1882
|
|
191
183
|
verifiers/v1/utils/memory.py,sha256=ZkIvGk6uITAH5sKon65LifKPbvZr8mJ__PVc23FZpOQ,1835
|
|
192
184
|
verifiers/v1/utils/network.py,sha256=SI6_PXHIAPows6VBpK75N6dMbPw6lWQQ3OjBQkSDGN4,1463
|
|
193
185
|
verifiers/v1/utils/paths.py,sha256=it_4JWf_8bPZe4TRcyvL7_KJ4fsbEsxhhIY_xA8Ikus,308
|
|
194
186
|
verifiers/v1/utils/prime.py,sha256=UTYRjp9cbjNb6CVmBHda-1wWZAIIfxNOmTyNuT7_wL4,970
|
|
195
187
|
verifiers/v1/utils/retries.py,sha256=xTDdORf9BmFq7HhxEjNkhuduOSVekCl4l2ei9ZlQIIQ,6052
|
|
196
|
-
verifiers/v1/utils/scope.py,sha256=
|
|
188
|
+
verifiers/v1/utils/scope.py,sha256=ivYGJ8GhzyRKbP4L48VsUDWFxpmFsjeaE_7KYBKJ_c0,826
|
|
197
189
|
verifiers/v1/utils/score.py,sha256=493yJVMw8teCu9JxapxMFPFzI0hNUqdo0Y2nGW4kckk,6200
|
|
198
190
|
verifiers/v1/utils/trace_store.py,sha256=Qo9qvsJAl8PoRUavjQAfUB2VNxmUtYQtU2ejLKPzY9c,3382
|
|
199
191
|
verifiers/v1/utils/version.py,sha256=-obEo_-l9-D8FLef4hYxncOe-uJpxrM1g2Hig_37Sgs,1607
|
|
200
|
-
verifiers-0.4.1.
|
|
201
|
-
verifiers-0.4.1.
|
|
202
|
-
verifiers-0.4.1.
|
|
203
|
-
verifiers-0.4.1.
|
|
204
|
-
verifiers-0.4.1.
|
|
192
|
+
verifiers-0.4.1.dev151.dist-info/METADATA,sha256=Gr1c1t4ePVpiNYRa9n38ltjW-FvTAHRHEuhwLneoO74,5138
|
|
193
|
+
verifiers-0.4.1.dev151.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
194
|
+
verifiers-0.4.1.dev151.dist-info/entry_points.txt,sha256=3M8Wr0w1cUKiB-fJ6YHB6eK5WuKYg-Y3OC4wCuUje_c,174
|
|
195
|
+
verifiers-0.4.1.dev151.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
|
|
196
|
+
verifiers-0.4.1.dev151.dist-info/RECORD,,
|
verifiers/v1/configs/serve.py
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"""How an env is served: the worker pool, where it binds, and each worker's bound.
|
|
2
|
-
|
|
3
|
-
Serving is its own axis. `[env]` says what runs; this says how it's hosted, so an
|
|
4
|
-
eval and a trainer's env server configure it identically instead of each flattening
|
|
5
|
-
pool knobs onto its own config."""
|
|
6
|
-
|
|
7
|
-
from typing import Annotated, Literal
|
|
8
|
-
|
|
9
|
-
from pydantic import Field
|
|
10
|
-
from pydantic_config import BaseConfig
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class StaticPoolConfig(BaseConfig):
|
|
14
|
-
"""Fixed env-server pool: pre-spawn `num_workers` workers up front."""
|
|
15
|
-
|
|
16
|
-
type: Literal["static"] = "static"
|
|
17
|
-
num_workers: int = Field(4, ge=1)
|
|
18
|
-
"""Worker processes to pre-spawn (1 = a single in-process server, no pool)."""
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class ElasticPoolConfig(BaseConfig):
|
|
22
|
-
"""Elastic env-server pool: start at one worker and scale up on demand."""
|
|
23
|
-
|
|
24
|
-
type: Literal["elastic"] = "elastic"
|
|
25
|
-
max_workers: int | None = None
|
|
26
|
-
"""Upper bound on workers (None = unbounded)."""
|
|
27
|
-
multiplex: int = Field(128, ge=1)
|
|
28
|
-
"""Episodes per worker for the scale-up trigger: add a worker once in-flight episodes
|
|
29
|
-
reach 90% of `workers * multiplex`."""
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
# Discriminated on `type` so the CLI selects with `--serve.pool.type static|elastic`.
|
|
33
|
-
PoolConfig = Annotated[
|
|
34
|
-
StaticPoolConfig | ElasticPoolConfig, Field(discriminator="type")
|
|
35
|
-
]
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
class ServeConfig(BaseConfig):
|
|
39
|
-
"""The `[serve]` block: the worker pool, the ZMQ address, and each worker's
|
|
40
|
-
episode bound. Read by whoever hosts the env — a server-backed eval, a
|
|
41
|
-
trainer's env-server process."""
|
|
42
|
-
|
|
43
|
-
pool: PoolConfig = Field(default_factory=ElasticPoolConfig)
|
|
44
|
-
"""Worker-pool sizing. `elastic` (default) starts at one worker and scales up on
|
|
45
|
-
demand; `static` pre-spawns a fixed `num_workers`."""
|
|
46
|
-
address: str | None = None
|
|
47
|
-
"""ZMQ address the ROUTER binds (and clients connect to). None leaves the choice
|
|
48
|
-
to whoever hosts the env — `serve_env` falls back to its default loopback bind, a
|
|
49
|
-
launcher may derive one per server."""
|
|
50
|
-
max_concurrent: int | None = Field(None, ge=1)
|
|
51
|
-
"""Episodes in flight per worker (None = take the run's own bound, e.g. an eval's
|
|
52
|
-
`--max-concurrent`). Pin it to hold a worker below what the run asks for; how many
|
|
53
|
-
agent runs one episode carries is the env's own
|
|
54
|
-
(`--env.max-concurrent-agents`, one at a time by default)."""
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
def pool_serve_kwargs(pool: StaticPoolConfig | ElasticPoolConfig) -> dict:
|
|
58
|
-
"""Unpack a pool config into `serve_env` kwargs (`max_workers` / `multiplex` / `elastic`)."""
|
|
59
|
-
if isinstance(pool, ElasticPoolConfig):
|
|
60
|
-
return {
|
|
61
|
-
"max_workers": pool.max_workers,
|
|
62
|
-
"multiplex": pool.multiplex,
|
|
63
|
-
"elastic": True,
|
|
64
|
-
}
|
|
65
|
-
return {"max_workers": pool.num_workers, "elastic": False}
|
verifiers/v1/serve/__init__.py
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
from verifiers.v1.serve.client import EnvClient
|
|
2
|
-
from verifiers.v1.serve.delta import EpisodeAssembly
|
|
3
|
-
from verifiers.v1.serve.pool import EnvServerPool, env_config_data, serve_env
|
|
4
|
-
from verifiers.v1.serve.server import EnvServer, set_episode_hook
|
|
5
|
-
from verifiers.v1.serve.types import (
|
|
6
|
-
HealthRequest,
|
|
7
|
-
HealthResponse,
|
|
8
|
-
RunRequest,
|
|
9
|
-
RunResponse,
|
|
10
|
-
)
|
|
11
|
-
|
|
12
|
-
__all__ = [
|
|
13
|
-
"EnvClient",
|
|
14
|
-
"EnvServer",
|
|
15
|
-
"EnvServerPool",
|
|
16
|
-
"EpisodeAssembly",
|
|
17
|
-
"HealthRequest",
|
|
18
|
-
"HealthResponse",
|
|
19
|
-
"RunRequest",
|
|
20
|
-
"RunResponse",
|
|
21
|
-
"env_config_data",
|
|
22
|
-
"serve_env",
|
|
23
|
-
"set_episode_hook",
|
|
24
|
-
]
|