llm-bench

"""Where results live (BENCH_RESULTS_DIR, default bench/results) and filesystem-safe labels."""
import os
import re

HERE = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
RESULTS_DIR = os.environ.get("BENCH_RESULTS_DIR") or os.path.join(HERE, "results")
os.makedirs(RESULTS_DIR, exist_ok=True)


def safe_label(s):
    """Sanitize a model name into a filesystem-safe label."""
    return re.sub(r"[^A-Za-z0-9._-]", "_", s)