| --- |
| language: |
| - en |
| license: mit |
| task_categories: |
| - text-generation |
| tags: |
| - rust |
| - code |
| - commit-messages |
| - patches |
| - sft |
| size_categories: |
| - 1K<n<10K |
| --- |
| |
| # Rust Commit Dataset - Hyperswitch |
|
|
| ## Dataset Description |
|
|
| This dataset contains Rust commit messages paired with their corresponding code patches from the [Hyperswitch](https://github.com/juspay/hyperswitch) repository. |
|
|
| ### Dataset Summary |
|
|
| - **Total Examples**: 1801 |
| - **Language**: Rust |
| - **Source**: Hyperswitch GitHub repository |
| - **Format**: Prompt-response pairs for supervised fine-tuning (SFT) |
|
|
| ### Data Fields |
|
|
| - `prompt`: The commit message describing the change |
| - `response`: The git patch/diff showing the actual code changes |
|
|
| ### Example |
|
|
| ```json |
| { |
| "prompt": "fix: update payment status handling", |
| "response": "diff --git a/src/payment.rs b/src/payment.rs\n..." |
| } |
| ``` |
|
|
| ### Usage |
|
|
| ```python |
| from datasets import load_dataset |
| |
| # Load dataset |
| dataset = load_dataset("archit11/hyperswitch-product-code-complete") |
| |
| # Access train/test splits |
| train_data = dataset['train'] |
| test_data = dataset['test'] |
| |
| # Example |
| print(train_data[0]['prompt']) |
| print(train_data[0]['response']) |
| ``` |
|
|
| ### Training |
|
|
| This dataset is designed for fine-tuning code generation models on Rust commit-to-patch generation tasks. |
|
|
| Example training command: |
| ```bash |
| python train_sft.py \ |
| --dataset archit11/hyperswitch-product-code-complete \ |
| --model Qwen/Qwen3-4B \ |
| --output_dir ./qwen-rust-sft \ |
| --use_4bit \ |
| --use_lora |
| ``` |
|
|
| ### Data Collection |
|
|
| The data was collected using PyDriller and tree-sitter for parsing Rust identifiers: |
| - Only commits with 20+ lines changed are included |
| - Rust-specific identifier tracking (functions, structs, enums, traits, impls, modules) |
|
|
| ### Citation |
|
|
| If you use this dataset, please cite the Hyperswitch repository: |
| ``` |
| @misc{hyperswitch2024, |
| title={Hyperswitch}, |
| author={Juspay}, |
| year={2024}, |
| url={https://github.com/juspay/hyperswitch} |
| } |
| ``` |
|
|
| ### License |
|
|
| This dataset follows the same license as the Hyperswitch project. |
|
|