verifiers 0.3.2.dev188__py3-none-any.whl → 0.3.2.dev189__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/interception/server.py +13 -1
- verifiers/v1/interception/tunnel/prime.py +16 -0
- {verifiers-0.3.2.dev188.dist-info → verifiers-0.3.2.dev189.dist-info}/METADATA +2 -2
- {verifiers-0.3.2.dev188.dist-info → verifiers-0.3.2.dev189.dist-info}/RECORD +7 -7
- {verifiers-0.3.2.dev188.dist-info → verifiers-0.3.2.dev189.dist-info}/WHEEL +0 -0
- {verifiers-0.3.2.dev188.dist-info → verifiers-0.3.2.dev189.dist-info}/entry_points.txt +0 -0
- {verifiers-0.3.2.dev188.dist-info → verifiers-0.3.2.dev189.dist-info}/licenses/LICENSE +0 -0
|
@@ -588,7 +588,19 @@ class InterceptionServer(Interception):
|
|
|
588
588
|
logger.warning("interception: unauthorized request")
|
|
589
589
|
return web.json_response(dialect.error_body("unauthorized"), status=401)
|
|
590
590
|
session.adopt(asyncio.current_task())
|
|
591
|
-
|
|
591
|
+
started = time.monotonic()
|
|
592
|
+
try:
|
|
593
|
+
raw = await request.read()
|
|
594
|
+
except ConnectionError:
|
|
595
|
+
# Client dropped mid-upload.
|
|
596
|
+
logger.warning(
|
|
597
|
+
"intercept: request body cut off: id=%s received=%d/%s bytes after=%.1fs",
|
|
598
|
+
session.trace.id,
|
|
599
|
+
request.content.total_bytes,
|
|
600
|
+
request.content_length or "?",
|
|
601
|
+
time.monotonic() - started,
|
|
602
|
+
)
|
|
603
|
+
raise
|
|
592
604
|
try:
|
|
593
605
|
body = from_json(raw)
|
|
594
606
|
except ValueError:
|
|
@@ -5,6 +5,7 @@ pool scales with."""
|
|
|
5
5
|
|
|
6
6
|
import asyncio
|
|
7
7
|
import contextlib
|
|
8
|
+
import logging
|
|
8
9
|
from collections.abc import AsyncIterator
|
|
9
10
|
from typing import Literal
|
|
10
11
|
|
|
@@ -14,6 +15,21 @@ from verifiers.v1.utils.aio import run_shielded
|
|
|
14
15
|
from verifiers.v1.utils.prime import ensure_prime_auth
|
|
15
16
|
from verifiers.v1.utils.scope import run_scope
|
|
16
17
|
|
|
18
|
+
logger = logging.getLogger(__name__)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class TunnelLogHandler(logging.Handler):
|
|
22
|
+
"""Forward tunnel warnings and errors to this module's logger — and, when the app
|
|
23
|
+
enables INFO on `prime_tunnel`, the login after a reconnect."""
|
|
24
|
+
|
|
25
|
+
def emit(self, record: logging.LogRecord) -> None:
|
|
26
|
+
message = record.getMessage().removeprefix("frpc ")
|
|
27
|
+
if record.levelno >= logging.WARNING or "login to server success" in message:
|
|
28
|
+
logger.log(record.levelno, "tunnel %s", message)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
logging.getLogger("prime_tunnel.frpc").addHandler(TunnelLogHandler())
|
|
32
|
+
|
|
17
33
|
# The prime_tunnel service caps tunnel starts at 512/min per API token — a property of the
|
|
18
34
|
# tunnel service, shared by every process of a run that opens one. One run-scoped
|
|
19
35
|
# limiter, not a per-runtime config knob.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: verifiers
|
|
3
|
-
Version: 0.3.2.
|
|
3
|
+
Version: 0.3.2.dev189
|
|
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
|
|
@@ -37,7 +37,7 @@ Requires-Dist: openai<3.0.0,>=2.54.0
|
|
|
37
37
|
Requires-Dist: prime-pydantic-config[toml]>=0.4.3
|
|
38
38
|
Requires-Dist: prime-runs>=0.1.3
|
|
39
39
|
Requires-Dist: prime-sandboxes>=0.4.2
|
|
40
|
-
Requires-Dist: prime-tunnel>=0.1.
|
|
40
|
+
Requires-Dist: prime-tunnel>=0.1.12
|
|
41
41
|
Requires-Dist: pydantic>=2.12.3
|
|
42
42
|
Requires-Dist: pyzmq>=27.1.0
|
|
43
43
|
Requires-Dist: renderers[multimodal]>=0.1.12.dev2
|
|
@@ -126,11 +126,11 @@ verifiers/v1/harnesses/utils/mcp.py,sha256=EtDraHEqgsOB6xKvcF2z9C6HlQyKoST0ZDvmy
|
|
|
126
126
|
verifiers/v1/interception/__init__.py,sha256=5Kvo7tcBUVaa65s9A1NiOH3CPpzw-P5btXwxB4Nbbvs,4251
|
|
127
127
|
verifiers/v1/interception/base.py,sha256=Mg16Y104lyZilF9shdivdqYoqz4OYp978i_myyrulu8,2529
|
|
128
128
|
verifiers/v1/interception/pool.py,sha256=sk_zcdTV8EVRuzqlYMXxon_42tSDAlFvwcyOO2EF7hw,6473
|
|
129
|
-
verifiers/v1/interception/server.py,sha256=
|
|
129
|
+
verifiers/v1/interception/server.py,sha256=f8uLJ2rdZgD_EFIG2eKen3qIdPcCfo6MlwfTM4gCPcw,46362
|
|
130
130
|
verifiers/v1/interception/tunnel/__init__.py,sha256=eVNZJszj6myrKhx9jmJz7VRd9qlfj0AUvUZwI2bXEj8,893
|
|
131
131
|
verifiers/v1/interception/tunnel/base.py,sha256=DZB6uPLwM4Qy7n7m0vKeyg-Px87MhsmpYTpe2vpPEng,1998
|
|
132
132
|
verifiers/v1/interception/tunnel/custom.py,sha256=yL4UbGf4bAuMsxk42mEP-t1wITQCT8BE9FHQIz0qRMA,1708
|
|
133
|
-
verifiers/v1/interception/tunnel/prime.py,sha256=
|
|
133
|
+
verifiers/v1/interception/tunnel/prime.py,sha256=D1p0ecM0h6IVeYPD-1Xp605nx5OYcMwKqeUfqQtfq2s,3390
|
|
134
134
|
verifiers/v1/judges/__init__.py,sha256=z-16awBqEZJrlVYIb9HD-rk12RaABh6jodJgwX4blnA,410
|
|
135
135
|
verifiers/v1/judges/decision.py,sha256=U8BKuzJVMWfX76fa6jaG_rmcOhzMkZoXSnkUuHKpoV4,3991
|
|
136
136
|
verifiers/v1/judges/reference.py,sha256=iEVHw-iJ6dbwLOOqrvWrEMJOcUEYJ0YspT04rZz7Sd4,3868
|
|
@@ -195,8 +195,8 @@ verifiers/v1/utils/scope.py,sha256=bzUEiWDOVdbj7dXOwGOlzsQ_-Xu0j9NR5TalQB-8TS8,8
|
|
|
195
195
|
verifiers/v1/utils/score.py,sha256=493yJVMw8teCu9JxapxMFPFzI0hNUqdo0Y2nGW4kckk,6200
|
|
196
196
|
verifiers/v1/utils/trace_store.py,sha256=RsCDonGR-bs-tvEstcppiJm3jFmAdIiG83fA5KtCbAw,2801
|
|
197
197
|
verifiers/v1/utils/version.py,sha256=-obEo_-l9-D8FLef4hYxncOe-uJpxrM1g2Hig_37Sgs,1607
|
|
198
|
-
verifiers-0.3.2.
|
|
199
|
-
verifiers-0.3.2.
|
|
200
|
-
verifiers-0.3.2.
|
|
201
|
-
verifiers-0.3.2.
|
|
202
|
-
verifiers-0.3.2.
|
|
198
|
+
verifiers-0.3.2.dev189.dist-info/METADATA,sha256=yRhF_OHbwiNg5imhFjot_5OaN83INcb5SrqUhDnzZmQ,4228
|
|
199
|
+
verifiers-0.3.2.dev189.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
200
|
+
verifiers-0.3.2.dev189.dist-info/entry_points.txt,sha256=iugElcdWPKbQM7uFF0lZ8iUpHsNr17-BwEAAjJWxV3U,259
|
|
201
|
+
verifiers-0.3.2.dev189.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
|
|
202
|
+
verifiers-0.3.2.dev189.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|