verifiers 0.2.2.dev7__py3-none-any.whl → 0.2.2.dev9__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/agent.py CHANGED
@@ -221,19 +221,19 @@ class Agent:
221
221
  task: Task,
222
222
  *,
223
223
  runtime: Runtime | None = None,
224
- shared_tools: Mapping[str, SharedToolServer] | None = None,
224
+ tools: Mapping[str, SharedToolServer] | None = None,
225
225
  on_trace: Callable[[Trace], None] | None = None,
226
226
  ) -> Trace:
227
227
  """Run this agent on `task` once and return the trace: `runtime` places it
228
- into a live borrowed box instead of provisioning one; `shared_tools` are
229
- live servers borrowed from their owner, counted in the pairing check;
228
+ into a live borrowed box instead of provisioning one; `tools` are live
229
+ servers borrowed from their owner, counted in the pairing check;
230
230
  `on_trace` observes the trace the moment it's minted, before any I/O.
231
231
  Retries whole while the trace ends with a retryable error (`config.retries`)
232
232
  — never into a borrowed box; the final trace keeps earlier attempts' errors."""
233
233
  retry = self.config.retries
234
234
  history: list = []
235
235
  for attempt in range(retry.max_retries + 1):
236
- trace = await self._run_once(task, runtime, shared_tools, on_trace)
236
+ trace = await self._run_once(task, runtime, tools, on_trace)
237
237
  if attempt == retry.max_retries or not trace_should_retry(trace, retry):
238
238
  break
239
239
  if runtime is not None:
@@ -356,7 +356,7 @@ class _EpisodeAgent(Agent):
356
356
  they're created, finished ones land in `completed` (the episode's traces),
357
357
  each run takes the eval's gate. The taskset's shared tool servers ride only
358
358
  its own tasks — on an env-minted task they'd wrongly put MCP in play
359
- (`shared_tools=` overrides)."""
359
+ (`tools=` overrides)."""
360
360
 
361
361
  def __init__(
362
362
  self,
@@ -392,7 +392,7 @@ class _EpisodeAgent(Agent):
392
392
  task: Task,
393
393
  *,
394
394
  runtime: Runtime | None = None,
395
- shared_tools: Mapping[str, SharedToolServer] | None = None,
395
+ tools: Mapping[str, SharedToolServer] | None = None,
396
396
  on_trace: Callable[[Trace], None] | None = None,
397
397
  ) -> Trace:
398
398
  last: Trace | None = None
@@ -416,9 +416,7 @@ class _EpisodeAgent(Agent):
416
416
  trace = await super().run(
417
417
  task,
418
418
  runtime=runtime,
419
- shared_tools=shared_tools
420
- if shared_tools is not None
421
- else self._shared_for(task),
419
+ tools=tools if tools is not None else self._shared_for(task),
422
420
  on_trace=watch,
423
421
  )
424
422
  self._completed.append(trace)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: verifiers
3
- Version: 0.2.2.dev7
3
+ Version: 0.2.2.dev9
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
@@ -22,7 +22,6 @@ verifiers/clients/openai_chat_completions_token_client.py,sha256=EGOF9LNW9hgfnpy
22
22
  verifiers/clients/openai_completions_client.py,sha256=bMyI87oXMWNMGqbCixF2091GhsJSoPEG_9L0cv8QKk0,7200
23
23
  verifiers/clients/openai_responses_client.py,sha256=D3k3NW_7vEpeT6_zrimIHJNcwlVmrp44PSXsZmIv28Y,18090
24
24
  verifiers/clients/renderer_client.py,sha256=C3lUoBZO24usJwDFkD-4URHz0s1q4Q-kG1rJDjzGBsc,26800
25
- verifiers/envs/AGENTS.md,sha256=IFPCx9msgDc8yjLN2pwag09MP0zmE-1C7wlV6xGN3Kk,3695
26
25
  verifiers/envs/__init__.py,sha256=OXkw2QcypssNW5BJmIzw7IpBs9uRMyYQSjlXDHpjIIE,86
27
26
  verifiers/envs/env_group.py,sha256=kxL8YyENBPbis4AmboilIDmy6d_u3zqkG86_kBNEnZQ,16446
28
27
  verifiers/envs/environment.py,sha256=DjYR7KxJZCTSoFcTHJVNjQieXOl39ftAnKxjUryGBpc,53921
@@ -169,7 +168,7 @@ verifiers/utils/tool_utils.py,sha256=gInWZODWQUZN4TyEMuuITyOUm9qlHJxtcvr1zZl_zJs
169
168
  verifiers/utils/usage_utils.py,sha256=GPLC0xGY_Obrr8X7huWY-2iODZ7tgX-MtO8WSDN4rXI,3904
170
169
  verifiers/utils/version_utils.py,sha256=am3hZLnlaUWTFdllGZR1VMN91hEhiiE8FDmPf1cOG1k,2642
171
170
  verifiers/v1/__init__.py,sha256=r8khgi7_KSY4AfevEefSslyxytScmMzzCBA6kjqvd1I,6653
172
- verifiers/v1/agent.py,sha256=RSBHKw-vUnXiEQk04G6HKg854p88YAQ4Kmxaeml-TlY,19472
171
+ verifiers/v1/agent.py,sha256=k6BBNSgwPkqLe5klzlRLQaNJfSFS1xwwgf_HWa8vaXI,19384
173
172
  verifiers/v1/decorators.py,sha256=XRMkUQSyvXCYP5fOwzBYV5qEOlxLg6rzYhnhrHHHTIQ,3838
174
173
  verifiers/v1/env.py,sha256=WAShpDP4m1i25CcR7KS4u50s3efynT6LOn2EbF8eId8,24788
175
174
  verifiers/v1/episode.py,sha256=XgcStr5k0N4CQ8NXvJzlwZ0y4RNp9cBsE27N47h3750,2307
@@ -316,8 +315,8 @@ verifiers/v1/utils/logging.py,sha256=OcMHA6NsYux3oIzjPuI95rDWmFBHNcHDjZeNIhXTX-Y
316
315
  verifiers/v1/utils/memory.py,sha256=ZkIvGk6uITAH5sKon65LifKPbvZr8mJ__PVc23FZpOQ,1835
317
316
  verifiers/v1/utils/sampling.py,sha256=JczGzBn6s3wsIrSY2Hy3hE8m6NreNgsNzhSjDikQqX0,1037
318
317
  verifiers/v1/utils/version.py,sha256=75ZtI2NHBmlb52KpcKLUpiSXp8q4bASr7uKeXoCKlT8,1582
319
- verifiers-0.2.2.dev7.dist-info/METADATA,sha256=XGofHtw6moKoR60FkN2wIiOs5Gh0nNh2ttkkALN1A-A,4540
320
- verifiers-0.2.2.dev7.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
321
- verifiers-0.2.2.dev7.dist-info/entry_points.txt,sha256=dF82JUYEFslR1AOW8LZfuBWeZeQoyX4wCRrduklg8-I,551
322
- verifiers-0.2.2.dev7.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
323
- verifiers-0.2.2.dev7.dist-info/RECORD,,
318
+ verifiers-0.2.2.dev9.dist-info/METADATA,sha256=Hodwf1DME43T0xj2O9ZZHTaxn5kmVcbYl75jYEhUjt8,4540
319
+ verifiers-0.2.2.dev9.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
320
+ verifiers-0.2.2.dev9.dist-info/entry_points.txt,sha256=dF82JUYEFslR1AOW8LZfuBWeZeQoyX4wCRrduklg8-I,551
321
+ verifiers-0.2.2.dev9.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
322
+ verifiers-0.2.2.dev9.dist-info/RECORD,,
verifiers/envs/AGENTS.md DELETED
@@ -1,72 +0,0 @@
1
- # Environments
2
-
3
- **WIP** -- subject to change.
4
-
5
- ## Overview
6
-
7
- Environment classes are organized into three categories:
8
-
9
- | Category | Location | Description |
10
- |----------|----------|-------------|
11
- | **Core** | `verifiers/envs/` | Stable base classes and sandbox environments |
12
- | **Integrations** | `verifiers/envs/integrations/` | Third-party library wrappers (lazy-loaded, require extras) |
13
- | **Experimental** | `verifiers/envs/experimental/` | Newer environments with sharper edges |
14
-
15
- Avoid storing global state in the environment. Instead, use the state argument to the environment's methods.
16
-
17
- ## Core Environments
18
-
19
- Base classes for building environments:
20
-
21
- - `SingleTurnEnv` - Single response Q&A tasks
22
- - `MultiTurnEnv` - Multi-turn interactions (games, simulations, agents)
23
- - `ToolEnv` - Stateless, idempotent tools passed as Python functions with all arguments exposed to the model. For managing additional state, use `StatefulToolEnv`.
24
- - `StatefulToolEnv` - Tools requiring per-rollout state (e.g. sandbox ID). Use `update_tool_args` to inject state into tool calls. See `sandbox_env.py` for an example.
25
- - `SandboxEnv` - Sandboxed container execution using `prime` sandboxes. All sandbox setup logic should be included in the start command and queued via `setup_state`, but not awaited—await resources only when first needed to overlap provisioning with rollout. See `python_env.py` for an example.
26
- - `PythonEnv` - Persistent Python REPL in sandbox
27
-
28
- ## Integrations
29
-
30
- Third-party library wrappers that require additional dependencies:
31
-
32
- | Environment | Extra | Install Command |
33
- |-------------|-------|-----------------|
34
- | `TextArenaEnv` | `ta` | `uv add 'verifiers[ta]'` |
35
- | `ReasoningGymEnv` | `rg` | `uv add 'verifiers[rg]'` |
36
- | `BrowserEnv` | `browser` | `uv add 'verifiers[browser]'` |
37
-
38
- When developing in the `verifiers` repo:
39
- ```bash
40
- uv sync --extra ta # for TextArenaEnv
41
- uv sync --extra rg # for ReasoningGymEnv
42
- uv sync --extra browser # for BrowserEnv
43
- ```
44
-
45
- ### TextArenaEnv
46
-
47
- Wrapper for text-based TextArena environments (games, simulations). When adding new TextArena environments, investigate the `textarena` source code to determine the observation format. Often you'll want to re-render observations via `feedback_fn`, as `verifiers` doesn't allow overwriting past messages (only concatenation), and many TextArena games return full game state rather than turn-level diffs.
48
-
49
- ### ReasoningGymEnv
50
-
51
- Wrapper for [reasoning-gym](https://github.com/reasoning-gym/reasoning-gym) procedural datasets. Supports single datasets or composite mixtures via `DatasetSpec`.
52
-
53
- ### BrowserEnv
54
-
55
- Browser automation environment using [Browserbase](https://browserbase.com) with two modes:
56
-
57
- **DOM mode** (`mode="dom"`): Natural language browser control via Stagehand SDK.
58
-
59
- **CUA mode** (`mode="cua"`): Vision-based browser control using coordinate-based primitives.
60
-
61
- CUA mode supports automatic sandbox deployment (`use_sandbox=True`, the default), where the CUA server is automatically deployed to a sandbox container. This eliminates the need for manual server setup. The server files are located in `assets/templates/browserbase/cua/` and are uploaded to sandboxes during rollout initialization.
62
-
63
- For local development, set `use_sandbox=False` and start the server manually from `assets/templates/browserbase/cua/`.
64
-
65
- ## Experimental
66
-
67
- See `verifiers/envs/experimental/README.md` for documentation on:
68
- - `GymEnv` - Universal Gym-compatible environment runner
69
- - `MCPEnv` - MCP server integration
70
- - `CliAgentEnv` - Agent code in sandboxes with API call interception
71
- - V1 `vf.Env` / `vf.Taskset` / `vf.Harness` - taskset/harness agent composition
72
- - `HarborEnv` - Harbor-format task loading