HaiwangYu's picture
Upload README.md with huggingface_hub
974c6c5 verified
|
Raw
History Blame Contribute Delete
1.98 kB

Downloading files from HaiwangYu/nugraph-wc-data-prep

Two ways to fetch files from the Hugging Face dataset repo HaiwangYu/nugraph-wc-data-prep.

1. With hf (recommended — downloads just one file)

hf download HaiwangYu/nugraph-wc-data-prep \
  nc-sideband-lynn-Aug07/converted_data_NCSideband_exact_19events_geom_edges_inference.h5 \
  --repo-type dataset --local-dir .
  • Places the file at ./nc-sideband-lynn-Aug07/converted_data_....h5.
  • Without --local-dir, the file lands in the HF cache (~/.cache/huggingface/hub/) and the path is printed — fine for scripts, less convenient for humans.
  • Anonymous download works if the repo is public; otherwise the saved token (hf auth login) is used.

Install the CLI if missing:

pip3 install --user 'huggingface_hub[cli]'   # installs ~/.local/bin/hf

2. With git (gets the whole repo)

git clone https://huggingface.co/datasets/HaiwangYu/nugraph-wc-data-prep

HF stores large files with git-lfs, so git-lfs must be installed for the H5 content to materialize — without it you get a small pointer file instead of the real ~163 MB file.

If a machine lacks git-lfs, grab the real content afterwards with hf download (above) or plain HTTPS:

wget https://huggingface.co/datasets/HaiwangYu/nugraph-wc-data-prep/resolve/main/nc-sideband-lynn-Aug07/converted_data_NCSideband_exact_19events_geom_edges_inference.h5

/resolve/main/... is the direct-download URL; /blob/main/... is the web page.

Note for existing clones

In an existing clone, git pull syncs the file list. On machines without git-lfs on PATH (e.g. the Sophia login nodes), pull only brings LFS pointer files — fetch the actual content with one of the methods above.

Appendix: uploading

hf upload HaiwangYu/nugraph-wc-data-prep <local-file> <path-in-repo> --repo-type dataset