The dataset viewer is not available for this split.
Error code: FeaturesError
Exception: ArrowTypeError
Message: ("Expected bytes, got a 'list' object", 'Conversion failed for column 0 with type object')
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 291, in _generate_tables
pa_table = paj.read_json(
io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size)
)
File "pyarrow/_json.pyx", line 364, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 155, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 92, in pyarrow.lib.check_status
raise convert_status(status)
pyarrow.lib.ArrowInvalid: JSON parse error: Missing a name for object member. in row 0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/split/first_rows.py", line 244, in compute_first_rows_from_streaming_response
iterable_dataset = iterable_dataset._resolve_features()
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 4645, in _resolve_features
features = _infer_features_from_batch(self.with_format(None)._head())
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2866, in _head
return next(iter(self.iter(batch_size=n)))
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 3073, in iter
for key, pa_table in ex_iterable.iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2581, in _iter_arrow
yield from self.ex_iterable._iter_arrow()
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 558, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 440, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 349, in _generate_tables
pa_table = pa.Table.from_pandas(df, preserve_index=False)
File "pyarrow/table.pxi", line 4768, in pyarrow.lib.Table.from_pandas
File "/usr/local/lib/python3.14/site-packages/pyarrow/pandas_compat.py", line 651, in dataframe_to_arrays
arrays = [convert_column(c, f)
~~~~~~~~~~~~~~^^^^^^
File "/usr/local/lib/python3.14/site-packages/pyarrow/pandas_compat.py", line 639, in convert_column
raise e
File "/usr/local/lib/python3.14/site-packages/pyarrow/pandas_compat.py", line 633, in convert_column
result = pa.array(col, type=type_, from_pandas=True, safe=safe)
File "pyarrow/array.pxi", line 390, in pyarrow.lib.array
File "pyarrow/array.pxi", line 91, in pyarrow.lib._ndarray_to_array
check_status(NdarrayToArrow(pool, values, mask, from_pandas,
File "pyarrow/error.pxi", line 92, in pyarrow.lib.check_status
pyarrow.lib.ArrowTypeError: ("Expected bytes, got a 'list' object", 'Conversion failed for column 0 with type object')Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
RNGen data
This dataset provides the Key, Mixed, and RNA annotations and the processed score CSVs used for RNGen, a model for Roman numeral analysis. The source scores and harmonic analyses come from ten DCML corpora; the preprocessing builds on RNBERT.
Files
| Directory | Contents |
|---|---|
key/ |
train.json, valid.json, and test.json for local-key prediction |
mixed/ |
The three JSON splits for the six-task intermediate training stage |
rna/ |
The three JSON splits for Roman numeral analysis |
processed_scores/ |
447 unaugmented score CSVs, their per-score JSON metadata, and ten corpus-level attrs.json files |
preprocessing/ |
Sequence/segmentation and Octuple encoding settings |
Use the released JSONs directly for training and evaluation with the RNGen code. The processed CSVs support inspection and data preparation. Keep the metadata JSONs with the CSVs.
The paper's score-level manifests select 355 training, 44 validation, and
47 test scores. Training augmentation covers 12 target keys per training
score. The manifests define split membership rather than the directory
contents alone. Phrase segmentation uses max_num_notes: 500 and adds one
context bar on each side where available. Splits occur at bar boundaries;
context notes and individual oversized bars can make the input exceed 500 notes.
See processing details for
the full augmentation description and modifications
for the changes from the upstream corpora.
Download and use
Install the RNGen environment and activate it. From the root of the RNGen code checkout, download the data:
huggingface-cli download Hurwitz/RNGen-data --repo-type dataset \
--local-dir datasets/releases/rngen
For fixed release revisions, use the code repository's
download instructions.
If authentication is
required, first run huggingface-cli login with an account that has access.
The corresponding model collection is
RNGen-checkpoints:
huggingface-cli download Hurwitz/RNGen-checkpoints \
--local-dir ckpts/releases
The standard code examples use datasets/releases/rngen/ and
ckpts/releases/ inside the code checkout. A different data location works
when passed explicitly as jsonl_dir during training or --json-path during
evaluation. Baseline converters default to the standard
datasets/releases/rngen/processed_scores/ directory.
Training and evaluation with the released JSONs do not read the source CSVs, their metadata sidecars, or the source paths recorded inside the JSONs. There is no need to regenerate inputs, transpose them again, or run the CSV preprocessing submodules for this route. Keep the CSV metadata files when using the separate data-preparation route.
Annotation format and split sizes
These are ordinary .json files containing RNGen-specific dictionaries,
rather than JSON Lines or one flat list of records. Load them with Python's
json module or RNGen's RNGenSFTDataset.
| Stage | Train examples | Validation examples | Test examples | Training configuration | Task |
|---|---|---|---|---|---|
| Key | 53,928 | 510 | 621 | configs/rngen/key.yaml |
key_sft |
| Mixed | 323,568 | 3,060 | 3,726 | configs/rngen/curriculum_stage2.yaml |
rna_curriculum_stage2_sft |
| RNA | 53,928 | 510 | 621 | configs/rngen/rna.yaml |
rna_sft |
Each file includes a template entry with the task's prompt formatting.
Examples use consecutive string keys, starting at "0":
- Key and RNA: examples contain
events,spelling,note_count,instruction,output, andmetadata.eventsis the prepared sequence of music event tokens.instructionidentifies the target bars; the surrounding context is input only. Key outputs are text describing local-key regions. RNA outputs group harmony descriptions, chord tones, and chord-tone factors by key, andrna_infoprovides structured harmony information. - Mixed: each example has
seq_id,task_name,instruction,reference_input,output, andmetadata. Its music input is stored once in the top-levelseq_datadictionary and retrieved withseq_id. Templates for the six tasks are stored intemplate["tasks"]. - Metadata: source file paths and row identifiers record provenance;
they are not paths that need to exist on the user's machine.
last_target_barrecords the final target bar. Mixed examples retain source metadata inmetadata["source_metadata"].
Mixed supplies six examples per RNA segment, one for each task:
harmony_span_prediction, chord_tone_inventory_prediction,
tone_factor_pair_prediction, quality_prediction,
inversion_figure_prediction, and ps_function_prediction.
Thus its larger example counts do not represent additional independent scores.
Inspect a prepared RNA example without loading model weights:
import json
from pathlib import Path
path = Path("datasets/releases/rngen/rna/test.json")
with path.open() as f:
annotations = json.load(f)
example_count = sum(key.isdecimal() for key in annotations)
print(example_count) # 621
print(annotations["0"]["instruction"])
print(annotations["0"]["output"])
The released event sequences preserve the inputs associated with the checkpoints. Use them directly for reproducing results. The current converters support seven accidental tokens; regenerating annotations can change inputs containing triple accidentals. See the data-preparation guide before preparing new annotations.
Training and evaluation examples
Run from the code checkout with the RNGen environment active. To train Key from the supplied domain-fine-tuned RNBERT and Qwen:
python -m rngen.sft_ft --config configs/rngen/key.yaml \
llm_model_name=Qwen/Qwen2.5-7B-Instruct \
rnbert_checkpoint_path="$PWD/ckpts/releases/rnbert/unconditioned_checkpoint_best.pt" \
jsonl_dir="$PWD/datasets/releases/rngen/key" \
output_dir="$PWD/outputs/training/7B-Key" \
report_to=none wandb_project=null
jsonl_dir is the stage directory despite the parameter's historical name;
the entrypoint trains with train.json, validates with valid.json, and
evaluates test.json after training. Use the matching Mixed and
RNA configurations for later stages, setting finetuned_rngen_checkpoint to
the best checkpoint from the previous stage and jsonl_dir to mixed/ or
rna/. The full training guide
shows the complete sequence and best-checkpoint selection. Use
Qwen/Qwen2.5-14B-Instruct throughout the chain for 14B. The recipes use an
effective batch size of 4 and require a suitable GPU platform.
To evaluate the released 7B-RNA checkpoint on the prepared RNA test split:
python -m rngen.sft_eval --config configs/rngen/evaluation.yaml \
--model-path "$PWD/ckpts/releases/rngen/RNGen-7B-RNA" \
--task rna_sft \
--json-path "$PWD/datasets/releases/rngen/rna/test.json" \
--output-dir "$PWD/outputs/evaluation/RNGen-7B-RNA"
Training accepts key=value overrides; evaluation accepts --flag value.
Evaluation of all six released checkpoints, including the correct Key and
Mixed task settings, is documented in the
model card.
Key and RNA evaluation print metrics and save prediction snapshots; Mixed
evaluation reports the six task losses rather than full-RNA accuracy.
Processed scores and preprocessing settings
processed_scores/ contains unaugmented, note-level CSVs, not the segmented
sequence CSVs consumed by the annotation builders. Its 447 scores include
one score outside the 446 selected by the paper's split manifests. Select
scores using
data_splits/p_dcml/,
which defines the 355/44/47 score split.
Keep each same-stem score JSON and each corpus's attrs.json beside its CSV.
They record key, transposition, and corpus properties used by preprocessing.
preprocessing/sequence_settings.json records sequence/segmentation settings;
preprocessing/octuple_encoding_settings.json records encoding settings.
Training transposition is performed before sequence encoding and segmentation;
validation and test scores stay untransposed. The release contains the original
processed scores and the prepared JSONs; augmented and intermediate CSVs are
not included. See processing details.
License and source credits
The data and annotations are distributed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0). The complete terms are in LICENSE.
Sharing and adaptation are permitted for noncommercial purposes subject to the license's attribution and ShareAlike conditions. Retain the original creator credits, source links, license notices, and descriptions of changes when redistributing this release or adaptations.
ATTRIBUTION.md lists all ten source corpora, their credited creators and archival identifiers, the applicable source licenses, the RNBERT preprocessing contribution, and the RNGen modifications. The MIT license of the RNGen source-code repository does not replace the data terms.
Citation
If you use this dataset in research, please cite the RNGen paper and the applicable upstream corpus and preprocessing reports in ATTRIBUTION.md. Machine-readable metadata is provided in CITATION.cff.
@inproceedings{gao2026rngen,
author = {Gao, Hewei and Beyer, Tim and Wang, Xiaoxuan and Rohrmeier, Martin},
title = {{RNGen}: A Large Language Model Approach to Roman Numeral Analysis Toward Explainable Harmonic Analysis},
booktitle = {Proceedings of the 27th International Society for Music Information Retrieval Conference},
year = {2026},
url = {https://ismir2026program.ismir.net/poster_405.html}
}
- Downloads last month
- 13