{"record":{"id":"2b7b483a7e3aed86","repo":"docling-project/docling","slug":"no-metrics-files-found-in-summary-report-input-f","errorCode":null,"errorMessage":"No metrics files found in summary report: {input_file}","messagePattern":"No metrics files found in summary report: (.+?)","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"perfs/plot_memory_metrics.py","lineNumber":69,"sourceCode":"    for index, run in enumerate(runs, start=1):\n        if not isinstance(run, dict):\n            continue\n        metrics_file = run.get(\"metrics_file\")\n        if not isinstance(metrics_file, str):\n            continue\n        thread_count = run.get(\"threads\")\n        label = (\n            f\"threads={thread_count}\"\n            if isinstance(thread_count, int)\n            else f\"run {index}\"\n        )\n        metrics_path = Path(metrics_file)\n        if not metrics_path.is_absolute():\n            metrics_path = input_file.parent / metrics_path\n        metrics_files.append((label, metrics_path))\n\n    if not metrics_files:\n        raise SystemExit(f\"No metrics files found in summary report: {input_file}\")\n    return metrics_files\n\n\ndef _empty_series() -> dict[str, list[float]]:\n    return {key: [] for key in MEMORY_KEYS}\n\n\ndef _append_memory_values(\n    target: dict[str, list[float]],\n    memory_payload: dict[str, Any] | None,\n) -> None:\n    for key in MEMORY_KEYS:\n        value = None if memory_payload is None else memory_payload.get(key)\n        if isinstance(value, int | float):\n            target[key].append(float(value))\n        else:\n            target[key].append(float(\"nan\"))\n","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/docling-project/docling/blob/61d76f1ff3f8428065465889f7b4577da7df704c/perfs/plot_memory_metrics.py#L51-L87","documentation":"SystemExit raised by _resolve_metrics_files() in perfs/plot_memory_metrics.py when the summary report's 'runs' list yields zero usable metrics entries. Entries are only kept when they are dicts containing a string 'metrics_file' value; if all runs are malformed or lack that key, the resolved list is empty and plotting cannot proceed.","triggerScenarios":"A summary whose runs entries omit 'metrics_file' (e.g. runs that failed before metrics were written), or entries that are strings/nulls instead of objects; also a 'runs' array that is empty.","commonSituations":"Benchmark summaries from partially failed runs where crashing thread-count configurations never produced metrics; older report writers that stored the path under a different key; summaries edited to strip absolute paths for sharing.","solutions":["Re-run the benchmark for at least one configuration that completes successfully so 'runs' contains a dict with a valid 'metrics_file' string.","Inspect the runs array ('python -c \"import json;print(json.load(open('s.json'))['runs'])\"') and fix/rename keys if the schema drifted.","If metrics files were moved, update each run's 'metrics_file' path (relative paths are resolved against the summary's directory)."],"exampleFix":"# before: runs entries look like {\"threads\": 8, \"error\": \"crash\"}\n$ python perfs/plot_memory_metrics.py summary.json\n# SystemExit: No metrics files found in summary report: summary.json\n\n# after: ensure at least one successful run, e.g.\n$ python perfs/iterate_pdf_pages.py --input-dir ./pdfs --threads 8 --metrics-file metrics.jsonl --report-file summary.json\n$ python perfs/plot_memory_metrics.py summary.json","handlingStrategy":"validation","validationCode":"import json\n\ndata = json.loads(Path(summary).read_text(encoding=\"utf-8\"))\nusable = [r for r in data.get(\"runs\", []) if isinstance(r, dict) and isinstance(r.get(\"metrics_file\"), str)]\nif not usable:\n    raise SystemExit(\"summary has no runs with metrics_file; rerun benchmark\")","typeGuard":"def has_usable_runs(data: object) -> bool:\n    return isinstance(data, dict) and any(\n        isinstance(r, dict) and isinstance(r.get(\"metrics_file\"), str)\n        for r in data.get(\"runs\", [])\n    )","tryCatchPattern":null,"preventionTips":["Verify at least one benchmark configuration completed before plotting.","Keep 'metrics_file' keys intact when editing or migrating summary reports.","Resolve relative metrics paths against the summary's directory after moving files."],"tags":["perf-tooling","json","schema","cli"],"backgroundTag":null,"analyzedSha":"61d76f1ff3f8428065465889f7b4577da7df704c","analyzedAt":"2026-08-14T23:53:18.727Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}