{"record":{"id":"6927027e3ea3b998","repo":"docling-project/docling","slug":"dataset-args-repo-id-does-not-contain-a-pdf","errorCode":null,"errorMessage":"Dataset '{args.repo_id}' does not contain a 'pdf/' subfolder.","messagePattern":"Dataset '(.+?)' does not contain a 'pdf/' subfolder\\.","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"perfs/iterate_pdf_pages.py","lineNumber":422,"sourceCode":"        from huggingface_hub import snapshot_download\n    except ImportError as exc:\n        raise SystemExit(\n            \"Hugging Face dataset support requires 'huggingface_hub' to be installed.\"\n        ) from exc\n\n    assert args.repo_id is not None\n    with _suppress_huggingface_output():\n        snapshot_dir = Path(\n            snapshot_download(\n                repo_id=args.repo_id,\n                repo_type=\"dataset\",\n                revision=args.revision,\n                allow_patterns=\"pdf/**\",\n            )\n        )\n    pdf_dir = snapshot_dir / \"pdf\"\n    if not pdf_dir.is_dir():\n        raise SystemExit(\n            f\"Dataset '{args.repo_id}' does not contain a 'pdf/' subfolder.\"\n        )\n    return pdf_dir\n\n\ndef _metrics_file_for_thread_count(\n    metrics_file: Path | None,\n    thread_count: int,\n    multiple_thread_counts: bool,\n) -> Path | None:\n    if metrics_file is None or not multiple_thread_counts:\n        return metrics_file\n    return metrics_file.with_name(\n        f\"{metrics_file.stem}-threads-{thread_count}{metrics_file.suffix}\"\n    )\n\n\ndef _format_duration(seconds: float) -> str:","sourceCodeStart":404,"sourceCodeEnd":440,"githubUrl":"https://github.com/docling-project/docling/blob/61d76f1ff3f8428065465889f7b4577da7df704c/perfs/iterate_pdf_pages.py#L404-L440","documentation":"SystemExit raised by _resolve_input_dir() in perfs/iterate_pdf_pages.py after successfully downloading a Hugging Face dataset snapshot: the expected 'pdf/' subfolder is missing from the downloaded snapshot. The script filters the snapshot with allow_patterns='pdf/**', so if the dataset has no pdf/ directory the download yields no usable PDFs and the script aborts.","triggerScenarios":"Running with --repo-id pointing at a dataset whose files live under a different layout (e.g. 'documents/', 'data/', or PDFs at the repository root) instead of the required 'pdf/' folder.","commonSituations":"Pointing the benchmark at a private/internal corpus that follows a different directory convention than the public dataset the script was built against; dataset reorganizations or renames of the pdf/ folder; repo_type mistakes (passing a model repo id instead of a dataset id).","solutions":["Check the dataset layout on the Hub (Files tab) and confirm PDFs live under 'pdf/'.","If they live elsewhere, clone/download the dataset yourself and pass --input-dir <local_dir_with_pdfs> instead of --repo-id.","If you own the dataset, restructure it so PDFs are under pdf/ (the pattern the script hardcodes)."],"exampleFix":"# before\n$ python perfs/iterate_pdf_pages.py --repo-id my-org/corpus\n# SystemExit: Dataset 'my-org/corpus' does not contain a 'pdf/' subfolder.\n\n# after\n$ hf download my-org/corpus --repo-type dataset --local-dir ./corpus\n$ python perfs/iterate_pdf_pages.py --input-dir ./corpus/documents","handlingStrategy":"validation","validationCode":"from pathlib import Path\nlocal = Path(\"corpus\")\nif (local / \"pdf\").is_dir():\n    args.input_dir = local / \"pdf\"\nelse:\n    raise SystemExit(f\"{local} lacks pdf/ subfolder; check dataset layout\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Inspect the dataset's Files tab on the Hub for the pdf/ folder before scripting --repo-id runs.","For non-standard layouts, download manually and use --input-dir.","Pin a dataset revision with --revision so reorganizations cannot silently break runs."],"tags":["perf-tooling","huggingface","dataset","cli"],"backgroundTag":null,"analyzedSha":"61d76f1ff3f8428065465889f7b4577da7df704c","analyzedAt":"2026-08-14T23:53:18.727Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}