verifiers 0.4.2.dev116__py3-none-any.whl → 0.4.2.dev118__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/restore.py +33 -7
- verifiers/v1/rollout.py +112 -30
- verifiers/v1/runtimes/backends/prime.py +6 -2
- verifiers/v1/runtimes/base.py +7 -3
- verifiers/v1/trace.py +6 -4
- {verifiers-0.4.2.dev116.dist-info → verifiers-0.4.2.dev118.dist-info}/METADATA +2 -2
- {verifiers-0.4.2.dev116.dist-info → verifiers-0.4.2.dev118.dist-info}/RECORD +10 -10
- {verifiers-0.4.2.dev116.dist-info → verifiers-0.4.2.dev118.dist-info}/WHEEL +0 -0
- {verifiers-0.4.2.dev116.dist-info → verifiers-0.4.2.dev118.dist-info}/entry_points.txt +0 -0
- {verifiers-0.4.2.dev116.dist-info → verifiers-0.4.2.dev118.dist-info}/licenses/LICENSE +0 -0
verifiers/v1/restore.py
CHANGED
|
@@ -16,6 +16,8 @@ deletes it, and the owner deletes it once nothing will restore it
|
|
|
16
16
|
from __future__ import annotations
|
|
17
17
|
|
|
18
18
|
import asyncio
|
|
19
|
+
import functools
|
|
20
|
+
import time
|
|
19
21
|
import weakref
|
|
20
22
|
from contextvars import ContextVar
|
|
21
23
|
from typing import TYPE_CHECKING, Any
|
|
@@ -112,6 +114,7 @@ async def save_all(
|
|
|
112
114
|
*,
|
|
113
115
|
hold: bool = False,
|
|
114
116
|
watchdog: bool = True,
|
|
117
|
+
timeout: float | None = None,
|
|
115
118
|
) -> list[dict[str, Any]]:
|
|
116
119
|
"""Take a memory checkpoint of every running rollout of this process and return
|
|
117
120
|
their traces as saved (`restorable`). A rollout that takes no memory snapshots,
|
|
@@ -123,7 +126,10 @@ async def save_all(
|
|
|
123
126
|
ends by itself `HOLD_SECONDS` after the save returns, unless `watchdog` is False:
|
|
124
127
|
the caller then arms the watchdogs (`arm_hold_watchdogs`) once it handed the saves
|
|
125
128
|
over. A save of many rollouts can take minutes, so a watchdog armed at each
|
|
126
|
-
rollout's own save would let the first ones go on before the caller has them.
|
|
129
|
+
rollout's own save would let the first ones go on before the caller has them.
|
|
130
|
+
A rollout whose save takes longer than `timeout` seconds has no restore point:
|
|
131
|
+
its save goes on, and gives its snapshot and hold back to the rollout when it
|
|
132
|
+
ends."""
|
|
127
133
|
|
|
128
134
|
async def save(rollout: Rollout) -> dict[str, Any] | None:
|
|
129
135
|
try:
|
|
@@ -138,28 +144,48 @@ async def save_all(
|
|
|
138
144
|
return point
|
|
139
145
|
|
|
140
146
|
rollouts = list(LIVE)
|
|
147
|
+
started = time.monotonic()
|
|
141
148
|
saves = [asyncio.ensure_future(save(rollout)) for rollout in rollouts]
|
|
142
149
|
try:
|
|
143
|
-
|
|
150
|
+
late = (await asyncio.wait(saves, timeout=timeout))[1] if saves else set()
|
|
144
151
|
except BaseException:
|
|
145
152
|
# The caller never gets the saves done so far: nobody would release their
|
|
146
153
|
# rollouts or delete their snapshots, so both go back to the rollouts.
|
|
147
154
|
for rollout, task in zip(rollouts, saves):
|
|
148
|
-
if (
|
|
149
|
-
task.
|
|
150
|
-
|
|
155
|
+
if not task.done():
|
|
156
|
+
task.cancel()
|
|
157
|
+
elif (
|
|
158
|
+
not task.cancelled()
|
|
151
159
|
and task.exception() is None
|
|
152
160
|
and (point := task.result()) is not None
|
|
153
161
|
):
|
|
154
162
|
rollout.disown(point)
|
|
155
163
|
raise
|
|
156
|
-
points = [
|
|
157
|
-
|
|
164
|
+
points = []
|
|
165
|
+
for rollout, task in zip(rollouts, saves):
|
|
166
|
+
if task in late:
|
|
167
|
+
task.add_done_callback(functools.partial(_disown_late, rollout))
|
|
168
|
+
if skipped is not None:
|
|
169
|
+
reason = f"its save took longer than {timeout:g}s"
|
|
170
|
+
skipped[reason] = skipped.get(reason, 0) + 1
|
|
171
|
+
elif (point := task.result()) is not None:
|
|
172
|
+
points.append(point)
|
|
173
|
+
logger.info(
|
|
174
|
+
"Saved %d of %d running rollouts in %.1fs",
|
|
175
|
+
len(points),
|
|
176
|
+
len(rollouts),
|
|
177
|
+
time.monotonic() - started,
|
|
178
|
+
)
|
|
158
179
|
if hold and watchdog:
|
|
159
180
|
arm_hold_watchdogs()
|
|
160
181
|
return points
|
|
161
182
|
|
|
162
183
|
|
|
184
|
+
def _disown_late(rollout: Rollout, task: asyncio.Future) -> None:
|
|
185
|
+
if not task.cancelled() and (point := task.result()) is not None:
|
|
186
|
+
rollout.disown(point)
|
|
187
|
+
|
|
188
|
+
|
|
163
189
|
def arm_hold_watchdogs() -> None:
|
|
164
190
|
"""Start the self-release of every rollout a `save_all(hold=True)` holds, for an
|
|
165
191
|
owner that does more work before it can `release_all`."""
|
verifiers/v1/rollout.py
CHANGED
|
@@ -86,6 +86,12 @@ class RolloutTimeouts:
|
|
|
86
86
|
HOLD_SECONDS = 120
|
|
87
87
|
"""How long a saved rollout waits for its owner's `release` before it goes on by itself."""
|
|
88
88
|
|
|
89
|
+
|
|
90
|
+
def _unpin(taken: asyncio.Future[Checkpoint]) -> None:
|
|
91
|
+
if not taken.cancelled():
|
|
92
|
+
taken.result().pinned = False
|
|
93
|
+
|
|
94
|
+
|
|
89
95
|
_HOME_PROBE = (
|
|
90
96
|
"home=$(awk -F: -v u=\"$1\" '$1 == u { print $6 }' /etc/passwd); "
|
|
91
97
|
'test -n "$home" || exit 1; home=${2:-$home}; echo "$home"; test -d "$home"'
|
|
@@ -1063,9 +1069,11 @@ class Rollout:
|
|
|
1063
1069
|
"""Take a memory checkpoint of the running rollout now and return its trace as
|
|
1064
1070
|
saved (`restorable`), for an owner that continues the rollout in another
|
|
1065
1071
|
process (`save_all`). The owner holds the snapshot (`Checkpoint.pinned`). The
|
|
1066
|
-
save returns once the
|
|
1067
|
-
|
|
1068
|
-
|
|
1072
|
+
save returns once the provider names the snapshot, before the box has
|
|
1073
|
+
stopped, so a save of thousands of boxes waits neither for their stops nor
|
|
1074
|
+
for their uploads: a restore waits until the snapshot is durable
|
|
1075
|
+
(`PrimeBackend.start`), and one from a snapshot that failed later starts
|
|
1076
|
+
over (`_drop_capture`). With `hold`,
|
|
1069
1077
|
nothing the box asked for is answered until `release`, so the rollout cannot
|
|
1070
1078
|
move past its checkpoint while the owner records it; `watchdog` arms the
|
|
1071
1079
|
release that ends a hold no owner ends (`arm_hold_watchdog`), which an owner
|
|
@@ -1095,12 +1103,20 @@ class Rollout:
|
|
|
1095
1103
|
checkpoint = None
|
|
1096
1104
|
try:
|
|
1097
1105
|
checkpoint = await self._owner_checkpoint(hold=hold)
|
|
1106
|
+
ended = (
|
|
1107
|
+
self._harness_session is None
|
|
1108
|
+
or self._harness_session.memory_state() is None
|
|
1109
|
+
)
|
|
1098
1110
|
if checkpoint is None:
|
|
1099
1111
|
self._release_hold(hold_id)
|
|
1100
|
-
self.save_skipped =
|
|
1112
|
+
self.save_skipped = (
|
|
1113
|
+
"its harness program ended during the save"
|
|
1114
|
+
if ended
|
|
1115
|
+
else self._state_unsaved or "its memory snapshot failed"
|
|
1116
|
+
)
|
|
1101
1117
|
return None
|
|
1102
|
-
if
|
|
1103
|
-
# The program left
|
|
1118
|
+
if ended:
|
|
1119
|
+
# The program left before the snapshot was named: the snapshot may
|
|
1104
1120
|
# hold a box with nothing to continue.
|
|
1105
1121
|
checkpoint.pinned = False
|
|
1106
1122
|
self._release_hold(hold_id)
|
|
@@ -1145,7 +1161,9 @@ class Rollout:
|
|
|
1145
1161
|
found = True
|
|
1146
1162
|
if not found and self.runtime is not None:
|
|
1147
1163
|
# Its durable wait failed and dropped it: the box's teardown frees it.
|
|
1148
|
-
self.runtime.backend.stray_snapshots
|
|
1164
|
+
stray = self.runtime.backend.stray_snapshots
|
|
1165
|
+
if all(snapshot.id != snapshot_id for snapshot in stray):
|
|
1166
|
+
stray.append(Snapshot(id=snapshot_id))
|
|
1149
1167
|
self._release_hold(snapshot_id)
|
|
1150
1168
|
|
|
1151
1169
|
def _release_hold(self, hold_id: str | None) -> None:
|
|
@@ -1156,21 +1174,49 @@ class Rollout:
|
|
|
1156
1174
|
"""Answer the box again after a `save(hold=True)`."""
|
|
1157
1175
|
self._hold_id = None
|
|
1158
1176
|
self._unheld.set()
|
|
1159
|
-
self._end_hold()
|
|
1160
1177
|
if self._release_timer is not None:
|
|
1161
1178
|
self._release_timer.cancel()
|
|
1162
1179
|
self._release_timer = None
|
|
1163
|
-
# A snapshot that is being taken holds the box for itself
|
|
1164
|
-
# replies flow when
|
|
1180
|
+
# A snapshot that is being taken holds the box for itself. It ends the hold
|
|
1181
|
+
# and lets the replies flow when the box runs again.
|
|
1165
1182
|
if not self._capturing.locked():
|
|
1183
|
+
self._end_hold()
|
|
1166
1184
|
self._session.resume()
|
|
1167
1185
|
|
|
1168
1186
|
async def _take_snapshot(self, *, pinned: bool = False) -> Checkpoint | None:
|
|
1169
|
-
"""Hold replies and snapshot the box at a replayable trace boundary.
|
|
1187
|
+
"""Hold replies and snapshot the box at a replayable trace boundary. Returns
|
|
1188
|
+
the checkpoint once the provider names the snapshot, before the box has
|
|
1189
|
+
stopped. The rest of the capture goes on in the background (`_capture`)."""
|
|
1170
1190
|
assert self.runtime is not None and self._relay is not None
|
|
1171
|
-
session = self._session
|
|
1172
1191
|
if self._harness_session is None:
|
|
1173
1192
|
return None
|
|
1193
|
+
taken: asyncio.Future[Checkpoint] = asyncio.get_running_loop().create_future()
|
|
1194
|
+
capture = asyncio.create_task(self._capture(taken, pinned))
|
|
1195
|
+
self._captures.add(capture)
|
|
1196
|
+
capture.add_done_callback(self._captures.discard)
|
|
1197
|
+
try:
|
|
1198
|
+
await asyncio.wait({taken, capture}, return_when=asyncio.FIRST_COMPLETED)
|
|
1199
|
+
except asyncio.CancelledError:
|
|
1200
|
+
# Nobody gets the checkpoint: it is the rollout's own.
|
|
1201
|
+
taken.add_done_callback(_unpin)
|
|
1202
|
+
raise
|
|
1203
|
+
# A capture that ended already may have dropped the snapshot it named.
|
|
1204
|
+
if capture.done():
|
|
1205
|
+
return capture.result()
|
|
1206
|
+
return taken.result()
|
|
1207
|
+
|
|
1208
|
+
async def _capture(
|
|
1209
|
+
self, taken: asyncio.Future[Checkpoint], pinned: bool
|
|
1210
|
+
) -> Checkpoint | None:
|
|
1211
|
+
"""Take the snapshot `_take_snapshot` hands out through `taken`, and hold the
|
|
1212
|
+
box's replies until it runs again. A snapshot that fails after it was handed
|
|
1213
|
+
out is dropped (`_drop_capture`). So is a snapshot that no owner holds and
|
|
1214
|
+
whose program ended while the box stopped."""
|
|
1215
|
+
assert self.runtime is not None and self._relay is not None
|
|
1216
|
+
assert self._harness_session is not None
|
|
1217
|
+
session = self._session
|
|
1218
|
+
loop = asyncio.get_running_loop()
|
|
1219
|
+
checkpoint: Checkpoint | None = None
|
|
1174
1220
|
# The pace is waited for before the box is held, not while.
|
|
1175
1221
|
async with self.runtime.backend.snapshot_pace(), self._capturing:
|
|
1176
1222
|
if self._closed:
|
|
@@ -1207,18 +1253,47 @@ class Rollout:
|
|
|
1207
1253
|
"secret": self._secret,
|
|
1208
1254
|
}
|
|
1209
1255
|
started = time.time()
|
|
1256
|
+
|
|
1257
|
+
def on_taken(snapshot: Snapshot) -> None:
|
|
1258
|
+
nonlocal checkpoint
|
|
1259
|
+
self._last_capture = loop.time()
|
|
1260
|
+
checkpoint = Checkpoint(
|
|
1261
|
+
id=snapshot.id,
|
|
1262
|
+
node=node,
|
|
1263
|
+
session=data,
|
|
1264
|
+
agent_time=self._agent_time_spent + self._segment_agent_time(),
|
|
1265
|
+
snapshot=snapshot,
|
|
1266
|
+
time=TimeSpan(start=started),
|
|
1267
|
+
captured=time.time(),
|
|
1268
|
+
pinned=pinned,
|
|
1269
|
+
)
|
|
1270
|
+
self.trace.checkpoints.append(checkpoint)
|
|
1271
|
+
if not taken.done():
|
|
1272
|
+
taken.set_result(checkpoint)
|
|
1273
|
+
|
|
1210
1274
|
try:
|
|
1211
|
-
snapshot = await self.runtime.backend.snapshot()
|
|
1275
|
+
snapshot = await self.runtime.backend.snapshot(on_taken)
|
|
1212
1276
|
except Exception:
|
|
1213
1277
|
logger.warning(
|
|
1214
1278
|
"memory snapshot failed (rollout %s)",
|
|
1215
1279
|
self.trace.id,
|
|
1216
1280
|
exc_info=True,
|
|
1217
1281
|
)
|
|
1282
|
+
self._drop_capture(checkpoint)
|
|
1283
|
+
return None
|
|
1284
|
+
if checkpoint is None:
|
|
1285
|
+
on_taken(snapshot)
|
|
1286
|
+
assert checkpoint is not None
|
|
1287
|
+
if not checkpoint.pinned and (
|
|
1288
|
+
self._harness_session is None
|
|
1289
|
+
or self._harness_session.memory_state() is None
|
|
1290
|
+
):
|
|
1291
|
+
# The program left while the box was being stopped: the snapshot
|
|
1292
|
+
# may hold a box with nothing to continue. An owner's snapshot
|
|
1293
|
+
# stays the owner's, since the owner may have ended the rollout
|
|
1294
|
+
# itself. A restore that leads nowhere starts over.
|
|
1295
|
+
self._drop_capture(checkpoint)
|
|
1218
1296
|
return None
|
|
1219
|
-
captured = time.time()
|
|
1220
|
-
self._last_capture = asyncio.get_running_loop().time()
|
|
1221
|
-
agent_time = self._agent_time_spent + self._segment_agent_time()
|
|
1222
1297
|
# The box's connections to the server did not survive the stop: its
|
|
1223
1298
|
# relay opens new ones and repeats the requests that wait.
|
|
1224
1299
|
try:
|
|
@@ -1231,31 +1306,37 @@ class Rollout:
|
|
|
1231
1306
|
)
|
|
1232
1307
|
finally:
|
|
1233
1308
|
if self._hold_id is None:
|
|
1309
|
+
self._end_hold()
|
|
1234
1310
|
session.resume()
|
|
1235
|
-
checkpoint =
|
|
1236
|
-
id=snapshot.id,
|
|
1237
|
-
node=node,
|
|
1238
|
-
session=data,
|
|
1239
|
-
agent_time=agent_time,
|
|
1240
|
-
snapshot=snapshot,
|
|
1241
|
-
time=TimeSpan(start=started),
|
|
1242
|
-
captured=captured,
|
|
1243
|
-
pinned=pinned,
|
|
1244
|
-
held=captured - started,
|
|
1245
|
-
)
|
|
1246
|
-
self.trace.checkpoints.append(checkpoint)
|
|
1311
|
+
checkpoint.held = time.time() - started
|
|
1247
1312
|
self._durable[checkpoint.id] = asyncio.create_task(
|
|
1248
1313
|
self._make_durable(checkpoint)
|
|
1249
1314
|
)
|
|
1250
1315
|
logger.debug(
|
|
1251
1316
|
"memory checkpoint %s taken in %s: id=%s node=%s",
|
|
1252
1317
|
checkpoint.id,
|
|
1253
|
-
format_time(
|
|
1318
|
+
format_time(checkpoint.held),
|
|
1254
1319
|
self.trace.id,
|
|
1255
1320
|
node,
|
|
1256
1321
|
)
|
|
1257
1322
|
return checkpoint
|
|
1258
1323
|
|
|
1324
|
+
def _drop_capture(self, checkpoint: Checkpoint | None) -> None:
|
|
1325
|
+
"""Drop a snapshot that failed after `_take_snapshot` handed it out. No retry
|
|
1326
|
+
restores from it. The box's teardown frees it, also when an owner holds it.
|
|
1327
|
+
The owner's restore from it then starts over."""
|
|
1328
|
+
if checkpoint is None:
|
|
1329
|
+
return
|
|
1330
|
+
assert self.runtime is not None
|
|
1331
|
+
# Deleted for an owner that picked it before the drop (`_owner_checkpoint`).
|
|
1332
|
+
checkpoint.deleted = True
|
|
1333
|
+
with contextlib.suppress(ValueError):
|
|
1334
|
+
self.trace.checkpoints.remove(checkpoint)
|
|
1335
|
+
checkpoint.pinned = False
|
|
1336
|
+
stray = self.runtime.backend.stray_snapshots
|
|
1337
|
+
if checkpoint.snapshot not in stray:
|
|
1338
|
+
stray.append(checkpoint.snapshot)
|
|
1339
|
+
|
|
1259
1340
|
async def _make_durable(self, checkpoint: Checkpoint) -> None:
|
|
1260
1341
|
assert self.runtime is not None
|
|
1261
1342
|
try:
|
|
@@ -1688,12 +1769,13 @@ class Rollout:
|
|
|
1688
1769
|
):
|
|
1689
1770
|
if span.start and not span.end:
|
|
1690
1771
|
span.end = now
|
|
1691
|
-
trace.split_agent_time()
|
|
1692
1772
|
if runtime is not None:
|
|
1693
1773
|
await self._cleanup_harness(runtime)
|
|
1694
1774
|
# A failed attempt's retry restores the newest snapshot, which must be
|
|
1695
1775
|
# durable before the box goes.
|
|
1696
1776
|
await self._settle_checkpoints(wait=not trace.ok)
|
|
1777
|
+
# After the settle: a capture that was still running has its hold time now.
|
|
1778
|
+
trace.split_agent_time()
|
|
1697
1779
|
# Tear down here — the env's `finalize()` (later) needs only the traces,
|
|
1698
1780
|
# not a live runtime. A borrowed runtime is its creator's to tear down,
|
|
1699
1781
|
# not this rollout's.
|
|
@@ -12,7 +12,7 @@ import tempfile
|
|
|
12
12
|
import time
|
|
13
13
|
import uuid
|
|
14
14
|
import weakref
|
|
15
|
-
from collections.abc import AsyncIterator, Mapping
|
|
15
|
+
from collections.abc import AsyncIterator, Callable, Mapping
|
|
16
16
|
from contextlib import asynccontextmanager
|
|
17
17
|
from dataclasses import dataclass
|
|
18
18
|
from pathlib import Path, PurePosixPath
|
|
@@ -354,7 +354,9 @@ class PrimeBackend(RuntimeBackend):
|
|
|
354
354
|
) as e: # provisioning failure is one rollout's problem, not the eval's
|
|
355
355
|
raise SandboxError(f"prime sandbox provisioning failed: {e}") from e
|
|
356
356
|
|
|
357
|
-
async def snapshot(
|
|
357
|
+
async def snapshot(
|
|
358
|
+
self, taken: Callable[[Snapshot], None] | None = None
|
|
359
|
+
) -> Snapshot:
|
|
358
360
|
# A pause is the platform's memory snapshot: it stops the box, and the resume
|
|
359
361
|
# continues it. The platform uploads the snapshot after the pause. Until it is
|
|
360
362
|
# durable the snapshot is stray: the platform refuses to delete it while this
|
|
@@ -389,6 +391,8 @@ class PrimeBackend(RuntimeBackend):
|
|
|
389
391
|
# still have made the snapshot.
|
|
390
392
|
self.stray_snapshots.append(snapshot)
|
|
391
393
|
try:
|
|
394
|
+
if taken is not None:
|
|
395
|
+
taken(snapshot)
|
|
392
396
|
await self._client.wait_for_pause(
|
|
393
397
|
self.info.id, timeout_seconds=_PAUSE_SETTLE_SECONDS
|
|
394
398
|
)
|
verifiers/v1/runtimes/base.py
CHANGED
|
@@ -11,7 +11,7 @@ import time
|
|
|
11
11
|
import uuid
|
|
12
12
|
import weakref
|
|
13
13
|
from abc import ABC, abstractmethod
|
|
14
|
-
from collections.abc import AsyncIterator, Mapping
|
|
14
|
+
from collections.abc import AsyncIterator, Callable, Mapping
|
|
15
15
|
from contextlib import AbstractAsyncContextManager
|
|
16
16
|
from contextvars import ContextVar
|
|
17
17
|
from dataclasses import dataclass, field
|
|
@@ -281,10 +281,14 @@ class RuntimeBackend(ABC):
|
|
|
281
281
|
async def start(self) -> None:
|
|
282
282
|
pass
|
|
283
283
|
|
|
284
|
-
async def snapshot(
|
|
284
|
+
async def snapshot(
|
|
285
|
+
self, taken: Callable[[Snapshot], None] | None = None
|
|
286
|
+
) -> Snapshot:
|
|
285
287
|
"""Snapshot the box's files and memory. The box stops while the snapshot is
|
|
286
288
|
taken and runs again when this returns; its connections to the outside may be
|
|
287
|
-
dead by then.
|
|
289
|
+
dead by then. `taken` gets the snapshot as soon as the provider names it,
|
|
290
|
+
before the box has stopped; a snapshot that fails after that still raises
|
|
291
|
+
here. The snapshot becomes restorable only later (`wait_snapshot`)."""
|
|
288
292
|
raise NotImplementedError(f"{type(self).__name__} does not support snapshots")
|
|
289
293
|
|
|
290
294
|
def snapshot_pace(self) -> AbstractAsyncContextManager[Any]:
|
verifiers/v1/trace.py
CHANGED
|
@@ -434,9 +434,11 @@ class Checkpoint(BaseModel):
|
|
|
434
434
|
"""From the snapshot request until it was durable (restorable); `end` stays 0 while
|
|
435
435
|
it is not."""
|
|
436
436
|
captured: float = 0.0
|
|
437
|
-
"""When the
|
|
437
|
+
"""When the provider named the snapshot. The box had seen its last reply before
|
|
438
|
+
then, so the snapshot holds what the trace holds at this point."""
|
|
438
439
|
held: float = 0.0
|
|
439
|
-
"""Wall time
|
|
440
|
+
"""Wall time from the snapshot request until the box ran again, excluding the
|
|
441
|
+
background upload."""
|
|
440
442
|
bytes: int | None = None
|
|
441
443
|
"""The snapshot's stored size, which the provider bills, once it is durable."""
|
|
442
444
|
restored: bool = False
|
|
@@ -1067,8 +1069,8 @@ class Trace(BaseModel, Generic[DataT, StateT, AgentConfigT]):
|
|
|
1067
1069
|
overlap = sum(
|
|
1068
1070
|
max(
|
|
1069
1071
|
0.0,
|
|
1070
|
-
min(call.time.end, c.
|
|
1071
|
-
- max(call.time.start, c.
|
|
1072
|
+
min(call.time.end, c.time.start + c.held)
|
|
1073
|
+
- max(call.time.start, c.time.start),
|
|
1072
1074
|
)
|
|
1073
1075
|
for c in self.checkpoints
|
|
1074
1076
|
if c.captured >= span.start and c.held
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: verifiers
|
|
3
|
-
Version: 0.4.2.
|
|
3
|
+
Version: 0.4.2.dev118
|
|
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
|
|
@@ -34,7 +34,7 @@ Requires-Dist: numpy>=2.1.0
|
|
|
34
34
|
Requires-Dist: openai<3.0.0,>=2.54.0
|
|
35
35
|
Requires-Dist: orjson>=3.10.0
|
|
36
36
|
Requires-Dist: prime-pydantic-config[toml]>=0.4.3
|
|
37
|
-
Requires-Dist: prime-sandboxes>=0.5.
|
|
37
|
+
Requires-Dist: prime-sandboxes>=0.5.18
|
|
38
38
|
Requires-Dist: prime-tunnel>=0.1.17
|
|
39
39
|
Requires-Dist: pydantic>=2.12.3
|
|
40
40
|
Requires-Dist: renderers[multimodal]>=0.2.1.dev12
|
|
@@ -9,15 +9,15 @@ verifiers/v1/grading.py,sha256=OtZZv8P89CFSkUtu53rXIXuC6haC8KrmFp8E_3wCy_I,13364
|
|
|
9
9
|
verifiers/v1/graph.py,sha256=_IEMMdOJ7TAy2TM9H9LZBAeYCgV9-Uo8XtfTUdg_aBI,48582
|
|
10
10
|
verifiers/v1/harness.py,sha256=3jJjA_Td8f61jzN33J7h0Hk_hUCe_pqh_ePjH_EVg7c,19067
|
|
11
11
|
verifiers/v1/judge.py,sha256=T-TyYVcLGIoyUADYKy_pCBj2CTLhERlct5pmmWqPpTA,10507
|
|
12
|
-
verifiers/v1/restore.py,sha256=
|
|
13
|
-
verifiers/v1/rollout.py,sha256=
|
|
12
|
+
verifiers/v1/restore.py,sha256=kg7TM5J2LlVoQhKpkVAT6PXroOqCOjNqH3wlGV-DOtA,8339
|
|
13
|
+
verifiers/v1/rollout.py,sha256=N99M_wp4XbpWj4HxsYzbiXmVT-cBgZ6JmgkqzITsaNA,87623
|
|
14
14
|
verifiers/v1/semantic.py,sha256=nqKPPUoPL5Oh8Es_XjtcbDiQiIMKTYayXEm-EPB-jAE,5129
|
|
15
15
|
verifiers/v1/session.py,sha256=W39D3WfQgIZGekzt7-2bBVrF-Kb_Uapdy5cnWepEcyw,52241
|
|
16
16
|
verifiers/v1/state.py,sha256=EckF2bWp-vV4b1jYJ9sLI5xrfGuI5spIgYYwW926toI,595
|
|
17
17
|
verifiers/v1/submission.py,sha256=zgSRbGVz82Efwz4nX4tlJ-i02AmjtKyu_vHfwfLaByw,7989
|
|
18
18
|
verifiers/v1/task.py,sha256=zcWjBjhJrkGIL29JTnxxw6v2pbJoiek_tF5RVAVV2ZY,15919
|
|
19
19
|
verifiers/v1/taskset.py,sha256=PRwMfPtUL0Sg9pwKzJYnpLBDqJCmQ4skQPhF1oocyyw,9504
|
|
20
|
-
verifiers/v1/trace.py,sha256=
|
|
20
|
+
verifiers/v1/trace.py,sha256=NrwTtf-gfghGivzN8tgLFiwt0MKcq3J-Rm3NDaC7etA,48396
|
|
21
21
|
verifiers/v1/types.py,sha256=PsYLhqy_19JZUT7uP9a8A2h-qKo7-9_KLQ_B0PqhkYg,13303
|
|
22
22
|
verifiers/v1/acp/__init__.py,sha256=mrqSh0BCCzKKuCCuaXl3bPj9tBvKIwDWQE3XIuZmTF8,22764
|
|
23
23
|
verifiers/v1/acp/runner.py,sha256=G9eNAnPePLv-9Rhj2KVr3MlcwVuqCJ-DuxP7fmycV9c,19092
|
|
@@ -139,7 +139,7 @@ verifiers/v1/mcp/launch.py,sha256=tI4MGpqWVJxALD9RxajBPcQrIhQvxA5r1slU8nwCjNw,29
|
|
|
139
139
|
verifiers/v1/mcp/server.py,sha256=9hH7rJm8yPYVitcKYMZmSt6_JQyysKAr3e6Xav6IsIk,14154
|
|
140
140
|
verifiers/v1/mcp/toolset.py,sha256=52h0tyCk_Eiu54JZ5hlQMfOlu5Dou7PHKmFr09pYFJg,3129
|
|
141
141
|
verifiers/v1/runtimes/__init__.py,sha256=n9aivBKmaAWWglWihdkCrXyy8ISxHfvTK2VMykOYarw,3444
|
|
142
|
-
verifiers/v1/runtimes/base.py,sha256=
|
|
142
|
+
verifiers/v1/runtimes/base.py,sha256=Ou_zvOnfyE3jXd0bNtoyNOENvYBRnc96KzAoSi1Wa9A,22448
|
|
143
143
|
verifiers/v1/runtimes/compose.py,sha256=Q_0auxhXaGhIOrlisFXI8QRYV9DmewVuXG4ZZtfnrKA,15974
|
|
144
144
|
verifiers/v1/runtimes/deployment.py,sha256=De6N15Vfe7JKn5VOqFwG22SU_lh0f09bJ57hqBi8D6I,7525
|
|
145
145
|
verifiers/v1/runtimes/egress.py,sha256=4zsNS3Z2A2HyoCcbgaLizA30uJabYrbgYAYUfvyzeBk,23703
|
|
@@ -150,7 +150,7 @@ verifiers/v1/runtimes/runtime.py,sha256=t2iZmLTfHum5hTYV6g4BdINc8HFK0NcGqcnWpoqp
|
|
|
150
150
|
verifiers/v1/runtimes/strategies.py,sha256=WtIrIpKmvjvqpUfwLUwDNJcgRLE8d-2sx7reks2S2PA,8765
|
|
151
151
|
verifiers/v1/runtimes/backends/custom.py,sha256=Iz1Brd4dBTpO1zYVc2KA0u5sxz5ZUROY_Cdme5W33hM,2875
|
|
152
152
|
verifiers/v1/runtimes/backends/docker.py,sha256=k-xjN6m72LH_FUeQ0rCySpYSxtk__3ZwHhOHA5HQ5Zk,32362
|
|
153
|
-
verifiers/v1/runtimes/backends/prime.py,sha256=
|
|
153
|
+
verifiers/v1/runtimes/backends/prime.py,sha256=Z_Sp3Y5yUXWVcmgEEO_1QMeV_HKRyWAaYQFscyzQ6B8,39416
|
|
154
154
|
verifiers/v1/runtimes/backends/subprocess.py,sha256=7JIEetsJWELIf410tkJOcntHT3D_6TPXcsMD3IfhWTw,8595
|
|
155
155
|
verifiers/v1/tasksets/__init__.py,sha256=2ijE3qIlLoUA02g6iysOwWQylyBBQL1GhSpjv8_bp0w,521
|
|
156
156
|
verifiers/v1/tasksets/harbor/__init__.py,sha256=FjW4tM3rgGALMK-8p7ux26G4-d4ZFVmaAmO6Fni6e_g,214
|
|
@@ -188,8 +188,8 @@ verifiers/v1/utils/scope.py,sha256=zbs4pj6AVk4jywlAJ3AX0Q0_kzB9dBB02nY-9H4ELdQ,8
|
|
|
188
188
|
verifiers/v1/utils/score.py,sha256=493yJVMw8teCu9JxapxMFPFzI0hNUqdo0Y2nGW4kckk,6200
|
|
189
189
|
verifiers/v1/utils/trace_store.py,sha256=7F6xMhYgl3qmylnCU8-ekqswH16fUat1uegeM1OR9QQ,2563
|
|
190
190
|
verifiers/v1/utils/version.py,sha256=-obEo_-l9-D8FLef4hYxncOe-uJpxrM1g2Hig_37Sgs,1607
|
|
191
|
-
verifiers-0.4.2.
|
|
192
|
-
verifiers-0.4.2.
|
|
193
|
-
verifiers-0.4.2.
|
|
194
|
-
verifiers-0.4.2.
|
|
195
|
-
verifiers-0.4.2.
|
|
191
|
+
verifiers-0.4.2.dev118.dist-info/METADATA,sha256=LM-wjgJKrHGPoYKqj7lvZEMvQvW9zcwu4hdvPI9ljEI,5118
|
|
192
|
+
verifiers-0.4.2.dev118.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
193
|
+
verifiers-0.4.2.dev118.dist-info/entry_points.txt,sha256=qdMg7ajiFpDsHf7tuPMRclJXizu1J6LTWawS5YS0B0I,137
|
|
194
|
+
verifiers-0.4.2.dev118.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
|
|
195
|
+
verifiers-0.4.2.dev118.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|