verifiers 0.4.2.dev113__py3-none-any.whl → 0.4.2.dev115__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/harnesses/mini_swe_agent/harness.py +17 -3
- verifiers/v1/harnesses/mini_swe_agent/program.py +10 -1
- {verifiers-0.4.2.dev113.dist-info → verifiers-0.4.2.dev115.dist-info}/METADATA +2 -2
- {verifiers-0.4.2.dev113.dist-info → verifiers-0.4.2.dev115.dist-info}/RECORD +7 -7
- {verifiers-0.4.2.dev113.dist-info → verifiers-0.4.2.dev115.dist-info}/WHEEL +0 -0
- {verifiers-0.4.2.dev113.dist-info → verifiers-0.4.2.dev115.dist-info}/entry_points.txt +0 -0
- {verifiers-0.4.2.dev113.dist-info → verifiers-0.4.2.dev115.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from math import ceil
|
|
1
2
|
from pathlib import Path
|
|
2
3
|
from typing import Literal
|
|
3
4
|
|
|
@@ -10,7 +11,12 @@ from verifiers.v1.runtimes.base import current_program
|
|
|
10
11
|
from verifiers.v1.task import TaskData
|
|
11
12
|
from verifiers.v1.trace import Trace
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
REPEATED_FORMAT_ERROR_EXIT_CODE = 98
|
|
15
|
+
PROGRAM_SOURCE = (
|
|
16
|
+
(Path(__file__).resolve().parent / "program.py")
|
|
17
|
+
.read_text()
|
|
18
|
+
.replace("{repeated_format_error_exit_code}", str(REPEATED_FORMAT_ERROR_EXIT_CODE))
|
|
19
|
+
)
|
|
14
20
|
|
|
15
21
|
|
|
16
22
|
class MiniSWEAgentHarnessConfig(HarnessConfig):
|
|
@@ -28,6 +34,14 @@ class MiniSWEAgentHarness(Harness[MiniSWEAgentHarnessConfig]):
|
|
|
28
34
|
source = PROGRAM_SOURCE.replace("{version}", self.config.version)
|
|
29
35
|
await runtime.prepare_uv_script(source, self.config.resolved_env)
|
|
30
36
|
|
|
37
|
+
async def _check_result(
|
|
38
|
+
self, trace: Trace, runtime: Runtime, result: ProgramResult
|
|
39
|
+
) -> None:
|
|
40
|
+
if result.exit_code == REPEATED_FORMAT_ERROR_EXIT_CODE:
|
|
41
|
+
trace.stop("format_violation")
|
|
42
|
+
return
|
|
43
|
+
await super()._check_result(trace, runtime, result)
|
|
44
|
+
|
|
31
45
|
async def launch(
|
|
32
46
|
self,
|
|
33
47
|
ctx: ModelContext,
|
|
@@ -59,9 +73,9 @@ class MiniSWEAgentHarness(Harness[MiniSWEAgentHarnessConfig]):
|
|
|
59
73
|
"mini",
|
|
60
74
|
"-c",
|
|
61
75
|
"agent.cost_limit=0",
|
|
62
|
-
#
|
|
76
|
+
# mini-SWE-agent's timeout is in whole seconds.
|
|
63
77
|
"-c",
|
|
64
|
-
"environment.timeout=
|
|
78
|
+
f"environment.timeout={ceil(self.config.tool_timeout)}",
|
|
65
79
|
"-c",
|
|
66
80
|
"model.cost_tracking=ignore_errors",
|
|
67
81
|
"-c",
|
|
@@ -15,4 +15,13 @@ task_file = Path(sys.argv[index + 1])
|
|
|
15
15
|
sys.argv[index : index + 2] = ["--task", task_file.read_text(encoding="utf-8")]
|
|
16
16
|
task_file.unlink()
|
|
17
17
|
|
|
18
|
-
app()
|
|
18
|
+
agent = app(standalone_mode=False)
|
|
19
|
+
if isinstance(agent, int):
|
|
20
|
+
sys.exit(agent)
|
|
21
|
+
|
|
22
|
+
messages = getattr(agent, "messages", None)
|
|
23
|
+
if (
|
|
24
|
+
messages
|
|
25
|
+
and messages[-1].get("extra", {}).get("exit_status") == "RepeatedFormatError"
|
|
26
|
+
):
|
|
27
|
+
sys.exit(int("{repeated_format_error_exit_code}"))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: verifiers
|
|
3
|
-
Version: 0.4.2.
|
|
3
|
+
Version: 0.4.2.dev115
|
|
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.16
|
|
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
|
|
@@ -92,8 +92,8 @@ verifiers/v1/harnesses/hermes_agent/program.py,sha256=wqU6U4UR8Eo_xjNKLPx0L2Hnx5
|
|
|
92
92
|
verifiers/v1/harnesses/kimi_code/__init__.py,sha256=1BEotSfuzmVcE7UrxHeAREM5d7J20cGkonHuowlrzu4,161
|
|
93
93
|
verifiers/v1/harnesses/kimi_code/harness.py,sha256=4qUc7N7jnQOklMSOujT6tpsRN1AHVnPQ76CG8BzlT1I,5734
|
|
94
94
|
verifiers/v1/harnesses/mini_swe_agent/__init__.py,sha256=1OBu2Y-XqL72-dGhFdgB6sr5uX_peEEXT9vEjPy1ovU,182
|
|
95
|
-
verifiers/v1/harnesses/mini_swe_agent/harness.py,sha256=
|
|
96
|
-
verifiers/v1/harnesses/mini_swe_agent/program.py,sha256=
|
|
95
|
+
verifiers/v1/harnesses/mini_swe_agent/harness.py,sha256=cwYYARBOyG38kTMPTOKlNR_CCtzMhLL8BNtH7Gdy2T0,3416
|
|
96
|
+
verifiers/v1/harnesses/mini_swe_agent/program.py,sha256=X2Lv2HnBliz8VqLkC2SMAYoUfbBz5vLbzl_CaGZgPAw,809
|
|
97
97
|
verifiers/v1/harnesses/null/__init__.py,sha256=XDeKOPeoXUQi9US9_Z3_yH9YaZ4EiOMKJmUtNNdtD7s,127
|
|
98
98
|
verifiers/v1/harnesses/null/harness.py,sha256=ch6Um481rl4opxH04CHa1ZkoS_uHFweBusreR3DDE2g,2062
|
|
99
99
|
verifiers/v1/harnesses/openclaw/__init__.py,sha256=kNyfPB1sGwEf4K3mTfKN0VEyxun3SGvNpvArVKvH-x8,160
|
|
@@ -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.dev115.dist-info/METADATA,sha256=I6MDfVF40UDfytWdFSc6c7TobWAMMAGP7iNSDNlU0sw,5118
|
|
192
|
+
verifiers-0.4.2.dev115.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
193
|
+
verifiers-0.4.2.dev115.dist-info/entry_points.txt,sha256=qdMg7ajiFpDsHf7tuPMRclJXizu1J6LTWawS5YS0B0I,137
|
|
194
|
+
verifiers-0.4.2.dev115.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
|
|
195
|
+
verifiers-0.4.2.dev115.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|