bench: default --data to the XDG/LocalAppData cache dir instead of the repo tree (#190)
Benchmark datasets are downloaded artifacts, not source files. Store them under $XDG_CACHE_HOME/colibri/bench (~/.cache/colibri/bench) on Linux/macOS and %LOCALAPPDATA%\colibri\bench on Windows instead of polluting the source tree at c/bench/. fetch_benchmarks.py already calls os.makedirs(out, exist_ok=True), so the new cache path is created on first use. Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -653,7 +653,13 @@ def main():
|
||||
pw.add_argument(arg,**kw)
|
||||
pw.add_argument("--no-browser",action="store_true",help="don't auto-open the browser")
|
||||
pb=sub.add_parser("bench", parents=[common]); pb.add_argument("tasks", nargs="*")
|
||||
pb.add_argument("--limit",type=int,default=40); pb.add_argument("--data",default=os.path.join(HERE,"bench"))
|
||||
pb.add_argument("--limit",type=int,default=40)
|
||||
if sys.platform == "win32":
|
||||
_cache_root = os.environ.get("LOCALAPPDATA", os.path.expanduser("~\\AppData\\Local"))
|
||||
else:
|
||||
_cache_root = os.environ.get("XDG_CACHE_HOME", os.path.expanduser("~/.cache"))
|
||||
_bench_cache = os.path.join(_cache_root, "colibri", "bench")
|
||||
pb.add_argument("--data",default=_bench_cache)
|
||||
pc=sub.add_parser("convert", parents=[common]); pc.add_argument("--repo",default="zai-org/GLM-5.2-FP8")
|
||||
pc.add_argument("--ebits",type=int,default=4); pc.add_argument("--io-bits",type=int,default=8); pc.add_argument("--xbits",type=int,default=0)
|
||||
pc.add_argument("--no-mtp",action="store_true",help="skip the MTP head (no speculative drafts)")
|
||||
|
||||
Reference in New Issue
Block a user