File size: 515 Bytes
7087ec2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | import json
from pathlib import Path
PROJECT_ROOT = Path(__file__).resolve().parents[1]
METRICS_PATH = PROJECT_ROOT / "result" / "metrics.json"
def main():
if not METRICS_PATH.exists():
raise FileNotFoundError(f"Missing metrics file: {METRICS_PATH}. Run scripts/inference.py first.")
metrics = json.loads(METRICS_PATH.read_text(encoding="utf-8"))
print("BENO inference metrics")
for key, value in metrics.items():
print(f"{key}: {value}")
if __name__ == "__main__":
main()
|