verifiers 0.4.2.dev137__py3-none-any.whl → 0.4.2.dev138__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/graph.py +9 -4
- {verifiers-0.4.2.dev137.dist-info → verifiers-0.4.2.dev138.dist-info}/METADATA +1 -1
- {verifiers-0.4.2.dev137.dist-info → verifiers-0.4.2.dev138.dist-info}/RECORD +6 -6
- {verifiers-0.4.2.dev137.dist-info → verifiers-0.4.2.dev138.dist-info}/WHEEL +0 -0
- {verifiers-0.4.2.dev137.dist-info → verifiers-0.4.2.dev138.dist-info}/entry_points.txt +0 -0
- {verifiers-0.4.2.dev137.dist-info → verifiers-0.4.2.dev138.dist-info}/licenses/LICENSE +0 -0
verifiers/v1/graph.py
CHANGED
|
@@ -912,6 +912,11 @@ def _project_prompt_attribution(
|
|
|
912
912
|
return projected_spans, projected_is_content
|
|
913
913
|
|
|
914
914
|
|
|
915
|
+
def _advance_cursor(cursor: int, span: tuple[int, int] | None) -> int:
|
|
916
|
+
"""A renderer may place a later message's tokens before a span already consumed."""
|
|
917
|
+
return max(cursor, span[1]) if span is not None else cursor
|
|
918
|
+
|
|
919
|
+
|
|
915
920
|
def _commit_turn(turn: PendingTurn, response: Response) -> int:
|
|
916
921
|
trace = turn.trace
|
|
917
922
|
prompt = turn.prompt
|
|
@@ -987,11 +992,11 @@ def _commit_turn(turn: PendingTurn, response: Response) -> int:
|
|
|
987
992
|
while len(prefix) < len(prompt):
|
|
988
993
|
i = len(prefix)
|
|
989
994
|
span = spans[i] if spans and i < len(spans) else None
|
|
990
|
-
end =
|
|
995
|
+
end = _advance_cursor(path_len, span)
|
|
991
996
|
renderer_span = (
|
|
992
997
|
renderer_spans[i] if renderer_spans and i < len(renderer_spans) else None
|
|
993
998
|
)
|
|
994
|
-
renderer_end =
|
|
999
|
+
renderer_end = _advance_cursor(renderer_path_len, renderer_span)
|
|
995
1000
|
parent = prefix[-1] if prefix else None
|
|
996
1001
|
if tokens is not None and span is None:
|
|
997
1002
|
next_start = next(
|
|
@@ -1055,7 +1060,7 @@ def _commit_turn(turn: PendingTurn, response: Response) -> int:
|
|
|
1055
1060
|
for i, msg in enumerate(prompt[num_reused:], start=num_reused):
|
|
1056
1061
|
start = path_len if cursor is None else cursor
|
|
1057
1062
|
span = spans[i] if spans and i < len(spans) else None
|
|
1058
|
-
end =
|
|
1063
|
+
end = _advance_cursor(start, span)
|
|
1059
1064
|
# Each node copies its slice: a view would retain the turn's full-context array.
|
|
1060
1065
|
node_tokens = prompt_ids[start:end].copy()
|
|
1061
1066
|
renderer_start = (
|
|
@@ -1064,7 +1069,7 @@ def _commit_turn(turn: PendingTurn, response: Response) -> int:
|
|
|
1064
1069
|
renderer_span = (
|
|
1065
1070
|
renderer_spans[i] if renderer_spans and i < len(renderer_spans) else None
|
|
1066
1071
|
)
|
|
1067
|
-
renderer_end =
|
|
1072
|
+
renderer_end = _advance_cursor(renderer_start, renderer_span)
|
|
1068
1073
|
trace.nodes.append(
|
|
1069
1074
|
MessageNode.model_construct(
|
|
1070
1075
|
parent=parent,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: verifiers
|
|
3
|
-
Version: 0.4.2.
|
|
3
|
+
Version: 0.4.2.dev138
|
|
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
|
|
@@ -6,7 +6,7 @@ verifiers/v1/env.py,sha256=5F-LhPLAfVNwcco2TR-OOAnv0QtIj49X8pc_dSa-Hgk,20748
|
|
|
6
6
|
verifiers/v1/episode.py,sha256=Tqjo8aQDOh4sM03he2WMXzEhmn2ybzwwtUS_QSvESsA,6983
|
|
7
7
|
verifiers/v1/errors.py,sha256=sgguxm402rbWmCNar7kHpekb30VA7wvE88GBG8890v8,6049
|
|
8
8
|
verifiers/v1/grading.py,sha256=ukULZ4BW8ecj0HX7g1w4kN7R4qs2TmDOSr9XFN6gI-Y,15095
|
|
9
|
-
verifiers/v1/graph.py,sha256=
|
|
9
|
+
verifiers/v1/graph.py,sha256=S3ALWqy2ohkwUnmf2u04zyjX6t5lioVAHx_8LptjqBQ,48797
|
|
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
12
|
verifiers/v1/restore.py,sha256=DA1Tcj0HZkUNOxrmMOJwR25WtCKdsZCTYBJZIf2RWUM,8861
|
|
@@ -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.dev138.dist-info/METADATA,sha256=tsfRbWwCZYEn5dzVxhll4g6tn6GBsrc39ZsGclOc1RQ,5118
|
|
192
|
+
verifiers-0.4.2.dev138.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
193
|
+
verifiers-0.4.2.dev138.dist-info/entry_points.txt,sha256=qdMg7ajiFpDsHf7tuPMRclJXizu1J6LTWawS5YS0B0I,137
|
|
194
|
+
verifiers-0.4.2.dev138.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
|
|
195
|
+
verifiers-0.4.2.dev138.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|