glennmatlin commited on
Commit
afa27e0
·
verified ·
1 Parent(s): 6346933

Add README written by hand after script's post-upload write_readme() crash

Browse files
Files changed (1) hide show
  1. README.md +56 -0
README.md ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # soc91-labels
2
+
3
+ Mirror of the R2 prefix `soc91-labels/` from `soc127-dedup` (Cloudflare R2) into a private
4
+ HF Dataset. Generated by `scripts/handoff/mirror_r2_sidecar_prefix.py` on
5
+ 2026-05-23.
6
+
7
+ Each row in the source R2 parquets is preserved, with one additional column appended:
8
+ `source_shard_path` — the R2 object key the row came from. This lets you reconstruct
9
+ the per-shard view if needed.
10
+
11
+ ## Counts
12
+
13
+ | | Source (R2) | Mirror (this dataset) |
14
+ |---|---|---|
15
+ | Files | 58,465 | 2,719 (concat into ~60 MB chunks) |
16
+ | Size | ~150 GB (approx, mixed schemas) | 169.94 GB |
17
+
18
+ ## Loading
19
+
20
+ ```python
21
+ from datasets import load_dataset
22
+ ds = load_dataset("HCAI-Lab/soc91-labels")
23
+ # or for a single chunk:
24
+ import pyarrow.parquet as pq
25
+ table = pq.read_table("data_00000.parquet")
26
+ ```
27
+
28
+ ## Schema
29
+
30
+ Schema matches the per-shard WebOrganizer sidecar parquet schema as defined in
31
+ `src/dolma/sidecar_manifest_fields.py:43-124` (data-attribution repo), plus the appended
32
+ `source_shard_path` column. The underlying classifier produced both an "old" schema
33
+ (label ids only) and a "new" schema (label ids plus per-label probability vectors);
34
+ the concatenated table promotes nullable columns so rows from both schemas coexist.
35
+
36
+ Per-row fields (subset; see source for the full list):
37
+
38
+ - `doc_id` — Dolma document UUID
39
+ - `weborganizer_topic_id`, `weborganizer_topic` — top-1 topic class (24 categories)
40
+ - `weborganizer_format_id`, `weborganizer_format` — top-1 format class (24 categories)
41
+ - `weborganizer_topic_confidence`, `weborganizer_format_confidence` — top-1 probabilities
42
+ - `weborganizer_topic_probabilities`, `weborganizer_format_probabilities` — full probability vectors (new-schema rows only; null on old-schema rows)
43
+ - `source_shard_path` — the R2 object key the row originated from
44
+
45
+ ## Lineage
46
+
47
+ - SOC-91 (initial label generation)
48
+ - SOC-142 (inverted-quality-label fix at commit `3342baf`; affects the quality sidecars in
49
+ `HCAI-Lab/soc139-quality-sidecars`, not the topic/format labels here)
50
+
51
+ ## Notes
52
+
53
+ - The chunked-write/stream-upload pipeline succeeded and committed all 2,719 chunks.
54
+ - The original `write_readme()` step crashed (after upload) because the staging directory
55
+ files were already deleted by the stream-upload pattern. This README was written by
56
+ hand after the fact based on the script's final log output (`wrote 2719 chunks total`).