verifiers 0.2.2.dev44__py3-none-any.whl → 0.2.2.dev46__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.
@@ -223,21 +223,14 @@ class PrimeRuntime(Runtime):
223
223
 
224
224
  async def run(self, argv: list[str], env: dict[str, str]) -> ProgramResult:
225
225
  try:
226
- # Poll directly so the rollout stage owns the execution timeout; the SDK helper
227
- # otherwise imposes its own 15-minute limit.
228
- job = await self._client.start_background_job(
226
+ result = await self._client.run_background_job(
229
227
  self.info.id,
230
228
  shlex.join(argv),
229
+ timeout=MAX_LIFETIME,
231
230
  working_dir=self.config.workdir,
232
231
  env=env,
232
+ poll_interval=1,
233
233
  )
234
- delay = 0.1
235
- while True:
236
- result = await self._client.get_background_job(self.info.id, job)
237
- if result.completed:
238
- break
239
- await asyncio.sleep(delay)
240
- delay = min(delay * 2, 3)
241
234
  except (
242
235
  Exception
243
236
  ) as e: # a sandbox/API failure is one rollout's problem, not the eval's
@@ -1,6 +1,6 @@
1
1
  from typing import ClassVar
2
2
 
3
- from pydantic import BaseModel, Field, field_serializer, model_validator
3
+ from pydantic import BaseModel, Field, SerializeAsAny, model_validator
4
4
 
5
5
  from verifiers.v1.clients.config import ClientConfig
6
6
  from verifiers.v1.episode import WireEpisode
@@ -65,15 +65,11 @@ class RunRequest(BaseRequest):
65
65
 
66
66
 
67
67
  class RunResponse(BaseResponse):
68
- episode: WireEpisode | None = None
68
+ episode: SerializeAsAny[WireEpisode] | None = None
69
69
  """The rollout's episode — its standing (`id`/`env`/`errors`, carrying
70
70
  episode-level errors even when no trace minted) inlined next to its flat,
71
71
  self-contained traces; task-specific data preserved in `model_extra`."""
72
72
 
73
- @field_serializer("episode")
74
- def _ser_episode(self, episode: "WireEpisode | None") -> dict | None:
75
- return episode.model_dump() if episode is not None else None
76
-
77
73
 
78
74
  class RunGroupRequest(BaseRequest):
79
75
  """Legacy (v0) route: group-scored v0 envs run a task's n rollouts together."""
@@ -87,8 +83,4 @@ class RunGroupRequest(BaseRequest):
87
83
 
88
84
 
89
85
  class RunGroupResponse(BaseResponse):
90
- traces: list[WireTrace] | None = None
91
-
92
- @field_serializer("traces")
93
- def _ser_traces(self, traces: "list[WireTrace] | None") -> list[dict] | None:
94
- return [t.model_dump() for t in traces] if traces is not None else None
86
+ traces: list[SerializeAsAny[WireTrace]] | None = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: verifiers
3
- Version: 0.2.2.dev44
3
+ Version: 0.2.2.dev46
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
@@ -297,7 +297,7 @@ verifiers/v1/runtimes/__init__.py,sha256=TqNtJVahzQuLS4fgCVeT9xdOzTkp0hRAPOkl7eF
297
297
  verifiers/v1/runtimes/base.py,sha256=sTCiLo51yAU_T-Voc3BTH-FuzyEM0cGY05VzFE4DmYc,14720
298
298
  verifiers/v1/runtimes/limiters.py,sha256=ZjjYUFEt20yH8ggL5uU9w9U500AOB44qSUTQ7bYyh0c,2730
299
299
  verifiers/v1/runtimes/modal.py,sha256=FnocoJd9lQVQS3V3CoBon7KpKXm1bKWWeU2FAkq2bKU,8825
300
- verifiers/v1/runtimes/prime.py,sha256=wldpcZnKZHNRldpoubeMgHdl-ZlKWOyeulFu4nHNKwc,15110
300
+ verifiers/v1/runtimes/prime.py,sha256=zMMoB85uqwXjRTTyb3q5C7Xs4VmHagB8oI92Kuc-E1E,14755
301
301
  verifiers/v1/runtimes/subprocess.py,sha256=dOqYZycTO5wmXqg0Lg1h3l_CPh6Zok4PmTFcc-uE4WY,5989
302
302
  verifiers/v1/runtimes/docker/__init__.py,sha256=eC5hjfyPwvwEKaeZUeP9EN8tJkrl0HUxGMzjiK4tK4Q,14555
303
303
  verifiers/v1/runtimes/docker/egress.py,sha256=37UXgNX9gnoLxjMg4KZaJIGoApCAM6MK22eJGNoMi38,14514
@@ -305,7 +305,7 @@ verifiers/v1/serve/__init__.py,sha256=sr_zkDzAHnOcQm-QRm8xwJBmCMFD-xhKIFPaDZvMbU
305
305
  verifiers/v1/serve/client.py,sha256=amUhf4cFJ1xCb8kw_AoVviwN543Wknx8LzImq1ZpaiQ,7057
306
306
  verifiers/v1/serve/pool.py,sha256=e9Nc3nQKEyV9YqyKHl_RuqQ84zWVa8z2J1rc3rfCadM,14828
307
307
  verifiers/v1/serve/server.py,sha256=VBOD3Gzq4p0ZD_8xgtG039i3JaefhOH0MmR6cxG56iY,9705
308
- verifiers/v1/serve/types.py,sha256=AHFbt8C-Rzlee34RDPLQ3lPiYDLkUm5eFMnRQINiO6s,3016
308
+ verifiers/v1/serve/types.py,sha256=y8Cf9wKOZRKDXcThFWVygTFHITJofOinGiIzwjQGCUE,2674
309
309
  verifiers/v1/tasksets/__init__.py,sha256=b62O4WDNbGfJH_4NjYmznn5otWovdfvUgJZyoIZyLh8,596
310
310
  verifiers/v1/tasksets/harbor/__init__.py,sha256=wwVGA8N7E2Q2qA5WGHuLRrn4DgG5oaRHrCS2RW3NXVY,195
311
311
  verifiers/v1/tasksets/harbor/taskset.py,sha256=aPgdVExCtt09t2YJrsK4UmlpQwAp5-htXa7arC1bX68,13877
@@ -329,8 +329,8 @@ verifiers/v1/utils/logging.py,sha256=OcMHA6NsYux3oIzjPuI95rDWmFBHNcHDjZeNIhXTX-Y
329
329
  verifiers/v1/utils/memory.py,sha256=ZkIvGk6uITAH5sKon65LifKPbvZr8mJ__PVc23FZpOQ,1835
330
330
  verifiers/v1/utils/sampling.py,sha256=JczGzBn6s3wsIrSY2Hy3hE8m6NreNgsNzhSjDikQqX0,1037
331
331
  verifiers/v1/utils/version.py,sha256=-obEo_-l9-D8FLef4hYxncOe-uJpxrM1g2Hig_37Sgs,1607
332
- verifiers-0.2.2.dev44.dist-info/METADATA,sha256=xAsUe3hwzJqF-nbNTppTvycNvcRTi_cnhIq8oFj9adQ,4545
333
- verifiers-0.2.2.dev44.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
334
- verifiers-0.2.2.dev44.dist-info/entry_points.txt,sha256=dF82JUYEFslR1AOW8LZfuBWeZeQoyX4wCRrduklg8-I,551
335
- verifiers-0.2.2.dev44.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
336
- verifiers-0.2.2.dev44.dist-info/RECORD,,
332
+ verifiers-0.2.2.dev46.dist-info/METADATA,sha256=W6WgwXWR8WefVXSJvKQp14Cw8-R1LKUxyIqEVn33deI,4545
333
+ verifiers-0.2.2.dev46.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
334
+ verifiers-0.2.2.dev46.dist-info/entry_points.txt,sha256=dF82JUYEFslR1AOW8LZfuBWeZeQoyX4wCRrduklg8-I,551
335
+ verifiers-0.2.2.dev46.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
336
+ verifiers-0.2.2.dev46.dist-info/RECORD,,