tuieval 0.2.0.dev103__py3-none-any.whl → 0.2.0.dev105__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.
- tuieval/_version.py +2 -2
- tuieval/graders/__init__.py +3 -2
- tuieval/graders/code.py +18 -2
- {tuieval-0.2.0.dev103.dist-info → tuieval-0.2.0.dev105.dist-info}/METADATA +1 -1
- {tuieval-0.2.0.dev103.dist-info → tuieval-0.2.0.dev105.dist-info}/RECORD +8 -8
- {tuieval-0.2.0.dev103.dist-info → tuieval-0.2.0.dev105.dist-info}/WHEEL +0 -0
- {tuieval-0.2.0.dev103.dist-info → tuieval-0.2.0.dev105.dist-info}/entry_points.txt +0 -0
- {tuieval-0.2.0.dev103.dist-info → tuieval-0.2.0.dev105.dist-info}/licenses/LICENSE +0 -0
tuieval/_version.py
CHANGED
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.2.0.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 2, 0, '
|
|
21
|
+
__version__ = version = '0.2.0.dev105'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 2, 0, 'dev105')
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
tuieval/graders/__init__.py
CHANGED
|
@@ -123,8 +123,9 @@ def strip_thinking(text):
|
|
|
123
123
|
"""Safety net for servers that leave <think> blocks in the answer."""
|
|
124
124
|
text = THINK_RE.sub("", text or "")
|
|
125
125
|
if "</think>" in text:
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
before, after = text.rsplit("</think>", 1)
|
|
127
|
+
text = after if after.strip(" \t\r\n`") else before # a stray closing tag (or fence) after the answer
|
|
128
|
+
return text.replace("<think>", "").replace("</think>", "").strip()
|
|
128
129
|
|
|
129
130
|
|
|
130
131
|
def grade(test, answer, meta=None):
|
tuieval/graders/code.py
CHANGED
|
@@ -15,8 +15,24 @@ from . import grader, result
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
def _extract_code(text):
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
"""The last python (or untagged) fenced block: the final answer, not a draft. A doubled
|
|
19
|
+
opening fence is one fence, and a stray fence after the last block is ignored."""
|
|
20
|
+
blocks, lang, cur = [], None, None
|
|
21
|
+
for line in text.splitlines(keepends=True):
|
|
22
|
+
fence = line.strip()
|
|
23
|
+
if not fence.startswith("```"):
|
|
24
|
+
if cur is not None:
|
|
25
|
+
cur.append(line)
|
|
26
|
+
elif cur is None:
|
|
27
|
+
lang, cur = fence[3:].strip().lower(), []
|
|
28
|
+
elif fence[3:].strip() and not "".join(cur).strip():
|
|
29
|
+
lang = fence[3:].strip().lower() # ```python twice
|
|
30
|
+
else:
|
|
31
|
+
if lang in ("", "python", "py", "python3"):
|
|
32
|
+
blocks.append("".join(cur))
|
|
33
|
+
cur = None
|
|
34
|
+
blocks = [b for b in blocks if b.strip()]
|
|
35
|
+
return blocks[-1] if blocks else text
|
|
20
36
|
|
|
21
37
|
|
|
22
38
|
CHECK_RE = re.compile(r"^# (SETUP|CHECK: *(.+?)) *$")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: tuieval
|
|
3
|
-
Version: 0.2.0.
|
|
3
|
+
Version: 0.2.0.dev105
|
|
4
4
|
Summary: Evaluate local and frontier LLMs on your own questions: accuracy, speed, tokens and PASS/FAIL verdicts, in the terminal.
|
|
5
5
|
Project-URL: Homepage, https://github.com/ashe-wb/tuieval
|
|
6
6
|
Project-URL: Issues, https://github.com/ashe-wb/tuieval/issues
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
tuieval/__init__.py,sha256=myVXVX7htbwezW6k3x_FuKgn1RSZ2WcTaDEMByGn6Wg,312
|
|
2
2
|
tuieval/__main__.py,sha256=E6Gls0DNz8GQK2K-kOUIx8cYhgANW_CH54VKrfCfs14,52
|
|
3
|
-
tuieval/_version.py,sha256=
|
|
3
|
+
tuieval/_version.py,sha256=tStsVW8oeJmJ2gr-6n_368UFUUTBZLCcmK5tXimWLIg,537
|
|
4
4
|
tuieval/builtin.toml,sha256=Nwu7O0qFzcrDAxXO_VZtDPvjVwxZ29OtYOW0BPihZGs,4410
|
|
5
5
|
tuieval/cli.py,sha256=mr0o_ud6NctZeU4WIrh17x_uzEK0vTeCynGP0wrCeBY,4812
|
|
6
6
|
tuieval/client.py,sha256=wtACBVsngtWopWWhIc4bB6mEUEi31dvvDePN-PjmXbM,11122
|
|
@@ -25,9 +25,9 @@ tuieval/verdict.py,sha256=3SM8qrVdWNIFDENagaR5ZPBYEnjsBtkYB9WS5TDVssU,20517
|
|
|
25
25
|
tuieval/watch_proxy.py,sha256=bnDO1i6n6yUs1hODoUWcMppJMGPavoQqs6aNYrIxpT8,11416
|
|
26
26
|
tuieval/workspace.py,sha256=V_HhkaN1odr0OpjNsPYradRWLpzDldM7SwpvxohBL4U,895
|
|
27
27
|
tuieval/yamlout.py,sha256=r1IokjLqW-Ztpg1fSn33ZW3VK00v1VvxymmU5Qy7GEw,606
|
|
28
|
-
tuieval/graders/__init__.py,sha256=
|
|
28
|
+
tuieval/graders/__init__.py,sha256=Xng8gVHC9ippYDsXCto1uZY1kTnxKh_vJUYUcZTBQL8,6108
|
|
29
29
|
tuieval/graders/answer.py,sha256=pTETs2LzOWPhtuuowMVXpLFwdnNjMw-7sELqrFV6ocQ,2125
|
|
30
|
-
tuieval/graders/code.py,sha256=
|
|
30
|
+
tuieval/graders/code.py,sha256=eLjV1CfaBO398bBSWvNvEoJJTRXLVnTv51WKNqYzMSw,4459
|
|
31
31
|
tuieval/graders/rag.py,sha256=j_gEjmaXmY_hgKu7-7pVQpQ8Cwb49gadnwFurih-1Hw,1447
|
|
32
32
|
tuieval/graders/reply.py,sha256=BdkL7EWSSMoyjwCOFa97TTQMR1QyrpMH-ntcgjzDPEg,2199
|
|
33
33
|
tuieval/graders/tool_call.py,sha256=_QXURtOk4ZKBnxXVMzFL1c9jWLWksRlLZ4VqOCL0t90,3578
|
|
@@ -48,8 +48,8 @@ tuieval/templates/packs/tool_call/pack.toml,sha256=n4bx0lGJHSmW41uVqhfIXJ2BWZpmT
|
|
|
48
48
|
tuieval/templates/packs/tool_call/system.txt,sha256=mKxu-lB-0YjLHXdgeFJa8x2C180OvcNz5cHv2N5Bg3U,254
|
|
49
49
|
tuieval/templates/packs/tool_call/tests.yaml,sha256=Nv7c4syrzJ9cU8EBKSK_1ZSFx9V02aCjW4-2TBCPT7s,1859
|
|
50
50
|
tuieval/templates/packs/tool_call/tools.yaml,sha256=HgxCkh0On2VwbHSsjAGM8tNCK7ZtKLGrs7lMCn3Fprs,1048
|
|
51
|
-
tuieval-0.2.0.
|
|
52
|
-
tuieval-0.2.0.
|
|
53
|
-
tuieval-0.2.0.
|
|
54
|
-
tuieval-0.2.0.
|
|
55
|
-
tuieval-0.2.0.
|
|
51
|
+
tuieval-0.2.0.dev105.dist-info/METADATA,sha256=QxUNtql4qp8WSHurPgWVPi9aJbNmUOC80V7XLOCGS-w,14691
|
|
52
|
+
tuieval-0.2.0.dev105.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
53
|
+
tuieval-0.2.0.dev105.dist-info/entry_points.txt,sha256=7eIhi1GpFxBP2OLJV02Nn8LwsNuO512eKOGt1IBbj04,45
|
|
54
|
+
tuieval-0.2.0.dev105.dist-info/licenses/LICENSE,sha256=7wfRgGtBGH1aXhZkIn47oUznqKC18kEPMvUVgol7Ffc,1077
|
|
55
|
+
tuieval-0.2.0.dev105.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|