Update README.md
Browse files
README.md
CHANGED
|
@@ -22,10 +22,7 @@ dataset_info:
|
|
| 22 |
dtype: string
|
| 23 |
splits:
|
| 24 |
- name: train
|
| 25 |
-
num_bytes: 25664270.827623513
|
| 26 |
num_examples: 507
|
| 27 |
-
download_size: 6383845
|
| 28 |
-
dataset_size: 25664270.827623513
|
| 29 |
- config_name: C
|
| 30 |
features:
|
| 31 |
- name: commit
|
|
@@ -48,11 +45,8 @@ dataset_info:
|
|
| 48 |
dtype: string
|
| 49 |
splits:
|
| 50 |
- name: train
|
| 51 |
-
num_bytes: 13034110929.154518
|
| 52 |
num_examples: 172736
|
| 53 |
-
|
| 54 |
-
dataset_size: 13034110929.154518
|
| 55 |
-
- config_name: C#
|
| 56 |
features:
|
| 57 |
- name: commit
|
| 58 |
dtype: string
|
|
@@ -74,11 +68,8 @@ dataset_info:
|
|
| 74 |
dtype: string
|
| 75 |
splits:
|
| 76 |
- name: train
|
| 77 |
-
num_bytes: 5397646765.3076105
|
| 78 |
num_examples: 138000
|
| 79 |
-
|
| 80 |
-
dataset_size: 5397646765.3076105
|
| 81 |
-
- config_name: C++
|
| 82 |
features:
|
| 83 |
- name: commit
|
| 84 |
dtype: string
|
|
@@ -100,10 +91,7 @@ dataset_info:
|
|
| 100 |
dtype: string
|
| 101 |
splits:
|
| 102 |
- name: train
|
| 103 |
-
num_bytes: 23547757257
|
| 104 |
num_examples: 194218
|
| 105 |
-
download_size: 7569744858
|
| 106 |
-
dataset_size: 23547757257
|
| 107 |
- config_name: Dart
|
| 108 |
features:
|
| 109 |
- name: commit
|
|
@@ -126,10 +114,7 @@ dataset_info:
|
|
| 126 |
dtype: string
|
| 127 |
splits:
|
| 128 |
- name: train
|
| 129 |
-
num_bytes: 397294625.4988167
|
| 130 |
num_examples: 8890
|
| 131 |
-
download_size: 154161531
|
| 132 |
-
dataset_size: 397294625.4988167
|
| 133 |
- config_name: Erlang
|
| 134 |
features:
|
| 135 |
- name: commit
|
|
@@ -152,10 +137,7 @@ dataset_info:
|
|
| 152 |
dtype: string
|
| 153 |
splits:
|
| 154 |
- name: train
|
| 155 |
-
num_bytes: 889166050
|
| 156 |
num_examples: 15623
|
| 157 |
-
download_size: 262956120
|
| 158 |
-
dataset_size: 889166050
|
| 159 |
- config_name: Go
|
| 160 |
features:
|
| 161 |
- name: commit
|
|
@@ -178,10 +160,7 @@ dataset_info:
|
|
| 178 |
dtype: string
|
| 179 |
splits:
|
| 180 |
- name: train
|
| 181 |
-
num_bytes: 13724186600.079618
|
| 182 |
num_examples: 189131
|
| 183 |
-
download_size: 7560506015
|
| 184 |
-
dataset_size: 13724186600.079618
|
| 185 |
- config_name: Groovy
|
| 186 |
features:
|
| 187 |
- name: commit
|
|
@@ -204,10 +183,7 @@ dataset_info:
|
|
| 204 |
dtype: string
|
| 205 |
splits:
|
| 206 |
- name: train
|
| 207 |
-
num_bytes: 569309862
|
| 208 |
num_examples: 16723
|
| 209 |
-
download_size: 156155250
|
| 210 |
-
dataset_size: 569309862
|
| 211 |
- config_name: Haskell
|
| 212 |
features:
|
| 213 |
- name: commit
|
|
@@ -230,10 +206,7 @@ dataset_info:
|
|
| 230 |
dtype: string
|
| 231 |
splits:
|
| 232 |
- name: train
|
| 233 |
-
num_bytes: 584392586
|
| 234 |
num_examples: 13851
|
| 235 |
-
download_size: 208126412
|
| 236 |
-
dataset_size: 584392586
|
| 237 |
- config_name: Java
|
| 238 |
features:
|
| 239 |
- name: commit
|
|
@@ -256,10 +229,7 @@ dataset_info:
|
|
| 256 |
dtype: string
|
| 257 |
splits:
|
| 258 |
- name: train
|
| 259 |
-
num_bytes: 15135951136.42295
|
| 260 |
num_examples: 402369
|
| 261 |
-
download_size: 5020550095
|
| 262 |
-
dataset_size: 15135951136.42295
|
| 263 |
- config_name: JavaScript
|
| 264 |
features:
|
| 265 |
- name: commit
|
|
@@ -282,10 +252,7 @@ dataset_info:
|
|
| 282 |
dtype: string
|
| 283 |
splits:
|
| 284 |
- name: train
|
| 285 |
-
num_bytes: 36390392763.94772
|
| 286 |
num_examples: 694051
|
| 287 |
-
download_size: 12357643118
|
| 288 |
-
dataset_size: 36390392763.94772
|
| 289 |
- config_name: Julia
|
| 290 |
features:
|
| 291 |
- name: commit
|
|
@@ -308,10 +275,7 @@ dataset_info:
|
|
| 308 |
dtype: string
|
| 309 |
splits:
|
| 310 |
- name: train
|
| 311 |
-
num_bytes: 99752915.85875197
|
| 312 |
num_examples: 2662
|
| 313 |
-
download_size: 35164706
|
| 314 |
-
dataset_size: 99752915.85875197
|
| 315 |
- config_name: Kotlin
|
| 316 |
features:
|
| 317 |
- name: commit
|
|
@@ -334,10 +298,7 @@ dataset_info:
|
|
| 334 |
dtype: string
|
| 335 |
splits:
|
| 336 |
- name: train
|
| 337 |
-
num_bytes: 339000058
|
| 338 |
num_examples: 16467
|
| 339 |
-
download_size: 101204442
|
| 340 |
-
dataset_size: 339000058
|
| 341 |
- config_name: PHP
|
| 342 |
features:
|
| 343 |
- name: commit
|
|
@@ -360,10 +321,7 @@ dataset_info:
|
|
| 360 |
dtype: string
|
| 361 |
splits:
|
| 362 |
- name: train
|
| 363 |
-
num_bytes: 8837629617.411818
|
| 364 |
num_examples: 281390
|
| 365 |
-
download_size: 3345666898
|
| 366 |
-
dataset_size: 8837629617.411818
|
| 367 |
- config_name: Perl
|
| 368 |
features:
|
| 369 |
- name: commit
|
|
@@ -386,10 +344,7 @@ dataset_info:
|
|
| 386 |
dtype: string
|
| 387 |
splits:
|
| 388 |
- name: train
|
| 389 |
-
num_bytes: 260477378
|
| 390 |
num_examples: 4930
|
| 391 |
-
download_size: 92901210
|
| 392 |
-
dataset_size: 260477378
|
| 393 |
- config_name: PowerShell
|
| 394 |
features:
|
| 395 |
- name: commit
|
|
@@ -412,10 +367,7 @@ dataset_info:
|
|
| 412 |
dtype: string
|
| 413 |
splits:
|
| 414 |
- name: train
|
| 415 |
-
num_bytes: 553399997.1505141
|
| 416 |
num_examples: 16729
|
| 417 |
-
download_size: 301061644
|
| 418 |
-
dataset_size: 553399997.1505141
|
| 419 |
- config_name: Python
|
| 420 |
features:
|
| 421 |
- name: commit
|
|
@@ -438,10 +390,7 @@ dataset_info:
|
|
| 438 |
dtype: string
|
| 439 |
splits:
|
| 440 |
- name: train
|
| 441 |
-
num_bytes: 43401708067
|
| 442 |
num_examples: 914849
|
| 443 |
-
download_size: 14393853016
|
| 444 |
-
dataset_size: 43401708067
|
| 445 |
- config_name: R
|
| 446 |
features:
|
| 447 |
- name: commit
|
|
@@ -464,10 +413,7 @@ dataset_info:
|
|
| 464 |
dtype: string
|
| 465 |
splits:
|
| 466 |
- name: train
|
| 467 |
-
num_bytes: 22395918.040545523
|
| 468 |
num_examples: 656
|
| 469 |
-
download_size: 4801427
|
| 470 |
-
dataset_size: 22395918.040545523
|
| 471 |
- config_name: Ruby
|
| 472 |
features:
|
| 473 |
- name: commit
|
|
@@ -490,10 +436,7 @@ dataset_info:
|
|
| 490 |
dtype: string
|
| 491 |
splits:
|
| 492 |
- name: train
|
| 493 |
-
num_bytes: 4806098257
|
| 494 |
num_examples: 345124
|
| 495 |
-
download_size: 1555780240
|
| 496 |
-
dataset_size: 4806098257
|
| 497 |
- config_name: Rust
|
| 498 |
features:
|
| 499 |
- name: commit
|
|
@@ -516,10 +459,7 @@ dataset_info:
|
|
| 516 |
dtype: string
|
| 517 |
splits:
|
| 518 |
- name: train
|
| 519 |
-
num_bytes: 2750630964.173699
|
| 520 |
num_examples: 57383
|
| 521 |
-
download_size: 1072232323
|
| 522 |
-
dataset_size: 2750630964.173699
|
| 523 |
- config_name: Scala
|
| 524 |
features:
|
| 525 |
- name: commit
|
|
@@ -542,10 +482,7 @@ dataset_info:
|
|
| 542 |
dtype: string
|
| 543 |
splits:
|
| 544 |
- name: train
|
| 545 |
-
num_bytes: 1502090669
|
| 546 |
num_examples: 46557
|
| 547 |
-
download_size: 507218235
|
| 548 |
-
dataset_size: 1502090669
|
| 549 |
- config_name: Shell
|
| 550 |
features:
|
| 551 |
- name: commit
|
|
@@ -568,10 +505,7 @@ dataset_info:
|
|
| 568 |
dtype: string
|
| 569 |
splits:
|
| 570 |
- name: train
|
| 571 |
-
num_bytes: 2727002433.72094
|
| 572 |
num_examples: 95305
|
| 573 |
-
download_size: 623236489
|
| 574 |
-
dataset_size: 2727002433.72094
|
| 575 |
- config_name: Swift
|
| 576 |
features:
|
| 577 |
- name: commit
|
|
@@ -594,10 +528,7 @@ dataset_info:
|
|
| 594 |
dtype: string
|
| 595 |
splits:
|
| 596 |
- name: train
|
| 597 |
-
num_bytes: 831556938.5793096
|
| 598 |
num_examples: 40271
|
| 599 |
-
download_size: 345171247
|
| 600 |
-
dataset_size: 831556938.5793096
|
| 601 |
- config_name: TypeScript
|
| 602 |
features:
|
| 603 |
- name: commit
|
|
@@ -620,124 +551,24 @@ dataset_info:
|
|
| 620 |
dtype: string
|
| 621 |
splits:
|
| 622 |
- name: train
|
| 623 |
-
num_bytes: 11236698679
|
| 624 |
num_examples: 114769
|
| 625 |
-
|
| 626 |
-
|
| 627 |
-
|
| 628 |
-
-
|
| 629 |
-
|
| 630 |
-
- split: train
|
| 631 |
-
path: Assembly/train-*
|
| 632 |
-
- config_name: C
|
| 633 |
-
data_files:
|
| 634 |
-
- split: train
|
| 635 |
-
path: C/train-*
|
| 636 |
-
- config_name: C#
|
| 637 |
-
data_files:
|
| 638 |
-
- split: train
|
| 639 |
-
path: C#/train-*
|
| 640 |
-
- config_name: C++
|
| 641 |
-
data_files:
|
| 642 |
-
- split: train
|
| 643 |
-
path: C++/train-*
|
| 644 |
-
- config_name: Dart
|
| 645 |
-
data_files:
|
| 646 |
-
- split: train
|
| 647 |
-
path: Dart/train-*
|
| 648 |
-
- config_name: Erlang
|
| 649 |
-
data_files:
|
| 650 |
-
- split: train
|
| 651 |
-
path: Erlang/train-*
|
| 652 |
-
- config_name: Go
|
| 653 |
-
data_files:
|
| 654 |
-
- split: train
|
| 655 |
-
path: Go/train-*
|
| 656 |
-
- config_name: Groovy
|
| 657 |
-
data_files:
|
| 658 |
-
- split: train
|
| 659 |
-
path: Groovy/train-*
|
| 660 |
-
- config_name: Haskell
|
| 661 |
-
data_files:
|
| 662 |
-
- split: train
|
| 663 |
-
path: Haskell/train-*
|
| 664 |
-
- config_name: Java
|
| 665 |
-
data_files:
|
| 666 |
-
- split: train
|
| 667 |
-
path: Java/train-*
|
| 668 |
-
- config_name: JavaScript
|
| 669 |
-
data_files:
|
| 670 |
-
- split: train
|
| 671 |
-
path: JavaScript/train-*
|
| 672 |
-
- config_name: Julia
|
| 673 |
-
data_files:
|
| 674 |
-
- split: train
|
| 675 |
-
path: Julia/train-*
|
| 676 |
-
- config_name: Kotlin
|
| 677 |
-
data_files:
|
| 678 |
-
- split: train
|
| 679 |
-
path: Kotlin/train-*
|
| 680 |
-
- config_name: PHP
|
| 681 |
-
data_files:
|
| 682 |
-
- split: train
|
| 683 |
-
path: PHP/train-*
|
| 684 |
-
- config_name: Perl
|
| 685 |
-
data_files:
|
| 686 |
-
- split: train
|
| 687 |
-
path: Perl/train-*
|
| 688 |
-
- config_name: PowerShell
|
| 689 |
-
data_files:
|
| 690 |
-
- split: train
|
| 691 |
-
path: PowerShell/train-*
|
| 692 |
-
- config_name: Python
|
| 693 |
-
data_files:
|
| 694 |
-
- split: train
|
| 695 |
-
path: Python/train-*
|
| 696 |
-
- config_name: R
|
| 697 |
-
data_files:
|
| 698 |
-
- split: train
|
| 699 |
-
path: R/train-*
|
| 700 |
-
- config_name: Ruby
|
| 701 |
-
data_files:
|
| 702 |
-
- split: train
|
| 703 |
-
path: Ruby/train-*
|
| 704 |
-
- config_name: Rust
|
| 705 |
-
data_files:
|
| 706 |
-
- split: train
|
| 707 |
-
path: Rust/train-*
|
| 708 |
-
- config_name: Scala
|
| 709 |
-
data_files:
|
| 710 |
-
- split: train
|
| 711 |
-
path: Scala/train-*
|
| 712 |
-
- config_name: Shell
|
| 713 |
-
data_files:
|
| 714 |
-
- split: train
|
| 715 |
-
path: Shell/train-*
|
| 716 |
-
- config_name: Swift
|
| 717 |
-
data_files:
|
| 718 |
-
- split: train
|
| 719 |
-
path: Swift/train-*
|
| 720 |
-
- config_name: TypeScript
|
| 721 |
-
data_files:
|
| 722 |
-
- split: train
|
| 723 |
-
path: TypeScript/train-*
|
| 724 |
license: apache-2.0
|
| 725 |
task_categories:
|
| 726 |
- text-generation
|
| 727 |
language:
|
| 728 |
-
- en
|
| 729 |
-
tags:
|
| 730 |
- code
|
| 731 |
-
- multilingual
|
| 732 |
-
- github
|
| 733 |
-
- commits
|
| 734 |
size_categories:
|
| 735 |
-
-
|
| 736 |
---
|
| 737 |
|
| 738 |
<div align="center">
|
| 739 |
|
| 740 |
-
# Themis-Git-Commits
|
| 741 |
|
| 742 |
[](https://arxiv.org/abs/xxxx.xxxxx)
|
| 743 |
[](https://huggingface.co/collections/project-themis/themis-reward-model-collection)
|
|
@@ -748,15 +579,31 @@ size_categories:
|
|
| 748 |
|
| 749 |
## Overview
|
| 750 |
|
| 751 |
-
**Themis-Git-Commits** is a large-scale dataset of single-file code commits
|
|
|
|
|
|
|
| 752 |
|
| 753 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 754 |
|
| 755 |
## Collection Pipeline
|
| 756 |
|
| 757 |
-
The commit mining pipeline is described in detail in the [Themis paper](https://arxiv.org/abs/xxxx.xxxxx) and the [Dataset](https://github.com/iNeil77/Themis/tree/main/Dataset) folder in the GitHub repository.
|
| 758 |
|
| 759 |
-
1. **BigQuery Mining** — A [GoogleSQL query](https://github.com/iNeil77/Themis/blob/main/Dataset/Commit_Mining_SQL/consolidated_query.sql) extracts single-file commits from `bigquery-public-data.github_repos`, filtering for
|
| 760 |
|
| 761 |
2. **Repository Reputation Filtering** — Commits are subset to those originating from [curated high-reputation repositories](https://github.com/iNeil77/Themis/tree/main/Dataset/Repos) (15+ GitHub stars, 5+ contributors, 10+ issues).
|
| 762 |
|
|
@@ -766,11 +613,14 @@ The commit mining pipeline is described in detail in the [Themis paper](https://
|
|
| 766 |
|
| 767 |
5. **MinHash Deduplication** — Near-duplicate content is removed using [MinHash LSH deduplication](https://github.com/iNeil77/Themis/blob/main/Dataset/Utils/minHash_dedupe_local.py) (shingle size 5, 256 permutations, Jaccard threshold 0.7).
|
| 768 |
|
|
|
|
|
|
|
| 769 |
## Downstream Processing (Not in This Dataset)
|
| 770 |
|
| 771 |
-
The steps below are applied downstream to produce the final preference pairs in Themis-CodePreference, and are **not** reflected in this
|
| 772 |
|
| 773 |
-
- **
|
|
|
|
| 774 |
- **Aspect Classification** — Commits are assigned to quality dimensions (Functional Correctness, Runtime Efficiency, Memory Efficiency, Security Hardness, Readability & Maintainability) using criteria-specialized [ModernBERT](https://huggingface.co/answerdotai/ModernBERT-base) commit classifiers, trained on seed positives retrieved via [curated term lists](https://github.com/iNeil77/Themis/tree/main/Dataset/Commit_Mining_Terms).
|
| 775 |
- **LLM Scoring & Instruction Synthesis** — Frontier LMs validate preference strength and generate realistic inverse instructions.
|
| 776 |
- **LLM-as-a-Judge Preference Labelling** — Multi-sample voting with frontier LMs produces consensus preference labels.
|
|
@@ -793,14 +643,41 @@ The steps below are applied downstream to produce the final preference pairs in
|
|
| 793 |
|
| 794 |
</div>
|
| 795 |
|
| 796 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 797 |
|
| 798 |
<div align="center">
|
| 799 |
|
| 800 |
| Filter | Purpose |
|
| 801 |
|:---|:---|
|
| 802 |
| **License allowlist** | MIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC, CC0-1.0, EPL-1.0, MPL-2.0, Unlicense, AGPL-3.0, LGPL-2.1, Artistic-2.0 |
|
| 803 |
-
| **Language allowlist** | Python, Java, JavaScript, C, C#, C++, TypeScript, Go, Ruby |
|
| 804 |
| **Message length** | 10 < length < 15,000 characters |
|
| 805 |
| **Message blocklist** | ~50 low-signal messages excluded (e.g., "initial commit", "wip", "yolo") |
|
| 806 |
| **Pattern exclusion** | Merge commits and CI push messages filtered out |
|
|
@@ -808,6 +685,8 @@ The steps below are applied downstream to produce the final preference pairs in
|
|
| 808 |
| **Single-file constraint** | Commit touches exactly one file |
|
| 809 |
| **Content retrieval** | Both pre-commit and post-commit file contents successfully fetched |
|
| 810 |
| **Near-deduplication** | MinHash LSH with Jaccard threshold 0.7 |
|
|
|
|
|
|
|
| 811 |
|
| 812 |
</div>
|
| 813 |
|
|
@@ -816,16 +695,18 @@ The steps below are applied downstream to produce the final preference pairs in
|
|
| 816 |
```python
|
| 817 |
from datasets import load_dataset
|
| 818 |
|
| 819 |
-
|
| 820 |
-
|
| 821 |
-
|
| 822 |
-
sample = dataset["train"][0]
|
| 823 |
print(f"Commit: {sample['commit']}")
|
| 824 |
print(f"Subject: {sample['subject']}")
|
| 825 |
print(f"License: {sample['license']}")
|
| 826 |
print(f"File: {sample['file_path']}")
|
| 827 |
-
|
| 828 |
-
|
|
|
|
|
|
|
|
|
|
| 829 |
```
|
| 830 |
|
| 831 |
## License
|
|
@@ -841,4 +722,4 @@ This dataset is released under the [Apache 2.0 License](https://www.apache.org/l
|
|
| 841 |
journal={arXiv preprint arXiv:xxxx.xxxxx},
|
| 842 |
year={2025}
|
| 843 |
}
|
| 844 |
-
```
|
|
|
|
| 22 |
dtype: string
|
| 23 |
splits:
|
| 24 |
- name: train
|
|
|
|
| 25 |
num_examples: 507
|
|
|
|
|
|
|
| 26 |
- config_name: C
|
| 27 |
features:
|
| 28 |
- name: commit
|
|
|
|
| 45 |
dtype: string
|
| 46 |
splits:
|
| 47 |
- name: train
|
|
|
|
| 48 |
num_examples: 172736
|
| 49 |
+
- config_name: CSharp
|
|
|
|
|
|
|
| 50 |
features:
|
| 51 |
- name: commit
|
| 52 |
dtype: string
|
|
|
|
| 68 |
dtype: string
|
| 69 |
splits:
|
| 70 |
- name: train
|
|
|
|
| 71 |
num_examples: 138000
|
| 72 |
+
- config_name: Cpp
|
|
|
|
|
|
|
| 73 |
features:
|
| 74 |
- name: commit
|
| 75 |
dtype: string
|
|
|
|
| 91 |
dtype: string
|
| 92 |
splits:
|
| 93 |
- name: train
|
|
|
|
| 94 |
num_examples: 194218
|
|
|
|
|
|
|
| 95 |
- config_name: Dart
|
| 96 |
features:
|
| 97 |
- name: commit
|
|
|
|
| 114 |
dtype: string
|
| 115 |
splits:
|
| 116 |
- name: train
|
|
|
|
| 117 |
num_examples: 8890
|
|
|
|
|
|
|
| 118 |
- config_name: Erlang
|
| 119 |
features:
|
| 120 |
- name: commit
|
|
|
|
| 137 |
dtype: string
|
| 138 |
splits:
|
| 139 |
- name: train
|
|
|
|
| 140 |
num_examples: 15623
|
|
|
|
|
|
|
| 141 |
- config_name: Go
|
| 142 |
features:
|
| 143 |
- name: commit
|
|
|
|
| 160 |
dtype: string
|
| 161 |
splits:
|
| 162 |
- name: train
|
|
|
|
| 163 |
num_examples: 189131
|
|
|
|
|
|
|
| 164 |
- config_name: Groovy
|
| 165 |
features:
|
| 166 |
- name: commit
|
|
|
|
| 183 |
dtype: string
|
| 184 |
splits:
|
| 185 |
- name: train
|
|
|
|
| 186 |
num_examples: 16723
|
|
|
|
|
|
|
| 187 |
- config_name: Haskell
|
| 188 |
features:
|
| 189 |
- name: commit
|
|
|
|
| 206 |
dtype: string
|
| 207 |
splits:
|
| 208 |
- name: train
|
|
|
|
| 209 |
num_examples: 13851
|
|
|
|
|
|
|
| 210 |
- config_name: Java
|
| 211 |
features:
|
| 212 |
- name: commit
|
|
|
|
| 229 |
dtype: string
|
| 230 |
splits:
|
| 231 |
- name: train
|
|
|
|
| 232 |
num_examples: 402369
|
|
|
|
|
|
|
| 233 |
- config_name: JavaScript
|
| 234 |
features:
|
| 235 |
- name: commit
|
|
|
|
| 252 |
dtype: string
|
| 253 |
splits:
|
| 254 |
- name: train
|
|
|
|
| 255 |
num_examples: 694051
|
|
|
|
|
|
|
| 256 |
- config_name: Julia
|
| 257 |
features:
|
| 258 |
- name: commit
|
|
|
|
| 275 |
dtype: string
|
| 276 |
splits:
|
| 277 |
- name: train
|
|
|
|
| 278 |
num_examples: 2662
|
|
|
|
|
|
|
| 279 |
- config_name: Kotlin
|
| 280 |
features:
|
| 281 |
- name: commit
|
|
|
|
| 298 |
dtype: string
|
| 299 |
splits:
|
| 300 |
- name: train
|
|
|
|
| 301 |
num_examples: 16467
|
|
|
|
|
|
|
| 302 |
- config_name: PHP
|
| 303 |
features:
|
| 304 |
- name: commit
|
|
|
|
| 321 |
dtype: string
|
| 322 |
splits:
|
| 323 |
- name: train
|
|
|
|
| 324 |
num_examples: 281390
|
|
|
|
|
|
|
| 325 |
- config_name: Perl
|
| 326 |
features:
|
| 327 |
- name: commit
|
|
|
|
| 344 |
dtype: string
|
| 345 |
splits:
|
| 346 |
- name: train
|
|
|
|
| 347 |
num_examples: 4930
|
|
|
|
|
|
|
| 348 |
- config_name: PowerShell
|
| 349 |
features:
|
| 350 |
- name: commit
|
|
|
|
| 367 |
dtype: string
|
| 368 |
splits:
|
| 369 |
- name: train
|
|
|
|
| 370 |
num_examples: 16729
|
|
|
|
|
|
|
| 371 |
- config_name: Python
|
| 372 |
features:
|
| 373 |
- name: commit
|
|
|
|
| 390 |
dtype: string
|
| 391 |
splits:
|
| 392 |
- name: train
|
|
|
|
| 393 |
num_examples: 914849
|
|
|
|
|
|
|
| 394 |
- config_name: R
|
| 395 |
features:
|
| 396 |
- name: commit
|
|
|
|
| 413 |
dtype: string
|
| 414 |
splits:
|
| 415 |
- name: train
|
|
|
|
| 416 |
num_examples: 656
|
|
|
|
|
|
|
| 417 |
- config_name: Ruby
|
| 418 |
features:
|
| 419 |
- name: commit
|
|
|
|
| 436 |
dtype: string
|
| 437 |
splits:
|
| 438 |
- name: train
|
|
|
|
| 439 |
num_examples: 345124
|
|
|
|
|
|
|
| 440 |
- config_name: Rust
|
| 441 |
features:
|
| 442 |
- name: commit
|
|
|
|
| 459 |
dtype: string
|
| 460 |
splits:
|
| 461 |
- name: train
|
|
|
|
| 462 |
num_examples: 57383
|
|
|
|
|
|
|
| 463 |
- config_name: Scala
|
| 464 |
features:
|
| 465 |
- name: commit
|
|
|
|
| 482 |
dtype: string
|
| 483 |
splits:
|
| 484 |
- name: train
|
|
|
|
| 485 |
num_examples: 46557
|
|
|
|
|
|
|
| 486 |
- config_name: Shell
|
| 487 |
features:
|
| 488 |
- name: commit
|
|
|
|
| 505 |
dtype: string
|
| 506 |
splits:
|
| 507 |
- name: train
|
|
|
|
| 508 |
num_examples: 95305
|
|
|
|
|
|
|
| 509 |
- config_name: Swift
|
| 510 |
features:
|
| 511 |
- name: commit
|
|
|
|
| 528 |
dtype: string
|
| 529 |
splits:
|
| 530 |
- name: train
|
|
|
|
| 531 |
num_examples: 40271
|
|
|
|
|
|
|
| 532 |
- config_name: TypeScript
|
| 533 |
features:
|
| 534 |
- name: commit
|
|
|
|
| 551 |
dtype: string
|
| 552 |
splits:
|
| 553 |
- name: train
|
|
|
|
| 554 |
num_examples: 114769
|
| 555 |
+
tags:
|
| 556 |
+
- code
|
| 557 |
+
- github
|
| 558 |
+
- commits
|
| 559 |
+
- multilingual
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 560 |
license: apache-2.0
|
| 561 |
task_categories:
|
| 562 |
- text-generation
|
| 563 |
language:
|
|
|
|
|
|
|
| 564 |
- code
|
|
|
|
|
|
|
|
|
|
| 565 |
size_categories:
|
| 566 |
+
- 1M<n<10M
|
| 567 |
---
|
| 568 |
|
| 569 |
<div align="center">
|
| 570 |
|
| 571 |
+
# Themis-Git-Commits-Merged
|
| 572 |
|
| 573 |
[](https://arxiv.org/abs/xxxx.xxxxx)
|
| 574 |
[](https://huggingface.co/collections/project-themis/themis-reward-model-collection)
|
|
|
|
| 579 |
|
| 580 |
## Overview
|
| 581 |
|
| 582 |
+
**Themis-Git-Commits-Merged** is a large-scale dataset of ~3.98M single-file code commits from **permissively licensed** GitHub repositories that have been cross-referenced with [GHTorrent](https://ghtorrent.org/) pull request data to retain only commits that are part of **successfully merged, non-reverted pull requests**. This provides implicit human validation of each code change — a merge decision by project maintainers confirms the intent and quality of the commit.
|
| 583 |
+
|
| 584 |
+
This dataset is derived from [Themis-Git-Commits](https://huggingface.co/datasets/project-themis/git-commits) (the raw, unfiltered commit pool) by joining against GHTorrent pull request records through **end of 2021** (the temporal extent of the GHTorrent PR data used). It serves as the direct input to the aspect classification and preference construction stages of the [Themis](https://github.com/iNeil77/Themis) pipeline, which produces the commit-based preference pairs in [Themis-CodePreference](https://huggingface.co/datasets/project-themis/Themis-CodePreference) and [Themis-CodeRewardBench](https://huggingface.co/datasets/project-themis/Themis-CodeRewardBench).
|
| 585 |
|
| 586 |
+
The SQL query used for initial commit mining restricts to repositories under permissive open-source licenses only (MIT, Apache-2.0, BSD-2/3-Clause, ISC, CC0-1.0, EPL-1.0, MPL-2.0, Unlicense, AGPL-3.0, LGPL-2.1, Artistic-2.0). The BigQuery snapshot used contains commits up to **early 2022** — predating the widespread availability of LLM code generation tools — ensuring that all code changes in the dataset represent **genuine human-authored preferences**.
|
| 587 |
+
|
| 588 |
+
## Relationship to Themis-Git-Commits
|
| 589 |
+
|
| 590 |
+
<div align="center">
|
| 591 |
+
|
| 592 |
+
| | [Themis-Git-Commits](https://huggingface.co/datasets/project-themis/git-commits) | **Themis-Git-Commits-Merged** (this dataset) |
|
| 593 |
+
|:---|:---|:---|
|
| 594 |
+
| **Scope** | All mined single-file commits | Only commits in merged, non-reverted PRs |
|
| 595 |
+
| **Extension filtering** | No | Yes (file extension matches target language) |
|
| 596 |
+
| **PR validation** | No | Yes (via GHTorrent, through end of 2021) |
|
| 597 |
+
| **Human validation** | Implicit (authored by humans) | Explicit (merge decision by maintainers) |
|
| 598 |
+
| **Downstream use** | Raw pool for further filtering | Direct input to aspect classification |
|
| 599 |
+
|
| 600 |
+
</div>
|
| 601 |
|
| 602 |
## Collection Pipeline
|
| 603 |
|
| 604 |
+
The commit mining pipeline is described in detail in the [Themis paper](https://arxiv.org/abs/xxxx.xxxxx) and the [Dataset](https://github.com/iNeil77/Themis/tree/main/Dataset) folder in the GitHub repository. The BigQuery SQL query and scraping infrastructure are modified from the [OctoPack](https://arxiv.org/abs/2308.07124) pipeline ([CommitPack](https://huggingface.co/datasets/bigcode/commitpack)); the subsequent filtering, classification, and preference construction stages are original to Themis.
|
| 605 |
|
| 606 |
+
1. **BigQuery Mining** — A [GoogleSQL query](https://github.com/iNeil77/Themis/blob/main/Dataset/Commit_Mining_SQL/consolidated_query.sql) (modified from [OctoPack](https://arxiv.org/abs/2308.07124)) extracts single-file commits from **permissively licensed** repositories in `bigquery-public-data.github_repos`, filtering for target programming languages and non-trivial commit messages.
|
| 607 |
|
| 608 |
2. **Repository Reputation Filtering** — Commits are subset to those originating from [curated high-reputation repositories](https://github.com/iNeil77/Themis/tree/main/Dataset/Repos) (15+ GitHub stars, 5+ contributors, 10+ issues).
|
| 609 |
|
|
|
|
| 613 |
|
| 614 |
5. **MinHash Deduplication** — Near-duplicate content is removed using [MinHash LSH deduplication](https://github.com/iNeil77/Themis/blob/main/Dataset/Utils/minHash_dedupe_local.py) (shingle size 5, 256 permutations, Jaccard threshold 0.7).
|
| 615 |
|
| 616 |
+
6. **Pull Request Cross-Referencing** *(this step produces this dataset)* — Commits are joined with [GHTorrent](https://ghtorrent.org/) pull request data (through **end of 2021**) to retain only non-reverted commits that are part of successfully merged pull requests from reputable repositories, ensuring implicit human validation of each code change.
|
| 617 |
+
|
| 618 |
## Downstream Processing (Not in This Dataset)
|
| 619 |
|
| 620 |
+
The steps below are applied downstream to produce the final preference pairs in Themis-CodePreference and Themis-CodeRewardBench, and are **not** reflected in this dataset:
|
| 621 |
|
| 622 |
+
- **Language Subsetting** — The 24 languages in this dataset are narrowed to the 8 target languages (C, C#, C++, Go, Java, JavaScript, Python, Ruby) used in [Themis-CodePreference](https://huggingface.co/datasets/project-themis/Themis-CodePreference) and [Themis-CodeRewardBench](https://huggingface.co/datasets/project-themis/Themis-CodeRewardBench).
|
| 623 |
+
- **Temporal Subsetting** — For training data ([Themis-CodePreference](https://huggingface.co/datasets/project-themis/Themis-CodePreference)), only commits pushed before **March 2019** are retained. For benchmark data ([Themis-CodeRewardBench](https://huggingface.co/datasets/project-themis/Themis-CodeRewardBench)), commits are scoped to **June 2019 – January 2021** from disjoint repositories.
|
| 624 |
- **Aspect Classification** — Commits are assigned to quality dimensions (Functional Correctness, Runtime Efficiency, Memory Efficiency, Security Hardness, Readability & Maintainability) using criteria-specialized [ModernBERT](https://huggingface.co/answerdotai/ModernBERT-base) commit classifiers, trained on seed positives retrieved via [curated term lists](https://github.com/iNeil77/Themis/tree/main/Dataset/Commit_Mining_Terms).
|
| 625 |
- **LLM Scoring & Instruction Synthesis** — Frontier LMs validate preference strength and generate realistic inverse instructions.
|
| 626 |
- **LLM-as-a-Judge Preference Labelling** — Multi-sample voting with frontier LMs produces consensus preference labels.
|
|
|
|
| 643 |
|
| 644 |
</div>
|
| 645 |
|
| 646 |
+
## Language Distribution
|
| 647 |
+
|
| 648 |
+
The dataset is partitioned by programming language, with one config per language. Each config has a single `train` split.
|
| 649 |
+
|
| 650 |
+
<div align="center">
|
| 651 |
+
|
| 652 |
+
| Language | Commits | | Language | Commits |
|
| 653 |
+
|:---|---:|:---|:---|---:|
|
| 654 |
+
| Python | 914,849 | | Rust | 57,383 |
|
| 655 |
+
| JavaScript | 694,051 | | Scala | 46,557 |
|
| 656 |
+
| Java | 402,369 | | Swift | 40,271 |
|
| 657 |
+
| Ruby | 345,124 | | Groovy | 16,723 |
|
| 658 |
+
| PHP | 281,390 | | PowerShell | 16,729 |
|
| 659 |
+
| C++ | 194,218 | | Kotlin | 16,467 |
|
| 660 |
+
| Go | 189,131 | | Erlang | 15,623 |
|
| 661 |
+
| C | 172,736 | | Haskell | 13,851 |
|
| 662 |
+
| C# | 138,000 | | Dart | 8,890 |
|
| 663 |
+
| TypeScript | 114,769 | | Perl | 4,930 |
|
| 664 |
+
| Shell | 95,305 | | Julia | 2,662 |
|
| 665 |
+
| | | | R | 656 |
|
| 666 |
+
| | | | Assembly | 507 |
|
| 667 |
+
| **Total** | | | | **~3.98M** |
|
| 668 |
+
|
| 669 |
+
</div>
|
| 670 |
+
|
| 671 |
+
## Filters Applied
|
| 672 |
+
|
| 673 |
+
All filters from the upstream [Themis-Git-Commits](https://huggingface.co/datasets/project-themis/git-commits) pipeline apply, plus the PR merge filter:
|
| 674 |
|
| 675 |
<div align="center">
|
| 676 |
|
| 677 |
| Filter | Purpose |
|
| 678 |
|:---|:---|
|
| 679 |
| **License allowlist** | MIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC, CC0-1.0, EPL-1.0, MPL-2.0, Unlicense, AGPL-3.0, LGPL-2.1, Artistic-2.0 |
|
| 680 |
+
| **Language allowlist** (SQL) | Python, Java, JavaScript, C, C#, C++, TypeScript, Go, Ruby (repo-level filter in BigQuery query) |
|
| 681 |
| **Message length** | 10 < length < 15,000 characters |
|
| 682 |
| **Message blocklist** | ~50 low-signal messages excluded (e.g., "initial commit", "wip", "yolo") |
|
| 683 |
| **Pattern exclusion** | Merge commits and CI push messages filtered out |
|
|
|
|
| 685 |
| **Single-file constraint** | Commit touches exactly one file |
|
| 686 |
| **Content retrieval** | Both pre-commit and post-commit file contents successfully fetched |
|
| 687 |
| **Near-deduplication** | MinHash LSH with Jaccard threshold 0.7 |
|
| 688 |
+
| **Extension filtering** | Changed file's extension mapped to one of 24 target programming languages (see distribution table) |
|
| 689 |
+
| **PR merge filter** | Commit is part of a successfully merged, non-reverted pull request (GHTorrent data through end of 2021) |
|
| 690 |
|
| 691 |
</div>
|
| 692 |
|
|
|
|
| 695 |
```python
|
| 696 |
from datasets import load_dataset
|
| 697 |
|
| 698 |
+
# Load a single language
|
| 699 |
+
python_commits = load_dataset("project-themis/git-commits-merged", "Python")
|
| 700 |
+
sample = python_commits["train"][0]
|
|
|
|
| 701 |
print(f"Commit: {sample['commit']}")
|
| 702 |
print(f"Subject: {sample['subject']}")
|
| 703 |
print(f"License: {sample['license']}")
|
| 704 |
print(f"File: {sample['file_path']}")
|
| 705 |
+
|
| 706 |
+
# Load all languages
|
| 707 |
+
for lang in ["C", "CSharp", "Cpp", "Go", "Java", "JavaScript", "Python", "Ruby", "TypeScript"]:
|
| 708 |
+
ds = load_dataset("project-themis/git-commits-merged", lang)
|
| 709 |
+
print(f"{lang}: {len(ds['train'])} commits")
|
| 710 |
```
|
| 711 |
|
| 712 |
## License
|
|
|
|
| 722 |
journal={arXiv preprint arXiv:xxxx.xxxxx},
|
| 723 |
year={2025}
|
| 724 |
}
|
| 725 |
+
```
|