Commit ·
73fd5f7
1
Parent(s): 22b3bec
Release v1.1: state_is_record column + card (source links, train-on-it, tables) (#3)
Browse files- Add release build of the cur-cand v1 training mix (608ffccb460a4747f37a8ced6b51b9fa16543c2b)
- Card: source links, state_is_record, train-on-it note, aligned tables (b1139d84ae7b82a5bbfd50d69c4ee75b6197699e)
- README.md +56 -47
- data/arxiv/train.parquet +2 -2
- data/base/train.parquet +2 -2
- data/decisionbank/train.parquet +2 -2
- data/harvard/train.parquet +2 -2
- data/nls/train.parquet +2 -2
- data/procpile/train.parquet +2 -2
- data/prompt/train.parquet +2 -2
- data/tool/train.parquet +2 -2
- data/web/train.parquet +2 -2
- scripts/release_build.py +9 -4
README.md
CHANGED
|
@@ -31,15 +31,15 @@ This card is also the data recipe: it says which sources were used, why, and whi
|
|
| 31 |
[github.com/davanstrien/curation-decision-recipe](https://github.com/davanstrien/curation-decision-recipe). If you
|
| 32 |
train decision models, please share how you made your data too so others can learn from your work and open models can keep improving!
|
| 33 |
|
| 34 |
-
|
|
| 35 |
-
|---|---|
|
| 36 |
-
| Rows
|
| 37 |
-
| Sources
|
| 38 |
-
| Row shapes
|
| 39 |
-
| Labels made by | dataset gold, library cataloguers, programs, and LLMs (named per source and per row)
|
| 40 |
-
| Licence
|
| 41 |
-
| Trains
|
| 42 |
-
| Build
|
| 43 |
|
| 44 |
```python
|
| 45 |
import json
|
|
@@ -57,36 +57,37 @@ q = json.loads(decisions[0]["question"]) # n
|
|
| 57 |
One config per source, plus `all`. `web` rows have an empty `state` by design (see Web text). Splitting by source keeps licence terms together, so a user can take only the parts
|
| 58 |
whose terms suit them.
|
| 59 |
|
| 60 |
-
| Config
|
| 61 |
-
|---|---:|---|
|
| 62 |
-
| `base`
|
| 63 |
-
| `decisionbank` |
|
| 64 |
-
| `prompt`
|
| 65 |
-
| `web`
|
| 66 |
-
| `nls`
|
| 67 |
-
| `tool`
|
| 68 |
-
| `harvard`
|
| 69 |
-
| `arxiv`
|
| 70 |
-
| `procpile`
|
| 71 |
|
| 72 |
`manifest/training_mix_manifest.parquet` lists all 535,730 rows of the training mix (including the 18,766 rows not
|
| 73 |
released here): row id, source, licence class, labeller and a SHA-256 hash of each row's text.
|
| 74 |
|
| 75 |
Columns (union of both shapes; unused fields are null):
|
| 76 |
|
| 77 |
-
| Column
|
| 78 |
-
|---|---|
|
| 79 |
-
| `id`
|
| 80 |
-
| `config`, `src`
|
| 81 |
-
| `row_type`
|
| 82 |
-
| `teacher`
|
| 83 |
-
| `licence_class`, `licence`
|
| 84 |
-
| `state`
|
| 85 |
-
| `
|
| 86 |
-
| `
|
| 87 |
-
| `
|
| 88 |
-
| `
|
| 89 |
-
| `
|
|
|
|
| 90 |
|
| 91 |
Example decision row (DecisionBank, shortened):
|
| 92 |
|
|
@@ -124,21 +125,27 @@ web = load_dataset("davanstrien/curation-decision-mix", "web", split="train").ma
|
|
| 124 |
|
| 125 |
Row indices assume the source datasets are unchanged since October 2026. The snippet loads each source dataset in full; it has not been tested end to end.
|
| 126 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
---
|
| 128 |
|
| 129 |
## Sources
|
| 130 |
|
| 131 |
-
| Source
|
| 132 |
-
|---|---:|---|---|---|
|
| 133 |
-
| base (tasksource +
|
| 134 |
-
| DecisionBank-260k
|
| 135 |
-
| prompt slice
|
| 136 |
-
| web slice (**ids and labels only**)
|
| 137 |
-
| National Library of Scotland catalogue
|
| 138 |
-
| tool lane (code decisions)
|
| 139 |
-
| Harvard modern catalogue
|
| 140 |
-
| arXiv
|
| 141 |
-
| procedural pile
|
| 142 |
|
| 143 |
---
|
| 144 |
|
|
@@ -158,7 +165,9 @@ the pool).
|
|
| 158 |
data neutral or harmful, gains staying inside the task families covered, and source audits worth more than extra rows.
|
| 159 |
Our own runs agreed: adding bulk without audits did not help; diverse, audited sources did (+4 points over the base
|
| 160 |
alone on a sample of a public decision benchmark suite). So every source was audited before training:
|
| 161 |
-
- **Text-blind baselines** on every source (majority label, longest option, options-only ranker)
|
|
|
|
|
|
|
| 162 |
source that looked like +4.5 turned out to be mostly a "longest option is right" shortcut (real gain ≈ +2.3), so
|
| 163 |
sources with option-only leaks were fixed or dropped.
|
| 164 |
- **Distractors weighted by gold frequency.** With uniformly sampled wrong options, a real-label source (arXiv)
|
|
@@ -168,8 +177,8 @@ alone on a sample of a public decision benchmark suite). So every source was aud
|
|
| 168 |
"LLM style means unsupported" and was dropped.
|
| 169 |
|
| 170 |
**3. Train on the labels real curation pipelines use.** The curation slices reuse public labels from curation work:
|
| 171 |
-
WebOrganizer topic and format (Wettig et al., 2025, *Organize the Web*), FineWeb-Edu educational value
|
| 172 |
-
al., 2024), and prompt tags from NuminaMath-1.5, DeepMath-103K, WebInstruct-verified and LMArena. Fixed-head
|
| 173 |
classifiers trained on the same labels were used as a ceiling check before any claim (they still win their own
|
| 174 |
labels: 0.87 / 0.83 vs 0.84 / 0.74 for WebOrganizer topic/format).
|
| 175 |
|
|
|
|
| 31 |
[github.com/davanstrien/curation-decision-recipe](https://github.com/davanstrien/curation-decision-recipe). If you
|
| 32 |
train decision models, please share how you made your data too so others can learn from your work and open models can keep improving!
|
| 33 |
|
| 34 |
+
| | |
|
| 35 |
+
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
| 36 |
+
| Rows | 516,964 released, from a 535,730-row training mix; 18,766 base rows without a verified open licence are left out (see Licences) |
|
| 37 |
+
| Sources | 9: public task collections, DecisionBank, curation labels from web/prompt datasets, library catalogues, program-computed tasks |
|
| 38 |
+
| Row shapes | decision rows `{state, question, target}` and GLiClass rows `{text, all_labels, true_labels, prompt}` |
|
| 39 |
+
| Labels made by | dataset gold, library cataloguers, programs, and LLMs (named per source and per row) |
|
| 40 |
+
| Licence | mixed, per row; web page text is **not** included (labels plus a pointer to the source row; rebuild snippet below) |
|
| 41 |
+
| Trains | [davanstrien/ultrabert-380m-curation](https://huggingface.co/davanstrien/ultrabert-380m-curation) (UltraBERT-380M + GLiClass head; 12,000 steps over this mix) |
|
| 42 |
+
| Build | mix builder on Hugging Face Jobs (CPU), then [`scripts/release_build.py`](scripts/release_build.py) for the release (a record of how this repo was made: it reads the mix from a private bucket); test sets fixed before the mix was built, and every row checked against them |
|
| 43 |
|
| 44 |
```python
|
| 45 |
import json
|
|
|
|
| 57 |
One config per source, plus `all`. `web` rows have an empty `state` by design (see Web text). Splitting by source keeps licence terms together, so a user can take only the parts
|
| 58 |
whose terms suit them.
|
| 59 |
|
| 60 |
+
| Config | Rows (training mix) | Shape |
|
| 61 |
+
| -------------- | ------------------------------------------------: | -------- |
|
| 62 |
+
| `base` | 173,859 (192,625 in training; licence filter) | GLiClass |
|
| 63 |
+
| `decisionbank` | 165,277 | decision |
|
| 64 |
+
| `prompt` | 52,491 | decision |
|
| 65 |
+
| `web` | 41,890 (labels only; `state` empty until rebuilt) | decision |
|
| 66 |
+
| `nls` | 23,846 | GLiClass |
|
| 67 |
+
| `tool` | 21,089 | GLiClass |
|
| 68 |
+
| `harvard` | 13,918 | decision |
|
| 69 |
+
| `arxiv` | 13,597 | GLiClass |
|
| 70 |
+
| `procpile` | 10,997 | GLiClass |
|
| 71 |
|
| 72 |
`manifest/training_mix_manifest.parquet` lists all 535,730 rows of the training mix (including the 18,766 rows not
|
| 73 |
released here): row id, source, licence class, labeller and a SHA-256 hash of each row's text.
|
| 74 |
|
| 75 |
Columns (union of both shapes; unused fields are null):
|
| 76 |
|
| 77 |
+
| Column | Meaning |
|
| 78 |
+
| --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| 79 |
+
| `id` | stable row id; prefix names the source (`db/…`, `procpile-…`, `knowledgator/gliclass-v2.0:…`) |
|
| 80 |
+
| `config`, `src` | source group and the finer origin (e.g. `db_bitext_support`, a tasksource task) |
|
| 81 |
+
| `row_type` | `decision` or `gliclass` |
|
| 82 |
+
| `teacher` | who made the label (e.g. `Llama-3.1-405B`, `cataloguer`, `program`, `50% source label + 50% Qwen3.8-27B`) |
|
| 83 |
+
| `licence_class`, `licence` | `permissive` / `sa` (share-alike, e.g. CC BY-SA, CDLA-Sharing) / `other_open` (MPL-2.0, AFL-3.0) / `publisher` (text not redistributed), and the licence id |
|
| 84 |
+
| `state` | the input (decision rows): a string, or a record as a JSON string |
|
| 85 |
+
| `state_is_record` | decision rows: true when `state` was a record (dict or list) in training; false when it was text (some text states look like JSON) |
|
| 86 |
+
| `question` | JSON string: `{type, instructions, criteria}`, `type` is `noul` or `choice`; `noul` = yes/no; `choice` options are `{key: description}`; graded scales use `level_<k>` keys, lowest first |
|
| 87 |
+
| `target` | JSON string: probability per option (soft targets allowed; sums to 1 for single-answer rows) |
|
| 88 |
+
| `text`, `all_labels`, `true_labels`, `prompt` | GLiClass rows: text, label list, `{label: score}` or a list (JSON string), optional prompt |
|
| 89 |
+
| `multi_label` | true when several options can be correct (per-option yes/no loss in training) |
|
| 90 |
+
| `source_dataset`, `source_row` | `web` rows only: source dataset and row index in its `train` split |
|
| 91 |
|
| 92 |
Example decision row (DecisionBank, shortened):
|
| 93 |
|
|
|
|
| 125 |
|
| 126 |
Row indices assume the source datasets are unchanged since October 2026. The snippet loads each source dataset in full; it has not been tested end to end.
|
| 127 |
|
| 128 |
+
**Train on it.** [`data/release_to_jsonl.py`](https://github.com/davanstrien/curation-decision-recipe/blob/main/data/release_to_jsonl.py)
|
| 129 |
+
in the recipe repo converts this dataset to the trainer's JSONL input (`uv run data/release_to_jsonl.py --out
|
| 130 |
+
mix.jsonl`; filter with `--configs` and `--licence-class`). We checked it against the private training mix: all
|
| 131 |
+
475,074 released rows with text are identical on every field the trainer reads. The recipe README has a tested
|
| 132 |
+
command that converts and trains on one GPU Job.
|
| 133 |
+
|
| 134 |
---
|
| 135 |
|
| 136 |
## Sources
|
| 137 |
|
| 138 |
+
| Source | Rows | What the rows ask | Labels made by | Licence |
|
| 139 |
+
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
| 140 |
+
| base ([tasksource](https://huggingface.co/datasets/tasksource/tasksource-jev-typed-decisions) + Knowledgator GLiClass data: [v2.0](https://huggingface.co/datasets/knowledgator/gliclass-v2.0), [v3-logic](https://huggingface.co/datasets/knowledgator/gliclass-v3-logic-dataset)) | 173,859 (192,625 trained on) | many public classification tasks | dataset gold; knowledgator gliclass-v2.0 / v3-logic (LLM-generated) | per source repo, in `licence`; only rows with a verified permissive, share-alike or other open licence are released (see Licences) |
|
| 141 |
+
| [DecisionBank-260k](https://huggingface.co/datasets/jgeuter/DecisionBank) | 165,277 | public tasks, written and programmatic decision questions | 50 % source label + 50 % Qwen3.8-27B; Qwen3.8-27B with thinking; 50 % Jeff 1.0 teachers (Qwen3.6-27B, Qwen3.5-122B-A10B) + 50 % Qwen3.8-27B (4,188 rows); code | per row: CC BY / CC BY-SA, Apache, MIT, CC0 (public domain), CDLA-Sharing-1.0; non-commercial, research-only, unknown and other terms dropped |
|
| 142 |
+
| prompt slice | 52,491 | [NuminaMath-1.5](https://huggingface.co/datasets/AI-MO/NuminaMath-1.5) question type / problem type / validity; [DeepMath-103K](https://huggingface.co/datasets/zwhe99/DeepMath-103K) difficulty / topic; [WebInstruct-verified](https://huggingface.co/datasets/TIGER-Lab/WebInstruct-verified) answer type / category / difficulty; [LMArena](https://huggingface.co/datasets/lmarena-ai/arena-human-preference-140k) criteria and tags | dataset columns (NuminaMath, WebInstruct: labeller not documented); GPT-4o (DeepMath); LMArena classifiers | Apache-2.0; MIT; Apache-2.0; CC-BY-4.0 |
|
| 143 |
+
| web slice (**ids and labels only**) | 41,890 | WebOrganizer [topic](https://huggingface.co/datasets/WebOrganizer/TopicAnnotations-Llama-3.1-405B-FP8) and [format](https://huggingface.co/datasets/WebOrganizer/FormatAnnotations-Llama-3.1-405B-FP8); [FineWeb-Edu](https://huggingface.co/datasets/HuggingFaceFW/fineweb-edu-llama3-annotations) educational value | Llama-3.1-405B (WebOrganizer; the annotation datasets state no licence); Llama-3-70B (FineWeb-Edu) | labels: none stated; ODC-By. Page text: publisher copyright, not included (rebuild snippet above) |
|
| 144 |
+
| [National Library of Scotland](https://data.nls.uk/) catalogue | 23,846 | subject areas of library records | National Library of Scotland cataloguers | CC0 |
|
| 145 |
+
| tool lane (code decisions) | 21,089 | linter findings (classification and yes/no) and complexity comparisons on functions from Python packages | program-computed (linter and complexity tools) | permissive package licences (MIT / BSD / Apache-2.0 / PSF); the package is not recorded per row |
|
| 146 |
+
| [Harvard Library](https://library.harvard.edu/open-metadata) modern catalogue | 13,918 | Library of Congress subject class, literary form, government publication | Harvard Library cataloguers (from their catalogue records) | CC0 |
|
| 147 |
+
| arXiv | 13,597 | arXiv subject category | author-chosen categories | arXiv metadata (CC0) |
|
| 148 |
+
| [procedural pile](https://huggingface.co/datasets/reasoning-core/procedural-pile) | 10,997 | program-checkable reasoning | program-computed | CC BY 4.0 (attribute) |
|
| 149 |
|
| 150 |
---
|
| 151 |
|
|
|
|
| 165 |
data neutral or harmful, gains staying inside the task families covered, and source audits worth more than extra rows.
|
| 166 |
Our own runs agreed: adding bulk without audits did not help; diverse, audited sources did (+4 points over the base
|
| 167 |
alone on a sample of a public decision benchmark suite). So every source was audited before training:
|
| 168 |
+
- **Text-blind baselines** on every source (majority label, longest option, options-only ranker), in the spirit of
|
| 169 |
+
hypothesis-only baselines for NLI ([Poliak et al., 2018](https://arxiv.org/abs/1805.01042);
|
| 170 |
+
[Gururangan et al., 2018](https://arxiv.org/abs/1803.02324)). A generated-schema
|
| 171 |
source that looked like +4.5 turned out to be mostly a "longest option is right" shortcut (real gain ≈ +2.3), so
|
| 172 |
sources with option-only leaks were fixed or dropped.
|
| 173 |
- **Distractors weighted by gold frequency.** With uniformly sampled wrong options, a real-label source (arXiv)
|
|
|
|
| 177 |
"LLM style means unsupported" and was dropped.
|
| 178 |
|
| 179 |
**3. Train on the labels real curation pipelines use.** The curation slices reuse public labels from curation work:
|
| 180 |
+
WebOrganizer topic and format ([Wettig et al., 2025](https://arxiv.org/abs/2502.10341), *Organize the Web*), FineWeb-Edu educational value
|
| 181 |
+
([Penedo et al., 2024](https://arxiv.org/abs/2406.17557)), and prompt tags from NuminaMath-1.5, DeepMath-103K, WebInstruct-verified and LMArena. Fixed-head
|
| 182 |
classifiers trained on the same labels were used as a ceiling check before any claim (they still win their own
|
| 183 |
labels: 0.87 / 0.83 vs 0.84 / 0.74 for WebOrganizer topic/format).
|
| 184 |
|
data/arxiv/train.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fbb17581d72f7295511de50d192317f7cd63d1926333f11bc45b678d9ff73e68
|
| 3 |
+
size 9001356
|
data/base/train.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a1ae41aa5a7d7a112efa046319cd3ddd494a36e38cae8ef61b14b5f6b7387cee
|
| 3 |
+
size 65392423
|
data/decisionbank/train.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:06ee0fb76f4b953096fa1d906027a858b524b2f8fdaa28773295be000c9bcf47
|
| 3 |
+
size 104809833
|
data/harvard/train.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:85ecc3418657003374e64a1400571e7d876aec4c2887357a04edd7a140a321d1
|
| 3 |
+
size 5310800
|
data/nls/train.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c33e8b423ccbbe8ad8ffd1bf10662e8c81751cbf1afe3dbd5bf9dabe04dee8fc
|
| 3 |
+
size 3510333
|
data/procpile/train.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9e004a40ee2a1686f95c1f5fa979838a61cf938bf77d73ad02eba47b8706a8ba
|
| 3 |
+
size 1936829
|
data/prompt/train.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c1cdf0dda2ba11679a3977040cfa5045a5252f79d831453c25d0a0d323317d85
|
| 3 |
+
size 5550880
|
data/tool/train.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:42b8945c86124f6d8f0c285958432a3ca878bb60d9b13441b6242e7883e01d25
|
| 3 |
+
size 4801324
|
data/web/train.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:726b8f05bcce449002fcf113cde2aa1d572dd9ec14cfcf385d16a4d9bcaafd57
|
| 3 |
+
size 685144
|
scripts/release_build.py
CHANGED
|
@@ -9,7 +9,8 @@ One parquet per config (source group), under data/<config>/. Release rules:
|
|
| 9 |
(analysis/release/base_licence_map.json); drop GPL, unresolved and no-licence rows. Fill `licence` per row.
|
| 10 |
- web: page text is not redistributed; `state` is set to "" and `source_dataset` / `source_row` point at the
|
| 11 |
source row (train split) so the text can be rebuilt.
|
| 12 |
-
- nested fields (state when it is a record, question, target, true_labels) are stored as JSON strings
|
|
|
|
| 13 |
usage (CPU Job, dm-curation mounted at /c): python release_build.py --repo davanstrien/<name> [--dry-run]
|
| 14 |
"""
|
| 15 |
|
|
@@ -40,7 +41,7 @@ BASE_CLASS = {"permissive": "permissive", "sa": "sa", "other_open": "other_open"
|
|
| 40 |
WEB_SOURCE = {"cur-wo-topic-": "WebOrganizer/TopicAnnotations-Llama-3.1-405B-FP8",
|
| 41 |
"cur-wo-format-": "WebOrganizer/FormatAnnotations-Llama-3.1-405B-FP8",
|
| 42 |
"cur-fwe-": "HuggingFaceFW/fineweb-edu-llama3-annotations"}
|
| 43 |
-
COLUMNS = ["id", "config", "src", "row_type", "teacher", "licence_class", "licence", "state", "question", "target",
|
| 44 |
"text", "all_labels", "true_labels", "prompt", "multi_label", "source_dataset", "source_row"]
|
| 45 |
|
| 46 |
|
|
@@ -52,6 +53,7 @@ def main():
|
|
| 52 |
ap = argparse.ArgumentParser()
|
| 53 |
ap.add_argument("--repo", required=True)
|
| 54 |
ap.add_argument("--dry-run", action="store_true")
|
|
|
|
| 55 |
args = ap.parse_args()
|
| 56 |
|
| 57 |
licmap = json.loads(LICMAP.read_text())
|
|
@@ -96,6 +98,7 @@ def main():
|
|
| 96 |
"id": r["id"], "config": config, "src": r.get("src"), "row_type": row_type,
|
| 97 |
"teacher": r.get("teacher"), "licence_class": licence_class, "licence": licence,
|
| 98 |
"state": state if state is None or isinstance(state, str) else as_json(state),
|
|
|
|
| 99 |
"question": as_json(r.get("question")), "target": as_json(r.get("target")),
|
| 100 |
"text": r.get("text"), "all_labels": r.get("all_labels"),
|
| 101 |
"true_labels": as_json(r.get("true_labels")), "prompt": r.get("prompt"),
|
|
@@ -114,6 +117,7 @@ def main():
|
|
| 114 |
schema = {c: pl.Utf8 for c in COLUMNS}
|
| 115 |
schema["all_labels"] = pl.List(pl.Utf8)
|
| 116 |
schema["multi_label"] = pl.Boolean
|
|
|
|
| 117 |
schema["source_row"] = pl.Int64
|
| 118 |
print(json.dumps(dict(sorted(stats.items())), indent=1))
|
| 119 |
print("dropped keys (not released):", dict(extra_keys))
|
|
@@ -134,8 +138,9 @@ def main():
|
|
| 134 |
pl.DataFrame(rs, schema=schema).write_parquet(p / "train.parquet")
|
| 135 |
(Path(d) / "release_stats.json").write_text(json.dumps(dict(sorted(stats.items())), indent=1))
|
| 136 |
api.upload_folder(repo_id=args.repo, repo_type="dataset", folder_path=d,
|
| 137 |
-
commit_message="Add release build of the cur-cand v1 training mix"
|
| 138 |
-
|
|
|
|
| 139 |
|
| 140 |
|
| 141 |
if __name__ == "__main__":
|
|
|
|
| 9 |
(analysis/release/base_licence_map.json); drop GPL, unresolved and no-licence rows. Fill `licence` per row.
|
| 10 |
- web: page text is not redistributed; `state` is set to "" and `source_dataset` / `source_row` point at the
|
| 11 |
source row (train split) so the text can be rebuilt.
|
| 12 |
+
- nested fields (state when it is a record, question, target, true_labels) are stored as JSON strings;
|
| 13 |
+
`state_is_record` says whether a decision row's state was a record (dict or list) or text.
|
| 14 |
usage (CPU Job, dm-curation mounted at /c): python release_build.py --repo davanstrien/<name> [--dry-run]
|
| 15 |
"""
|
| 16 |
|
|
|
|
| 41 |
WEB_SOURCE = {"cur-wo-topic-": "WebOrganizer/TopicAnnotations-Llama-3.1-405B-FP8",
|
| 42 |
"cur-wo-format-": "WebOrganizer/FormatAnnotations-Llama-3.1-405B-FP8",
|
| 43 |
"cur-fwe-": "HuggingFaceFW/fineweb-edu-llama3-annotations"}
|
| 44 |
+
COLUMNS = ["id", "config", "src", "row_type", "teacher", "licence_class", "licence", "state", "state_is_record", "question", "target",
|
| 45 |
"text", "all_labels", "true_labels", "prompt", "multi_label", "source_dataset", "source_row"]
|
| 46 |
|
| 47 |
|
|
|
|
| 53 |
ap = argparse.ArgumentParser()
|
| 54 |
ap.add_argument("--repo", required=True)
|
| 55 |
ap.add_argument("--dry-run", action="store_true")
|
| 56 |
+
ap.add_argument("--create-pr", action="store_true", help="upload as a pull request to the dataset repo")
|
| 57 |
args = ap.parse_args()
|
| 58 |
|
| 59 |
licmap = json.loads(LICMAP.read_text())
|
|
|
|
| 98 |
"id": r["id"], "config": config, "src": r.get("src"), "row_type": row_type,
|
| 99 |
"teacher": r.get("teacher"), "licence_class": licence_class, "licence": licence,
|
| 100 |
"state": state if state is None or isinstance(state, str) else as_json(state),
|
| 101 |
+
"state_is_record": isinstance(state, (dict, list)) if row_type == "decision" else None,
|
| 102 |
"question": as_json(r.get("question")), "target": as_json(r.get("target")),
|
| 103 |
"text": r.get("text"), "all_labels": r.get("all_labels"),
|
| 104 |
"true_labels": as_json(r.get("true_labels")), "prompt": r.get("prompt"),
|
|
|
|
| 117 |
schema = {c: pl.Utf8 for c in COLUMNS}
|
| 118 |
schema["all_labels"] = pl.List(pl.Utf8)
|
| 119 |
schema["multi_label"] = pl.Boolean
|
| 120 |
+
schema["state_is_record"] = pl.Boolean
|
| 121 |
schema["source_row"] = pl.Int64
|
| 122 |
print(json.dumps(dict(sorted(stats.items())), indent=1))
|
| 123 |
print("dropped keys (not released):", dict(extra_keys))
|
|
|
|
| 138 |
pl.DataFrame(rs, schema=schema).write_parquet(p / "train.parquet")
|
| 139 |
(Path(d) / "release_stats.json").write_text(json.dumps(dict(sorted(stats.items())), indent=1))
|
| 140 |
api.upload_folder(repo_id=args.repo, repo_type="dataset", folder_path=d,
|
| 141 |
+
commit_message="Add release build of the cur-cand v1 training mix",
|
| 142 |
+
create_pr=args.create_pr)
|
| 143 |
+
print("uploaded", args.repo)
|
| 144 |
|
| 145 |
|
| 146 |
if __name__ == "__main__":
|