verifiers 0.3.2.dev16__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.
@@ -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.dev16
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
@@ -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.dev16.dist-info/METADATA,sha256=wN-gCqpc23d_4zW5cePYka23WGPH0xraWRM9GHqKzf8,4654
354
- verifiers-0.3.2.dev16.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
355
- verifiers-0.3.2.dev16.dist-info/entry_points.txt,sha256=hZ5wDc1T8y-EvOziw7kQqatBJ6PbdSu2ygP5rjANl7c,564
356
- verifiers-0.3.2.dev16.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
357
- verifiers-0.3.2.dev16.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,,