{"record":{"id":"0469e34dd5729e74","repo":"sgl-project/sglang","slug":"no-files-found-in-hf-repo-repo-id","errorCode":null,"errorMessage":"No files found in HF repo {repo_id}.","messagePattern":"No files found in HF repo (.+?)\\.","errorType":"exception","errorClass":"IntegrityError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/utils/model_file_verifier.py","lineNumber":158,"sourceCode":"\ndef _load_checksums(source: str) -> Manifest:\n    if Path(source).is_file():\n        data = json.loads(Path(source).read_text())\n        return Manifest.from_dict(data)\n    return Manifest(files=_load_file_infos_from_hf(repo_id=source))\n\n\ndef _load_file_infos_from_hf(*, repo_id: str) -> Dict[str, FileInfo]:\n    from huggingface_hub import HfFileSystem\n\n    fs = HfFileSystem()\n    files = fs.ls(repo_id, detail=True)\n\n    file_infos = dict(\n        r for r in map(lambda f: _get_filename_and_info_from_hf_file(fs, f), files) if r\n    )\n    if not file_infos:\n        raise IntegrityError(f\"No files found in HF repo {repo_id}.\")\n\n    return file_infos\n\n\ndef _get_filename_and_info_from_hf_file(\n    fs, file_info\n) -> Optional[Tuple[str, FileInfo]]:\n    if file_info.get(\"type\") != \"file\":\n        return None\n\n    filename = Path(file_info.get(\"name\", \"\")).name\n    if any(fnmatch.fnmatch(filename, pat) for pat in IGNORE_PATTERNS):\n        return None\n\n    size = file_info.get(\"size\", -1)\n    lfs_info = file_info.get(\"lfs\")\n    if lfs_info and \"sha256\" in lfs_info:\n        return filename, FileInfo(sha256=lfs_info[\"sha256\"], size=size)","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/utils/model_file_verifier.py#L140-L176","documentation":"When building a manifest from an HF repo id (not a local path), the verifier lists repo files via huggingface_hub's filesystem, filters out non-model files (via _get_filename_and_info_from_hf_file returning None), and raises if nothing survives. It means the repo id resolved but yielded zero usable model files.","triggerScenarios":"Calling generate_checksums(source=<repo_id>) on a repo containing only non-qualifying files (e.g., just README/LOCK, .gitattributes) or a dataset/empty repo; also a typo'd repo id that still resolves.","commonSituations":"Wrong repo id (an empty placeholder repo), passing a dataset repo instead of a model repo, or all files being filtered out by the extension allowlist.","solutions":["Double-check the repo id and confirm it actually hosts model files (`huggingface-cli ls <repo_id>`).","If files exist but are non-standard names/extensions, extend the file filter in _get_filename_and_info_from_hf_file.","Use a local snapshot directory as source instead of a repo id."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"from huggingface_hub import HfApi\nfiles = HfApi().list_repo_files(repo_id)\nif not any(f.endswith((\".safetensors\", \".bin\", \".json\")) for f in files):\n    raise SystemExit(f\"repo {repo_id} has no model files\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify repo id with list_repo_files before checksum generation.","Prefer local snapshots for offline pipelines."],"tags":["huggingface","checksum","model-files"],"backgroundTag":"empty-repository","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}