verifiers 0.3.2.dev15__py3-none-any.whl → 0.3.2.dev17__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.
@@ -363,6 +363,7 @@ class TrainClient(Client):
363
363
  model = body["model"]
364
364
  sampling_params = sampling.wire_args()
365
365
  chat_template_kwargs = sampling_params.pop("chat_template_kwargs", None)
366
+ cache_salt = sampling_params.pop("cache_salt", None)
366
367
  pool = ElasticRendererPool(
367
368
  self.config.renderer_model_name or model,
368
369
  self.config.renderer,
@@ -431,6 +432,7 @@ class TrainClient(Client):
431
432
  prompt_attribution=prompt_attribution,
432
433
  tools=wire_tools,
433
434
  sampling_params=sampling_params,
435
+ cache_salt=cache_salt,
434
436
  extra_headers={SESSION_ID_HEADER: session_id}
435
437
  if session_id
436
438
  else None,
@@ -55,12 +55,23 @@ def parse_judge_choice(
55
55
  return None
56
56
 
57
57
  text = content.rsplit("</think>", 1)[-1].strip()
58
- text = extract_boxed_answer(text, strict=True).strip() or text
59
-
60
58
  text_upper = text.upper()
61
59
  choices_by_upper = {choice.upper(): choice for choice in choices}
62
60
  allowed = "|".join(re.escape(choice) for choice in choices_by_upper)
63
61
  choice_re = rf"(?<!\w)({allowed})(?!\w)"
62
+ horizontal_space = r"[^\S\n]"
63
+ final_choices = re.findall(
64
+ rf"^{horizontal_space}*FINAL{horizontal_space}+"
65
+ rf"(?:JUDGMENT|ANSWER|VERDICT){horizontal_space}*"
66
+ rf"(?:IS{horizontal_space}*)?[:\-]?{horizontal_space}*{choice_re}",
67
+ text_upper,
68
+ re.MULTILINE,
69
+ )
70
+ if final_choices:
71
+ return choices_by_upper.get(final_choices[-1])
72
+
73
+ text = extract_boxed_answer(text, strict=True).strip() or text
74
+ text_upper = text.upper()
64
75
  verdict_re = (
65
76
  r"(?:^|\n)\s*(?:FINAL\s+JUDGMENT|FINAL\s+ANSWER|FINAL\s+VERDICT|"
66
77
  r"JUDGMENT|VERDICT|ANSWER)\s*(?:IS\s*)?[:\-]?\s*"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: verifiers
3
- Version: 0.3.2.dev15
3
+ Version: 0.3.2.dev17
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
@@ -207,7 +207,7 @@ verifiers/v1/clients/__init__.py,sha256=Ysig0tE_0E4Jsfgfes1XHN-fK1s_RCXdqZD6E7lK
207
207
  verifiers/v1/clients/base.py,sha256=PoDw4GMqrfuPTFVK6n2jDmlD0_lJ5zTrYcNio5yq6K8,1691
208
208
  verifiers/v1/clients/client.py,sha256=zqC_AkiD9pl0kxxIbupNiehbS-YnVdp3EMZ0LOHTd8U,3125
209
209
  verifiers/v1/clients/eval.py,sha256=-OcYUqlj8dBRjyuffMvymc1fMfZcjo-p5q8ZSMvDGzY,8106
210
- verifiers/v1/clients/train.py,sha256=hRuwIyxunNRwDKItPvpgPzap2NVew7hoAzUsaz8fiZw,18699
210
+ verifiers/v1/clients/train.py,sha256=ZNbEU8WPZ6xI1hho7MiIjleZOswt2lOUGkIUQqpe8gM,18803
211
211
  verifiers/v1/configs/__init__.py,sha256=X7u6X7B3ieD1HZl79Tv1kg-yPHbT0QLvAebaGqxVtvA,317
212
212
  verifiers/v1/configs/agent.py,sha256=L5P6ombAi4U5wwsspMHAuM8111sB9AVdm8q6B5iV1lw,3251
213
213
  verifiers/v1/configs/client.py,sha256=E7ZxeWBFV_AP8MyfxXncTZs-Yn-QKdDS57HCAzqVTrQ,4437
@@ -348,10 +348,10 @@ verifiers/v1/utils/paths.py,sha256=it_4JWf_8bPZe4TRcyvL7_KJ4fsbEsxhhIY_xA8Ikus,3
348
348
  verifiers/v1/utils/platform.py,sha256=3P4ryQTHIA8r3hdi-cTGOzKJSsaJEZqsQ8HPK9Rtjxg,12269
349
349
  verifiers/v1/utils/prime.py,sha256=UTYRjp9cbjNb6CVmBHda-1wWZAIIfxNOmTyNuT7_wL4,970
350
350
  verifiers/v1/utils/retries.py,sha256=Y2ZgrAjn-qNkRKZP_RVNL_7EK0iaRcZeCa404lpGYi4,5417
351
- verifiers/v1/utils/score.py,sha256=-R5Cog14r_tJ6Q_oOfGr5VPAm2CCUhofYZB6B9lm4wM,5787
351
+ verifiers/v1/utils/score.py,sha256=493yJVMw8teCu9JxapxMFPFzI0hNUqdo0Y2nGW4kckk,6200
352
352
  verifiers/v1/utils/version.py,sha256=-obEo_-l9-D8FLef4hYxncOe-uJpxrM1g2Hig_37Sgs,1607
353
- verifiers-0.3.2.dev15.dist-info/METADATA,sha256=N9Uevo7iotzAnP6QU9WOBCN5HJHlduP3qlQ4d4otaZw,4654
354
- verifiers-0.3.2.dev15.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
355
- verifiers-0.3.2.dev15.dist-info/entry_points.txt,sha256=hZ5wDc1T8y-EvOziw7kQqatBJ6PbdSu2ygP5rjANl7c,564
356
- verifiers-0.3.2.dev15.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
357
- verifiers-0.3.2.dev15.dist-info/RECORD,,
353
+ verifiers-0.3.2.dev17.dist-info/METADATA,sha256=tHkPIVGesTZvp7_9_SrtJ2Ky3HC96B7LL_3CBKNh1Fk,4654
354
+ verifiers-0.3.2.dev17.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
355
+ verifiers-0.3.2.dev17.dist-info/entry_points.txt,sha256=hZ5wDc1T8y-EvOziw7kQqatBJ6PbdSu2ygP5rjANl7c,564
356
+ verifiers-0.3.2.dev17.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
357
+ verifiers-0.3.2.dev17.dist-info/RECORD,,