Vilyam888's picture
Upload folder using huggingface_hub
aa988a7 verified
raw
history blame contribute delete
498 Bytes
from __future__ import annotations
import json
from pathlib import Path
from broken_code_generation import METRICS_OUT_DIR, MODEL_ID
def write_report(path: Path, payload: dict) -> None:
payload.setdefault("model", MODEL_ID)
path.parent.mkdir(parents=True, exist_ok=True)
path.write_text(json.dumps(payload, ensure_ascii=False, indent=2), encoding="utf-8")
print(f"Saved: {path}")
def metrics_path(filename: str) -> Path:
return METRICS_OUT_DIR / filename