Implementation:Microsoft LoRA DART Dev Dataset
| Knowledge Sources | |
|---|---|
| Domains | NLG, Data_to_Text, Benchmarking |
| Last Updated | 2026-02-10 06:00 GMT |
Overview
Development split of the DART (Data-Record to Text) benchmark dataset, containing structured tripleset-to-text examples for evaluating data-to-text generation models.
Description
The DART development set provides 98,152 lines of JSON data containing structured tripleset records paired with human-written text annotations. Each example consists of a set of subject-relation-object triples (derived from sources such as WikiSQL and WikiTableQuestions) along with one or more natural language descriptions. The triples use uppercase relation names (e.g., JOINED, LOCATION, NICKNAME) and may include special context markers like [TABLECONTEXT] and [TITLE]. A boolean field subtree_was_extended indicates whether the original data subtree was augmented during dataset construction. This dataset is used during LoRA GPT-2 fine-tuning for model selection and hyperparameter tuning.
Usage
Use this dataset as the validation split when fine-tuning GPT-2 with LoRA for data-to-text generation tasks. The format_converting_dart.py script converts this JSON file into a line-delimited format with context/completion pairs suitable for GPT-2 encoding. Load during training to monitor model performance, select the best checkpoint, and tune hyperparameters without overfitting to the training data.
Code Reference
Source Location
- Repository: Microsoft_LoRA
- File: examples/NLG/data/dart/dart-v1.1.1-full-dev.json
- Converter: examples/NLG/src/format_converting_dart.py
Data Schema
[
{
"tripleset": [
["Mars Hill College", "JOINED", "1973"],
["Mars Hill College", "LOCATION", "Mars Hill, North Carolina"]
],
"subtree_was_extended": true,
"annotations": [
{
"source": "WikiSQL_decl_sents",
"text": "A school from Mars Hill, North Carolina, joined in 1973."
}
]
}
]
Format Conversion
The format_converting_dart.py script transforms each example into a context/completion pair by joining triples with " | " separators and using " : " between subject, relation, and object:
# Conversion produces lines like:
# {"context": "Mars Hill College : joined : 1973 | Mars Hill College : location : Mars Hill, North Carolina",
# "completion": "A school from Mars Hill, North Carolina, joined in 1973."}
Loading
import json
with open("examples/NLG/data/dart/dart-v1.1.1-full-dev.json", "r") as f:
data = json.load(f)
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| file_path | str | Yes | Path to the JSON file (e.g., examples/NLG/data/dart/dart-v1.1.1-full-dev.json)
|
Outputs
| Name | Type | Description |
|---|---|---|
| data | List[Dict] | Top-level JSON array of examples, each containing tripleset, subtree_was_extended, and annotations |
| tripleset | List[List[str]] | List of subject-relation-object triples, each a 3-element string list |
| subtree_was_extended | bool | Whether the data subtree was augmented during dataset construction |
| annotations | List[Dict] | Human-written text descriptions with source attribution (keys: source, text)
|
Usage Examples
Loading and Inspecting DART Dev Data
import json
# Load the development set
with open("examples/NLG/data/dart/dart-v1.1.1-full-dev.json", "r") as f:
dev_data = json.load(f)
# Inspect first example
example = dev_data[0]
print(f"Triples: {example['tripleset']}")
print(f"Extended: {example['subtree_was_extended']}")
print(f"Source: {example['annotations'][0]['source']}")
print(f"Text: {example['annotations'][0]['text']}")
print(f"Total examples: {len(dev_data)}")
Running Format Conversion for GPT-2
python examples/NLG/src/format_converting_dart.py \
examples/NLG/data/dart/dart-v1.1.1-full-dev.json \
examples/NLG/data/dart/dart-v1.1.1-full-dev.jsonl