verifiers 0.3.2.dev11__py3-none-any.whl → 0.3.2.dev13__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/rollout.py CHANGED
@@ -412,6 +412,7 @@ class Rollout:
412
412
  # A harness that completes cleanly after a failed model call handled it (e.g. it
413
413
  # ends its run on context overflow); the failure stays recorded on the call. A
414
414
  # harness that dies on it surfaces the stashed error through the except above.
415
+ self._session.error = None
415
416
  # A segment that committed nothing can't be waiting on the user; treating
416
417
  # it as continuable would consult the user against a conversation that
417
418
  # never moved, forever.
@@ -37,10 +37,9 @@ from verifiers.v1.utils.prime import ensure_prime_auth
37
37
 
38
38
  logger = logging.getLogger(__name__)
39
39
 
40
- IDLE_FALLBACK_LIFETIME = 30 * 24 * 60 * 60
41
- """Lifetime (seconds) given to container sandboxes that set an idle timeout: the
42
- platform requires a finite lifetime there as a safety fallback should idle detection
43
- fail. Far above any real run, so effectively unbounded."""
40
+ EFFECTIVELY_UNBOUNDED_SECONDS = 30 * 24 * 60 * 60
41
+ """Safety deadline for APIs that require a finite bound. Normal execution remains
42
+ bounded by idle detection or rollout cancellation; 30 days is above any real run."""
44
43
 
45
44
 
46
45
  BASE_LABELS: list[str] = []
@@ -191,7 +190,7 @@ class PrimeRuntime(Runtime):
191
190
  "timeout_minutes": (
192
191
  -1
193
192
  if self.config.vm or idle_minutes is None
194
- else max(IDLE_FALLBACK_LIFETIME // 60, idle_minutes + 1)
193
+ else max(EFFECTIVELY_UNBOUNDED_SECONDS // 60, idle_minutes + 1)
195
194
  ),
196
195
  "idle_timeout_minutes": idle_minutes,
197
196
  "gpu_type": gpu_type,
@@ -294,21 +293,18 @@ class PrimeRuntime(Runtime):
294
293
  )
295
294
 
296
295
  async def run(self, argv: list[str], env: dict[str, str]) -> ProgramResult:
297
- # Poll the job by hand: the SDK's run_background_job needs a finite deadline,
298
- # but the sandbox has no lifetime limit — the rollout's stage timeouts bound
299
- # this via cancellation instead.
300
296
  try:
301
- job = await self._client.start_background_job(
297
+ # The shared SDK client coalesces concurrent VM job polls into batches.
298
+ # Rollout cancellation remains the practical execution timeout; this
299
+ # long SDK deadline is only a final safety bound.
300
+ result = await self._client.run_background_job(
302
301
  self.info.id,
303
302
  shlex.join(argv),
303
+ timeout=EFFECTIVELY_UNBOUNDED_SECONDS,
304
304
  working_dir=self.config.workdir,
305
305
  env=self.process_env(env),
306
+ poll_interval=1,
306
307
  )
307
- while True:
308
- result = await self._client.get_background_job(self.info.id, job)
309
- if result.completed:
310
- break
311
- await asyncio.sleep(1)
312
308
  except (
313
309
  Exception
314
310
  ) as e: # a sandbox/API failure is one rollout's problem, not the eval's
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: verifiers
3
- Version: 0.3.2.dev11
3
+ Version: 0.3.2.dev13
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
@@ -176,7 +176,7 @@ verifiers/v1/errors.py,sha256=uQySmCUrjDYFkBIii1vBFPiEcPFPQZ9EGpas_6HvcQI,5279
176
176
  verifiers/v1/graph.py,sha256=vjxIrE0e-IXeb8fIY0pRGfwrQlGsIAe9IjwHNZXqizk,30652
177
177
  verifiers/v1/harness.py,sha256=ziECqEBWV34UWbLlxrkhY6MwkbVYkoXBOoaY7mZxwTs,14753
178
178
  verifiers/v1/judge.py,sha256=Pvr0C41ah1qkNSZ0WXdkDvBMfv5YSfY1REHncwlJ8cg,9346
179
- verifiers/v1/rollout.py,sha256=TXSxeN5rY3fdQyID1dsQnqzHIx6ldCP1uMKBm3UF-go,23593
179
+ verifiers/v1/rollout.py,sha256=EnF3RuBfMyKNjJIs0LZaImkSvfe9LYLXc8dYP-1a2Ew,23628
180
180
  verifiers/v1/session.py,sha256=xM7JJJVJACk0JfH9RAN1Ts8gJJKr2tGGRiIgQTrdieY,18692
181
181
  verifiers/v1/state.py,sha256=EckF2bWp-vV4b1jYJ9sLI5xrfGuI5spIgYYwW926toI,595
182
182
  verifiers/v1/task.py,sha256=ZiAE5uGxgHWqz8UF5YJHs80RgSKhxGMGQo4lJusSRus,11375
@@ -305,7 +305,7 @@ verifiers/v1/runtimes/__init__.py,sha256=ppc1R_sx-aMcuJSx4t99rTSjloUXI0M6EUj676-
305
305
  verifiers/v1/runtimes/base.py,sha256=SRTUNAcdW0xJIWjfS5RcijFXqdKyXmGvp2tvV58eu58,16826
306
306
  verifiers/v1/runtimes/limiters.py,sha256=C6cWDD4pwyFwUY4QFke3oiMXwydSNIfSbJSIglUC2kE,3062
307
307
  verifiers/v1/runtimes/modal.py,sha256=Lgc0OkQEWHVBHCqBE2ja-mxtRYGserixlO4B9b5Vwn4,12661
308
- verifiers/v1/runtimes/prime.py,sha256=QnrSCmq9lA_u4o0k6igsum_okSTOZR1lSAHqeRhwldk,18931
308
+ verifiers/v1/runtimes/prime.py,sha256=1IWRLKdGgscs8JmvkBdaS3au4tV0KUqv4W1gHJvOE2Q,18781
309
309
  verifiers/v1/runtimes/subprocess.py,sha256=IO82fI1wFbeTtV7T1AHSF8iTUyT9yGJFIUmCKKw6CnQ,7763
310
310
  verifiers/v1/runtimes/docker/__init__.py,sha256=K6xbJAT1F3-PtgP5Gum2UJKQ8Re1Yz90BP8Uc7Npec4,20594
311
311
  verifiers/v1/runtimes/docker/egress.py,sha256=iFH_1XotlEM-OCaW7GNu3TWVEq1sqesKYweyVBX8g90,14360
@@ -350,8 +350,8 @@ verifiers/v1/utils/prime.py,sha256=UTYRjp9cbjNb6CVmBHda-1wWZAIIfxNOmTyNuT7_wL4,9
350
350
  verifiers/v1/utils/retries.py,sha256=Y2ZgrAjn-qNkRKZP_RVNL_7EK0iaRcZeCa404lpGYi4,5417
351
351
  verifiers/v1/utils/score.py,sha256=-R5Cog14r_tJ6Q_oOfGr5VPAm2CCUhofYZB6B9lm4wM,5787
352
352
  verifiers/v1/utils/version.py,sha256=-obEo_-l9-D8FLef4hYxncOe-uJpxrM1g2Hig_37Sgs,1607
353
- verifiers-0.3.2.dev11.dist-info/METADATA,sha256=BSCpbwXHUZjtrcK0mj4S7seLMEKf25leiGd2g1b3MvI,4654
354
- verifiers-0.3.2.dev11.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
355
- verifiers-0.3.2.dev11.dist-info/entry_points.txt,sha256=hZ5wDc1T8y-EvOziw7kQqatBJ6PbdSu2ygP5rjANl7c,564
356
- verifiers-0.3.2.dev11.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
357
- verifiers-0.3.2.dev11.dist-info/RECORD,,
353
+ verifiers-0.3.2.dev13.dist-info/METADATA,sha256=BaMYvD9ki3pvJC9V1C0p_uA-2WDuDvOoEzvJor2Mgho,4654
354
+ verifiers-0.3.2.dev13.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
355
+ verifiers-0.3.2.dev13.dist-info/entry_points.txt,sha256=hZ5wDc1T8y-EvOziw7kQqatBJ6PbdSu2ygP5rjANl7c,564
356
+ verifiers-0.3.2.dev13.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
357
+ verifiers-0.3.2.dev13.dist-info/RECORD,,