MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _snapshot

Function _snapshot

experiments/benchmark/fetch_benchmark.py:20–41  ·  view source on GitHub ↗
(repo_id: str, revision: str | None)

Source from the content-addressed store, hash-verified

18
19
20def _snapshot(repo_id: str, revision: str | None) -> Path:
21 try:
22 from huggingface_hub import snapshot_download
23 except ImportError as exc: # pragma: no cover - dependency check
24 raise SystemExit(
25 "huggingface_hub is required. Install with `pip install huggingface_hub`."
26 ) from exc
27
28 return Path(
29 snapshot_download(
30 repo_id=repo_id,
31 repo_type="dataset",
32 revision=revision,
33 allow_patterns=[
34 "data/*.jsonl",
35 "reference_outputs/*.jsonl",
36 "evaluation/*.py",
37 "README.md",
38 "VERSION",
39 ],
40 )
41 )
42
43
44def _mirror(src: Path, dst: Path) -> None:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected