tuieval 0.2.0.dev99__py3-none-any.whl → 0.2.0.dev100__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/compare.py +29 -0
- tuieval/engine.py +34 -19
- {tuieval-0.2.0.dev99.dist-info → tuieval-0.2.0.dev100.dist-info}/METADATA +1 -1
- {tuieval-0.2.0.dev99.dist-info → tuieval-0.2.0.dev100.dist-info}/RECORD +8 -8
- {tuieval-0.2.0.dev99.dist-info → tuieval-0.2.0.dev100.dist-info}/WHEEL +0 -0
- {tuieval-0.2.0.dev99.dist-info → tuieval-0.2.0.dev100.dist-info}/entry_points.txt +0 -0
- {tuieval-0.2.0.dev99.dist-info → tuieval-0.2.0.dev100.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.dev100'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 2, 0, 'dev100')
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
tuieval/compare.py
CHANGED
|
@@ -41,6 +41,7 @@ def _load_native(data):
|
|
|
41
41
|
"pack": pack["name"], "pack_fp": pack["fingerprint"],
|
|
42
42
|
# hosted (OpenRouter) models: the provider endpoint and its declared quantization
|
|
43
43
|
"endpoint": run.get("endpoint"), "quantization": run.get("quantization"),
|
|
44
|
+
"hosted": bool(run.get("hosted") or run.get("endpoint")),
|
|
44
45
|
"loaded_alongside": run.get("loaded_alongside") or []}
|
|
45
46
|
rows = []
|
|
46
47
|
for r in data["results"]:
|
|
@@ -78,9 +79,37 @@ def load(paths):
|
|
|
78
79
|
row.update(raw=rec, path=path, pack_fp=data["pack"]["fingerprint"])
|
|
79
80
|
rows += r
|
|
80
81
|
infos.append(i)
|
|
82
|
+
# older results also noted hosted models alongside, which share nothing of this machine: a hosted
|
|
83
|
+
# model's rows note no one, and no one notes it
|
|
84
|
+
labels, prefixes = configured_hosted(paths)
|
|
85
|
+
labels |= {i["label"] for i in infos if i["hosted"]}
|
|
86
|
+
|
|
87
|
+
def local(along):
|
|
88
|
+
return [l for l in along if l not in labels and not l.startswith(tuple(prefixes))]
|
|
89
|
+
for row in rows:
|
|
90
|
+
row["alongside"] = [] if row["model"] in labels else local(row["alongside"])
|
|
91
|
+
for i in infos:
|
|
92
|
+
i["loaded_alongside"] = [] if i["label"] in labels else local(i["loaded_alongside"])
|
|
81
93
|
return rows, infos
|
|
82
94
|
|
|
83
95
|
|
|
96
|
+
def configured_hosted(paths):
|
|
97
|
+
"""(labels, label prefixes) models.toml says are hosted, in the workspaces these results/<label>/
|
|
98
|
+
<pack>.json are from: its hosted models, and the prefix of models named at run time on a hosted
|
|
99
|
+
server (e.g. "or-"). Covers hosted models whose results aren't loaded."""
|
|
100
|
+
from . import engine
|
|
101
|
+
labels, prefixes = set(), set()
|
|
102
|
+
for root in {os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(p)))) for p in paths}:
|
|
103
|
+
try:
|
|
104
|
+
cfg = engine.load_config(os.path.join(root, "models.toml"))
|
|
105
|
+
except Exception:
|
|
106
|
+
continue # no readable models.toml there: the results' own marks still apply
|
|
107
|
+
labels |= {m["label"] for m in cfg["models"] if engine.hosted(cfg, m)}
|
|
108
|
+
prefixes |= {engine.remote_label(n, s, "") for n, s in cfg["servers"].items()
|
|
109
|
+
if s.get("any_model") and engine.hosted(cfg, {"server": n})}
|
|
110
|
+
return labels, prefixes
|
|
111
|
+
|
|
112
|
+
|
|
84
113
|
def default_paths(results_dir=None):
|
|
85
114
|
"""results/<label>/<pack>.json, excluding smoke runs and the archive."""
|
|
86
115
|
results_dir = results_dir or workspace.path("results")
|
tuieval/engine.py
CHANGED
|
@@ -83,6 +83,21 @@ def builtin_config():
|
|
|
83
83
|
return tomllib.load(f)
|
|
84
84
|
|
|
85
85
|
|
|
86
|
+
def hosted(cfg, m):
|
|
87
|
+
"""A model served by an API elsewhere: tuieval doesn't start its server and its url isn't this
|
|
88
|
+
machine (or its server sets hosted = true). A server you started yourself on localhost still
|
|
89
|
+
counts as local (it uses the GPU)."""
|
|
90
|
+
if m.get("remote"):
|
|
91
|
+
return True
|
|
92
|
+
server = cfg["servers"][m["server"]]
|
|
93
|
+
if "hosted" in server: # say so for a server the url doesn't give away (e.g. a local proxy to an API)
|
|
94
|
+
return bool(server["hosted"])
|
|
95
|
+
if server.get("cmd"):
|
|
96
|
+
return False
|
|
97
|
+
host = urllib.parse.urlparse(server.get("url") or "").hostname or ""
|
|
98
|
+
return bool(host) and host not in ("localhost", "127.0.0.1", "::1", "0.0.0.0")
|
|
99
|
+
|
|
100
|
+
|
|
86
101
|
def load_config(path):
|
|
87
102
|
"""Read models.toml, fill in the built-ins it leaves out (builtin.toml) and each model's defaults.
|
|
88
103
|
[defaults] are filled key by key; [sampling] only when models.toml has none (sampling is part of
|
|
@@ -675,8 +690,9 @@ class Lane:
|
|
|
675
690
|
"""One model being run: its own request stream, stall reason and skip switch, so models run
|
|
676
691
|
side by side (parallel_models) stop independently. Runs and tunes in one lane use the engine's
|
|
677
692
|
main lane."""
|
|
678
|
-
def __init__(self, label=None):
|
|
693
|
+
def __init__(self, label=None, hosted=False):
|
|
679
694
|
self.label = label
|
|
695
|
+
self.hosted = hosted # a hosted model shares nothing of this machine, so it's never noted alongside
|
|
680
696
|
self.stream = None
|
|
681
697
|
self.stall = None # set by the stall watcher: why this model's server stalled
|
|
682
698
|
self.skip = threading.Event()
|
|
@@ -1282,18 +1298,7 @@ class Engine:
|
|
|
1282
1298
|
+ min(parallel_hosted or self.parallel_hosted(), hosted))
|
|
1283
1299
|
|
|
1284
1300
|
def hosted(self, m):
|
|
1285
|
-
|
|
1286
|
-
machine (or its server sets hosted = true). A server you started yourself on localhost still
|
|
1287
|
-
counts as local (it uses the GPU)."""
|
|
1288
|
-
if m.get("remote"):
|
|
1289
|
-
return True
|
|
1290
|
-
server = self.cfg["servers"][m["server"]]
|
|
1291
|
-
if "hosted" in server: # say so for a server the url doesn't give away (e.g. a local proxy to an API)
|
|
1292
|
-
return bool(server["hosted"])
|
|
1293
|
-
if server.get("cmd"):
|
|
1294
|
-
return False
|
|
1295
|
-
host = urllib.parse.urlparse(server.get("url") or "").hostname or ""
|
|
1296
|
-
return bool(host) and host not in ("localhost", "127.0.0.1", "::1", "0.0.0.0")
|
|
1301
|
+
return hosted(self.cfg, m)
|
|
1297
1302
|
|
|
1298
1303
|
def memory_need_gb(self, m):
|
|
1299
1304
|
"""GPU memory a model takes while served here: 0 for one we don't start (a hosted API or a
|
|
@@ -1817,15 +1822,23 @@ class Engine:
|
|
|
1817
1822
|
for t in threads:
|
|
1818
1823
|
t.join()
|
|
1819
1824
|
|
|
1825
|
+
def _local_lanes(self, lane, exclude=None):
|
|
1826
|
+
"""Labels of the local models served now (call with _lanes_lock held); none for a hosted lane."""
|
|
1827
|
+
if lane.hosted:
|
|
1828
|
+
return set()
|
|
1829
|
+
return {l for l, o in self._lanes.items() if not o.hosted} - {exclude}
|
|
1830
|
+
|
|
1820
1831
|
def _run_lane(self, label, mine):
|
|
1821
1832
|
"""One model's jobs, in this thread's own lane. Other models served meanwhile are noted on
|
|
1822
|
-
each answer (ran_alongside), since they share the machine's GPU and memory bandwidth.
|
|
1823
|
-
|
|
1833
|
+
each answer (ran_alongside), since they share the machine's GPU and memory bandwidth. Hosted
|
|
1834
|
+
models share neither, so they note nothing and nobody notes them."""
|
|
1824
1835
|
m = mine[0].model
|
|
1836
|
+
lane = Lane(label, self.hosted(m))
|
|
1825
1837
|
with self._lanes_lock:
|
|
1826
|
-
|
|
1827
|
-
other.
|
|
1828
|
-
|
|
1838
|
+
if not lane.hosted:
|
|
1839
|
+
for other in self._lanes.values():
|
|
1840
|
+
other.seen.add(label)
|
|
1841
|
+
lane.seen = self._local_lanes(lane)
|
|
1829
1842
|
if self.cfg["servers"][m["server"]].get("cmd"):
|
|
1830
1843
|
lane.port = self._lane_port(m)
|
|
1831
1844
|
self._lanes[label] = lane
|
|
@@ -1987,6 +2000,8 @@ class Engine:
|
|
|
1987
2000
|
"kv_type": sv.kv_type, "perf_args": sv.perf_args if local else None,
|
|
1988
2001
|
"perf_source": sv.perf_source, "server_version": self.server_version(m) if local else None}
|
|
1989
2002
|
ep = self.endpoint(m)
|
|
2003
|
+
if self.hosted(m):
|
|
2004
|
+
serving_info["hosted"] = True
|
|
1990
2005
|
if ep:
|
|
1991
2006
|
serving_info.update(endpoint=ep["tag"], provider=ep.get("provider"), quantization=ep.get("quantization"))
|
|
1992
2007
|
for j in jobs:
|
|
@@ -2244,7 +2259,7 @@ class Engine:
|
|
|
2244
2259
|
self._check()
|
|
2245
2260
|
lane = self._lane()
|
|
2246
2261
|
with self._lanes_lock:
|
|
2247
|
-
lane.seen =
|
|
2262
|
+
lane.seen = self._local_lanes(lane, job.label)
|
|
2248
2263
|
self.emit("request_started", job=job, test=test["description"], test_id=test["id"],
|
|
2249
2264
|
has_image=bool(test.get("image")), repeat=rep, difficulty=test.get("difficulty", "unrated"))
|
|
2250
2265
|
waits = list(self.SERVER_RETRY_WAITS_S)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: tuieval
|
|
3
|
-
Version: 0.2.0.
|
|
3
|
+
Version: 0.2.0.dev100
|
|
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,12 +1,12 @@
|
|
|
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=y3vaJ3eXdQYaUkE0tzZXiiT1vRZ_h4vmv3rHfxsmx3g,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
|
|
7
|
-
tuieval/compare.py,sha256=
|
|
7
|
+
tuieval/compare.py,sha256=UjZcWsbPep7EG4XRKWaEthUT0l0iN8rKIs1135dbt6c,32139
|
|
8
8
|
tuieval/doctor.py,sha256=j2MdDORstsAGPnRmpsnxau1_fR6sTc_oEFGM5zugTJU,7246
|
|
9
|
-
tuieval/engine.py,sha256=
|
|
9
|
+
tuieval/engine.py,sha256=cD9N5TxK0XKrGYm5G0aEY3FYqU4tY36didaH-MYU788,125887
|
|
10
10
|
tuieval/export.py,sha256=dbHQgL_ubWtIPM1sLzAew_gETnrDJyd0zgqVA5vkpXM,9657
|
|
11
11
|
tuieval/insights.py,sha256=m6HZk1VbX-avHr3xyT8eVJ5OLjKa_EKTVBxsu04X_HQ,28947
|
|
12
12
|
tuieval/logs.py,sha256=01gZK6tf53dIThaIrs1bEsz9eqKYVlcxpyaLnSPTVxo,8127
|
|
@@ -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.dev100.dist-info/METADATA,sha256=Fi08-nci1K46vMk8ohZOF3ztQt2d_ud2INMG3dYDcF4,14581
|
|
52
|
+
tuieval-0.2.0.dev100.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
53
|
+
tuieval-0.2.0.dev100.dist-info/entry_points.txt,sha256=7eIhi1GpFxBP2OLJV02Nn8LwsNuO512eKOGt1IBbj04,45
|
|
54
|
+
tuieval-0.2.0.dev100.dist-info/licenses/LICENSE,sha256=7wfRgGtBGH1aXhZkIn47oUznqKC18kEPMvUVgol7Ffc,1077
|
|
55
|
+
tuieval-0.2.0.dev100.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|