File size: 1,975 Bytes
974c6c5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Downloading files from `HaiwangYu/nugraph-wc-data-prep`

Two ways to fetch files from the Hugging Face dataset repo
[HaiwangYu/nugraph-wc-data-prep](https://huggingface.co/datasets/HaiwangYu/nugraph-wc-data-prep).

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

```bash
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:

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

## 2. With git (gets the whole repo)

```bash
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:

```bash
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

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