README: Hub batch normalize script usage
Browse files
README.md
CHANGED
|
@@ -375,7 +375,18 @@ To **batch-fix** existing `data/*.jsonl` files locally (same key names as `Datas
|
|
| 375 |
python3 scripts/hf_np_solutions_normalize_jsonl.py --in data/data_1775801281.jsonl --out data/data_1775801281.norm.jsonl
|
| 376 |
```
|
| 377 |
|
| 378 |
-
Then replace the originals on the Hub (e.g. `hf upload` or Hub API commits). For thousands of files, run in a loop or job runner and commit in batches. If you change `DatasetRecord`, update `RECORD_KEYS` in `scripts/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 379 |
|
| 380 |
## Dataset Statistics
|
| 381 |
|
|
|
|
| 375 |
python3 scripts/hf_np_solutions_normalize_jsonl.py --in data/data_1775801281.jsonl --out data/data_1775801281.norm.jsonl
|
| 376 |
```
|
| 377 |
|
| 378 |
+
Then replace the originals on the Hub (e.g. `hf upload` or Hub API commits). For thousands of files, run in a loop or job runner and commit in batches. If you change `DatasetRecord`, update `RECORD_KEYS` in `scripts/hf_np_solutions_jsonl_common.py` to match.
|
| 379 |
+
|
| 380 |
+
**Automated Hub pass** (download → normalize → upload one commit per file; needs `pip install huggingface_hub` and a write token):
|
| 381 |
+
|
| 382 |
+
```bash
|
| 383 |
+
export HF_TOKEN=hf_...
|
| 384 |
+
python3 scripts/hf_np_solutions_batch_normalize_hub.py --dry-run
|
| 385 |
+
python3 scripts/hf_np_solutions_batch_normalize_hub.py --limit 5
|
| 386 |
+
python3 scripts/hf_np_solutions_batch_normalize_hub.py --sleep 1.0
|
| 387 |
+
```
|
| 388 |
+
|
| 389 |
+
Use `--start-after data/data_<timestamp>.jsonl` to resume. Full runs create thousands of commits; prefer a VM, tune `--sleep`, or fork the script to batch multiple files per `create_commit` if you hit rate limits.
|
| 390 |
|
| 391 |
## Dataset Statistics
|
| 392 |
|