verifiers 0.3.2.dev73__py3-none-any.whl → 0.3.2.dev74__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.
@@ -48,6 +48,12 @@ class RunConfig(BaseConfig):
48
48
  """Run directory name — the run writes to `output_dir / dir`. Defaults to `run.name`;
49
49
  set it only when the directory should differ from the display name."""
50
50
 
51
+ attach: str | None = None
52
+ """Stream into a run the launcher already created on the platform instead of opening a
53
+ new one — its evaluation id. Hosted evaluations pass the sandbox's `$EVALUATION_ID`
54
+ here; the platform owns that run's record and status, and a run that cannot be
55
+ attached to is an error rather than a local fallback. Requires `push`."""
56
+
51
57
  _id: str | None = PrivateAttr(default=None)
52
58
 
53
59
  @property
@@ -145,3 +151,11 @@ class EvalConfig(BaseConfig):
145
151
  if self.run.dir is None:
146
152
  self.run.dir = self.run.name
147
153
  return self
154
+
155
+ @model_validator(mode="after")
156
+ def attach_needs_push(self):
157
+ if self.run.attach and not self.push:
158
+ raise ValueError(
159
+ "run.attach names a run on the platform, so it needs push (drop --no-push)"
160
+ )
161
+ return self
@@ -45,7 +45,10 @@ class PushState:
45
45
  def open_run(config: EvalConfig, state: PushState, *, num_examples: int) -> pr.Run:
46
46
  """Open the run this eval streams into, before the first rollout, and give the
47
47
  config the run's id. A run that cannot be opened is logged and replaced by a
48
- disabled one; the eval goes on."""
48
+ disabled one; the eval goes on. With `run.attach` the run already exists on the
49
+ platform (a hosted evaluation's launcher created it and is waiting on it), so
50
+ there is no local fallback: failing to attach fails the eval."""
51
+ attach = config.run.attach
49
52
  identity: dict[str, Any] = {
50
53
  "name": config.run.name,
51
54
  # Resolved by name via the hub's get-or-create; no taskset, nothing to attach to.
@@ -61,12 +64,23 @@ def open_run(config: EvalConfig, state: PushState, *, num_examples: int) -> pr.R
61
64
  },
62
65
  }
63
66
  if config.push and os.getenv(pr.MODE_ENV, "").strip().lower() == "disabled":
67
+ if attach:
68
+ raise RuntimeError(
69
+ f"run.attach={attach!r} names a run on the platform, but "
70
+ f"{pr.MODE_ENV}=disabled would keep this eval local"
71
+ )
64
72
  # The SDK's own kill switch; the explicit `mode="online"` below would override it.
65
73
  logger.info("--push: %s=disabled; running without a platform run", pr.MODE_ENV)
66
74
  elif config.push:
67
75
  try:
68
- state.run = pr.init(mode="online", **identity)
69
- except Exception as e: # noqa: BLE001 - a failed upload must not fail the eval
76
+ state.run = pr.init(mode="online", id=attach, **identity)
77
+ except Exception as e:
78
+ if attach:
79
+ # The launcher's run would sit at running until it times out; a local
80
+ # run nobody reads is not a substitute.
81
+ raise RuntimeError(
82
+ f"--run.attach: could not attach to run {attach!r} ({type(e).__name__}: {e})"
83
+ ) from e
70
84
  logger.warning(
71
85
  "--push: could not open the run (%s: %s); running without it",
72
86
  type(e).__name__,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: verifiers
3
- Version: 0.3.2.dev73
3
+ Version: 0.3.2.dev74
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
@@ -35,7 +35,7 @@ Requires-Dist: msgpack>=1.1.2
35
35
  Requires-Dist: numpy>=2.1.0
36
36
  Requires-Dist: openai<3.0.0,>=2.54.0
37
37
  Requires-Dist: prime-pydantic-config[toml]>=0.4.3
38
- Requires-Dist: prime-runs>=0.1.1
38
+ Requires-Dist: prime-runs>=0.1.2
39
39
  Requires-Dist: prime-sandboxes>=0.2.39
40
40
  Requires-Dist: prime-tunnel>=0.1.8
41
41
  Requires-Dist: pydantic>=2.12.3
@@ -55,7 +55,7 @@ verifiers/v1/configs/taskset.py,sha256=N5sFYjzjcmnUEiNiHH69vaOfl8fsVwmqXmWmPixqO
55
55
  verifiers/v1/configs/cli/__init__.py,sha256=YMDUPdbRlDJ77dhj3QqzmyRhqNgUvuQdpj_bdBqzZPM,78
56
56
  verifiers/v1/configs/cli/debug.py,sha256=6ohG1AB0FBH_s8dVOTre86NlIf_fClz-3FiCBWgR-IM,2854
57
57
  verifiers/v1/configs/cli/env.py,sha256=YdIo0RW7VBhq_uCoa7RfnkkzGU5PW4kTa6Bn20lnd5c,2592
58
- verifiers/v1/configs/cli/eval.py,sha256=DwDk7KMosgtXNx6qYixOvgkCb83JbVUjL2utq2n3Spo,6877
58
+ verifiers/v1/configs/cli/eval.py,sha256=z13pIaPEbpTCDGNiniBetKnnFifUridvmpHCyop9bXE,7521
59
59
  verifiers/v1/configs/cli/init.py,sha256=JvIUOdhfZfNOXg2wm2i06jLLHpb97tNMzZqmcK_9wVw,916
60
60
  verifiers/v1/configs/cli/replay.py,sha256=vUCNs-9j1CXcAZhGozN1EaztcXK_dYVK3iN_fRmbSXw,2929
61
61
  verifiers/v1/configs/cli/validate.py,sha256=NXQ9KvhGLODLrg1fs3Jn-SOq1hhPxauVWiPSEp6wje0,3691
@@ -184,13 +184,13 @@ verifiers/v1/utils/loaders.py,sha256=2TrgZK3MzKub1GnfaTVIQhlwF6q4qATXZCjicH6nT9c
184
184
  verifiers/v1/utils/logging.py,sha256=-zgaM-HZsgxumZ4wYNlRMZepp6JanCSjeL2wSVulwJM,2296
185
185
  verifiers/v1/utils/memory.py,sha256=ZkIvGk6uITAH5sKon65LifKPbvZr8mJ__PVc23FZpOQ,1835
186
186
  verifiers/v1/utils/paths.py,sha256=it_4JWf_8bPZe4TRcyvL7_KJ4fsbEsxhhIY_xA8Ikus,308
187
- verifiers/v1/utils/platform.py,sha256=V3n0_d7urcYlz6-N5FjEB_ghwq2juw20MccJvQOh8G8,6544
187
+ verifiers/v1/utils/platform.py,sha256=iSNHXktiRQctcndNumdiCi_7wDRSRwW_6CgAcgPUrwE,7258
188
188
  verifiers/v1/utils/prime.py,sha256=UTYRjp9cbjNb6CVmBHda-1wWZAIIfxNOmTyNuT7_wL4,970
189
189
  verifiers/v1/utils/retries.py,sha256=Y2ZgrAjn-qNkRKZP_RVNL_7EK0iaRcZeCa404lpGYi4,5417
190
190
  verifiers/v1/utils/score.py,sha256=493yJVMw8teCu9JxapxMFPFzI0hNUqdo0Y2nGW4kckk,6200
191
191
  verifiers/v1/utils/version.py,sha256=-obEo_-l9-D8FLef4hYxncOe-uJpxrM1g2Hig_37Sgs,1607
192
- verifiers-0.3.2.dev73.dist-info/METADATA,sha256=XOpxs0ftFNLCrFqlitTNnKxkm1RJDID8j88_OpRODEY,4237
193
- verifiers-0.3.2.dev73.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
194
- verifiers-0.3.2.dev73.dist-info/entry_points.txt,sha256=uqQje0TMsr7k6nXlWxlPs13Si0evb3pVCEDF6c-YL80,241
195
- verifiers-0.3.2.dev73.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
196
- verifiers-0.3.2.dev73.dist-info/RECORD,,
192
+ verifiers-0.3.2.dev74.dist-info/METADATA,sha256=a2PSrYMW6fgotOcOld3uuC4p7RaApzDnUNqVNZyRuDA,4237
193
+ verifiers-0.3.2.dev74.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
194
+ verifiers-0.3.2.dev74.dist-info/entry_points.txt,sha256=uqQje0TMsr7k6nXlWxlPs13Si0evb3pVCEDF6c-YL80,241
195
+ verifiers-0.3.2.dev74.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
196
+ verifiers-0.3.2.dev74.dist-info/RECORD,,