verifiers 0.3.2.dev203__py3-none-any.whl → 0.3.2.dev205__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.
@@ -53,22 +53,25 @@ CHECK_SECONDS = 20
53
53
  async def _watch(client: "TunnelClient", url: str) -> None:
54
54
  """Keep a held tunnel up. A tunnel service hiccup can leave frpc running while the
55
55
  service has it disconnected for good, and every request to the URL then hangs or
56
- 404s; frpc can also exit. Either way, restart it."""
56
+ 404s; frpc can also exit. Either way, restart it. A tunnel the service has deleted
57
+ or expired can't be restarted, so stop watching it."""
58
+ from prime_tunnel import TunnelGoneError
59
+
57
60
  strikes = 0
58
61
  while True:
59
62
  await asyncio.sleep(CHECK_SECONDS * random.uniform(0.75, 1.25))
60
- if client.is_running:
63
+ if client.is_running and not client.is_gone:
61
64
  try:
62
- info = await client._client.get_tunnel(client.tunnel_id)
65
+ status = await client.status()
63
66
  except Exception as e: # noqa: BLE001 - the service is unreachable: no verdict
64
67
  logger.debug("tunnel %s: state check failed: %s", url, e)
65
68
  continue
66
- if info is None:
67
- logger.error("tunnel %s: registration gone; cannot repair", url)
68
- return
69
- strikes = strikes + 1 if info.status == "disconnected" else 0
70
- if strikes < 2:
71
- continue
69
+ strikes = strikes + 1 if status.registration == "disconnected" else 0
70
+ if client.is_gone:
71
+ logger.error("tunnel %s: registration gone; cannot repair", url)
72
+ return
73
+ if client.is_running and strikes < 2:
74
+ continue
72
75
  logger.warning(
73
76
  "tunnel %s: %s; restarting frpc",
74
77
  url,
@@ -76,6 +79,9 @@ async def _watch(client: "TunnelClient", url: str) -> None:
76
79
  )
77
80
  try:
78
81
  await client.restart()
82
+ except TunnelGoneError:
83
+ logger.error("tunnel %s: registration gone; cannot repair", url)
84
+ return
79
85
  except Exception as e: # noqa: BLE001 - tried again on the next check
80
86
  logger.warning("tunnel %s: frpc restart failed: %s", url, e)
81
87
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: verifiers
3
- Version: 0.3.2.dev203
3
+ Version: 0.3.2.dev205
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.4
39
39
  Requires-Dist: prime-sandboxes>=0.4.2
40
- Requires-Dist: prime-tunnel>=0.1.13
40
+ Requires-Dist: prime-tunnel>=0.1.14
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
@@ -130,7 +130,7 @@ verifiers/v1/interception/server.py,sha256=yeKMo3gVZl4G_iXpY2PWkwnwGBlfeb3uOhnc7
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=4RAn1eO9cyijfsgaE6cJmn_eFkReDMDiQAXZQ2UZBr8,5426
133
+ verifiers/v1/interception/tunnel/prime.py,sha256=GAKz6H52BuieBj5YHMjUCnlMOtWz-QN5fjV09SONGAM,5698
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
@@ -196,8 +196,8 @@ verifiers/v1/utils/scope.py,sha256=bzUEiWDOVdbj7dXOwGOlzsQ_-Xu0j9NR5TalQB-8TS8,8
196
196
  verifiers/v1/utils/score.py,sha256=493yJVMw8teCu9JxapxMFPFzI0hNUqdo0Y2nGW4kckk,6200
197
197
  verifiers/v1/utils/trace_store.py,sha256=RsCDonGR-bs-tvEstcppiJm3jFmAdIiG83fA5KtCbAw,2801
198
198
  verifiers/v1/utils/version.py,sha256=-obEo_-l9-D8FLef4hYxncOe-uJpxrM1g2Hig_37Sgs,1607
199
- verifiers-0.3.2.dev203.dist-info/METADATA,sha256=l2QZRoOww5BGE-nOyicc5K8BnYwILZ8OlVcwbMPFsEM,4228
200
- verifiers-0.3.2.dev203.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
201
- verifiers-0.3.2.dev203.dist-info/entry_points.txt,sha256=iugElcdWPKbQM7uFF0lZ8iUpHsNr17-BwEAAjJWxV3U,259
202
- verifiers-0.3.2.dev203.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
203
- verifiers-0.3.2.dev203.dist-info/RECORD,,
199
+ verifiers-0.3.2.dev205.dist-info/METADATA,sha256=oWts2X_oK65f02f7E5WaDhEjNsU1HpIHOAUrnWKCjCM,4228
200
+ verifiers-0.3.2.dev205.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
201
+ verifiers-0.3.2.dev205.dist-info/entry_points.txt,sha256=iugElcdWPKbQM7uFF0lZ8iUpHsNr17-BwEAAjJWxV3U,259
202
+ verifiers-0.3.2.dev205.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
203
+ verifiers-0.3.2.dev205.dist-info/RECORD,,