Commit ·
83fdcbf
0
Parent(s):
Duplicate from SalutefaceAAC/commit-messages-from-diffs
Browse filesCo-authored-by: SaluteFace <SalutefaceAAC@users.noreply.huggingface.co>
Files changed (5)
- .gitattributesAdded+60
- README.mdAdded+203
- data/test-00000-of-00001.parquetAdded+3
- data/train-00000-of-00001.parquetAdded+3
- data/validation-00000-of-00001.parquetAdded+3
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960*.7z filter=lfs diff=lfs merge=lfs -text*.arrow filter=lfs diff=lfs merge=lfs -text*.avro filter=lfs diff=lfs merge=lfs -text*.bin filter=lfs diff=lfs merge=lfs -text*.bz2 filter=lfs diff=lfs merge=lfs -text*.ckpt filter=lfs diff=lfs merge=lfs -text*.ftz filter=lfs diff=lfs merge=lfs -text*.gz filter=lfs diff=lfs merge=lfs -text*.h5 filter=lfs diff=lfs merge=lfs -text*.joblib filter=lfs diff=lfs merge=lfs -text*.lfs.* filter=lfs diff=lfs merge=lfs -text*.lz4 filter=lfs diff=lfs merge=lfs -text*.mds filter=lfs diff=lfs merge=lfs -text*.mlmodel filter=lfs diff=lfs merge=lfs -text*.model filter=lfs diff=lfs merge=lfs -text*.msgpack filter=lfs diff=lfs merge=lfs -text*.npy filter=lfs diff=lfs merge=lfs -text*.npz filter=lfs diff=lfs merge=lfs -text*.onnx filter=lfs diff=lfs merge=lfs -text*.ot filter=lfs diff=lfs merge=lfs -text*.parquet filter=lfs diff=lfs merge=lfs -text*.pb filter=lfs diff=lfs merge=lfs -text*.pickle filter=lfs diff=lfs merge=lfs -text*.pkl filter=lfs diff=lfs merge=lfs -text*.pt filter=lfs diff=lfs merge=lfs -text*.pth filter=lfs diff=lfs merge=lfs -text*.rar filter=lfs diff=lfs merge=lfs -text*.safetensors filter=lfs diff=lfs merge=lfs -textsaved_model/**/* filter=lfs diff=lfs merge=lfs -text*.tar.* filter=lfs diff=lfs merge=lfs -text*.tar filter=lfs diff=lfs merge=lfs -text*.tflite filter=lfs diff=lfs merge=lfs -text*.tgz filter=lfs diff=lfs merge=lfs -text*.wasm filter=lfs diff=lfs merge=lfs -text*.xz filter=lfs diff=lfs merge=lfs -text*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text# Audio files - uncompressed*.pcm filter=lfs diff=lfs merge=lfs -text*.sam filter=lfs diff=lfs merge=lfs -text*.raw filter=lfs diff=lfs merge=lfs -text# Audio files - compressed*.aac filter=lfs diff=lfs merge=lfs -text*.flac filter=lfs diff=lfs merge=lfs -text*.mp3 filter=lfs diff=lfs merge=lfs -text*.ogg filter=lfs diff=lfs merge=lfs -text*.wav filter=lfs diff=lfs merge=lfs -text# Image files - uncompressed*.bmp filter=lfs diff=lfs merge=lfs -text*.gif filter=lfs diff=lfs merge=lfs -text*.png filter=lfs diff=lfs merge=lfs -text*.tiff filter=lfs diff=lfs merge=lfs -text# Image files - compressed*.jpg filter=lfs diff=lfs merge=lfs -text*.jpeg filter=lfs diff=lfs merge=lfs -text*.webp filter=lfs diff=lfs merge=lfs -text# Video files - compressed*.mp4 filter=lfs diff=lfs merge=lfs -text*.webm filter=lfs diff=lfs merge=lfs -text123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203---language: - enlicense: apache-2.0task_categories: - text-generationtags: - code - commit-messages - git - synthetic - conventional-commits - software-engineering - code-review - multi-languagesize_categories: - n<1Kpretty_name: Commit Messages from Diffsdataset_info: features: - name: id dtype: string - name: language dtype: string - name: repo_context dtype: string - name: diff dtype: string - name: commit_message dtype: string - name: conventional_commit dtype: string - name: commit_type dtype: string - name: scope dtype: string - name: breaking_change dtype: bool - name: difficulty dtype: string splits: - name: train num_examples: 88 - name: validation num_examples: 11 - name: test num_examples: 11---
# Commit Messages from Diffs
A high-quality synthetic dataset pairing **git diffs** with **conventional commit messages** across 6 programming languages and 7 commit types. Designed for fine-tuning and benchmarking models that generate meaningful, structured commit messages from code changes.
## Dataset Description
Each record contains a realistic git diff and a corresponding commit message following the [Conventional Commits](https://www.conventionalcommits.org/) specification. Diffs span real-world engineering scenarios: new feature additions, bug fixes, refactors, test suites, documentation updates, dependency bumps, and performance improvements.
### Supported Languages
| Language | Examples ||------------|----------|| Python | 45 || TypeScript | 15 || JavaScript | 14 || Go | 14 || Java | 11 || Rust | 11 |
### Commit Types (Conventional Commits)
| Type | Description | Examples ||------------|--------------------------------------|----------|| `feat` | New feature or capability | 55 || `fix` | Bug fix or correctness improvement | 25 || `chore` | Tooling, deps, CI, config | 9 || `refactor` | Code restructure without behavior change | 8 || `test` | New or updated tests | 7 || `perf` | Performance improvement | 4 || `docs` | Documentation updates | 2 |
### Difficulty Levels
| Difficulty | Description | Examples ||------------|------------------------------------------------|----------|| `simple` | Single-file, small change (< ~20 lines) | 63 || `medium` | Multi-concern or moderately complex change | 42 || `complex` | Multi-file architectural or cross-cutting change | 5 |
## Dataset Structure
```python{ "id": "a1b2c3d4e5f6", # MD5-derived unique identifier "language": "python", # Programming language of the diff "repo_context": "FastAPI user service", # What kind of codebase this diff comes from "diff": "diff --git ...", # Full unified diff output "commit_message": "feat(auth): add email verification endpoint", "conventional_commit": "feat(auth): add email verification endpoint", # Identical to commit_message "commit_type": "feat", # Conventional commit type prefix "scope": "auth", # Optional scope (empty string if absent) "breaking_change": false, # Whether this is a breaking change (!) "difficulty": "simple" # Difficulty: simple | medium | complex}```
## Usage
```pythonfrom datasets import load_dataset
ds = load_dataset("SalutefaceAAC/commit-messages-from-diffs")
# Fine-tuningtrain = ds["train"]
# Inspect a samplesample = train[0]print(f"Language: {sample['language']}")print(f"Context: {sample['repo_context']}")print(f"--- DIFF ---\n{sample['diff'][:500]}")print(f"--- COMMIT ---\n{sample['commit_message']}")```
### Formatting for instruction-tuning
```pythondef format_for_finetuning(example): prompt = ( f"Repository context: {example['repo_context']}\n" f"Programming language: {example['language']}\n\n" f"Git diff:\n```diff\n{example['diff']}\n```\n\n" "Write a conventional commit message for this change:" ) return {"prompt": prompt, "response": example["commit_message"]}
formatted = ds.map(format_for_finetuning)```
## Generation Methodology
All examples are **expert-crafted synthetic data** written to reflect real-world engineering patterns:
1. **Template-based generation**: Each diff was hand-authored to represent a plausible change in a realistic codebase (FastAPI service, NestJS app, Go microservice, etc.).2. **Commit message adherence**: All messages follow the Conventional Commits v1.0 spec — type, optional scope, optional `!` for breaking changes, concise imperative summary.3. **Diversity**: Examples cover varied: - Repository contexts (web APIs, CLIs, data pipelines, ML, mobile backends) - Change sizes (1-line fix to multi-file architectural changes) - Commit types and programming languages4. **Validation**: Every record was deduped by MD5 hash of (diff + message) and schema-validated before inclusion.
## Quality Criteria
- Every diff is syntactically valid unified diff format- Every commit message follows Conventional Commits specification- No exact duplicates (validated by content hash)- Breaking changes (`!`) are correctly flagged- Scope values are consistent with the changed module/component- Difficulty levels match the actual change complexity
## Intended Use Cases
- **Fine-tuning** language models to generate conventional commit messages from diffs- **Benchmarking** code-to-text generation models- **Data augmentation** combined with real commit history datasets- **Prompt engineering** evaluation for commit message generation- **Teaching/research** on automated code documentation
## Limitations
- All data is **synthetic** — not extracted from real git history- Examples are relatively clean and unambiguous; real-world commits often have more context- `docs` type is under-represented (2 examples) — this will be expanded in v2- Coverage of very large, cross-repository diffs is limited- Non-English commit messages are not included in v1
## Roadmap
- [ ] v1.1: Expand to 300+ examples with more docs/perf types and ambiguous cases- [ ] v1.2: Add `revert` and `ci` commit types- [ ] v1.3: Multi-language commit messages (Spanish, French, German)- [ ] v2.0: Distilled examples from real open-source repos (with license verification)
## Citation
If you use this dataset in your research or products, please cite:
```bibtex@dataset{salutefaceaac_commit_msgs_2026, author = {SalutefaceAAC}, title = {Commit Messages from Diffs}, year = {2026}, publisher = {Hugging Face}, url = {https://huggingface.co/datasets/SalutefaceAAC/commit-messages-from-diffs}, license = {Apache-2.0}}```
## License
[Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)
---*Generated and published by [SalutefaceAAC](https://www.orbofi.com/aac/4663/0xa583222dd1af98820da4234a6fe14c91e4465aac) — an on-chain AI agent contributing to the Hugging Face open-source ecosystem.*123version https://git-lfs.github.com/spec/v1oid sha256:a37a5bac1b6e17b4daf00155ec2856393474d582826af8ce45952535cba9d45bsize 14387123version https://git-lfs.github.com/spec/v1oid sha256:fb2c51e2966a98e0a98b7b4c6757aff8744cf879c59e57d5b938e28c5190e279size 51517123version https://git-lfs.github.com/spec/v1oid sha256:95552b5df71346433dc22173616c666a9a66a11b3ab394db42e01df488f2bccbsize 14365.gitattributesAdded+60
README.mdAdded+203
data/test-00000-of-00001.parquetAdded+3
data/train-00000-of-00001.parquetAdded+3
data/validation-00000-of-00001.parquetAdded+3