Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,26 +1,95 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
num_bytes: 34219
|
| 16 |
-
num_examples: 12
|
| 17 |
-
download_size: 198240
|
| 18 |
-
dataset_size: 658718
|
| 19 |
-
configs:
|
| 20 |
-
- config_name: default
|
| 21 |
-
data_files:
|
| 22 |
-
- split: train
|
| 23 |
-
path: data/train-*
|
| 24 |
-
- split: test
|
| 25 |
-
path: data/test-*
|
| 26 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: mit
|
| 5 |
+
task_categories:
|
| 6 |
+
- text-generation
|
| 7 |
+
tags:
|
| 8 |
+
- rust
|
| 9 |
+
- code
|
| 10 |
+
- commit-messages
|
| 11 |
+
- patches
|
| 12 |
+
- sft
|
| 13 |
+
size_categories:
|
| 14 |
+
- 1K<n<10K
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
---
|
| 16 |
+
|
| 17 |
+
# Rust Commit Dataset - Hyperswitch
|
| 18 |
+
|
| 19 |
+
## Dataset Description
|
| 20 |
+
|
| 21 |
+
This dataset contains Rust commit messages paired with their corresponding code patches from the [Hyperswitch](https://github.com/juspay/hyperswitch) repository.
|
| 22 |
+
|
| 23 |
+
### Dataset Summary
|
| 24 |
+
|
| 25 |
+
- **Total Examples**: 231
|
| 26 |
+
- **Language**: Rust
|
| 27 |
+
- **Source**: Hyperswitch GitHub repository
|
| 28 |
+
- **Format**: Prompt-response pairs for supervised fine-tuning (SFT)
|
| 29 |
+
|
| 30 |
+
### Data Fields
|
| 31 |
+
|
| 32 |
+
- `prompt`: The commit message describing the change
|
| 33 |
+
- `response`: The git patch/diff showing the actual code changes
|
| 34 |
+
|
| 35 |
+
### Example
|
| 36 |
+
|
| 37 |
+
```json
|
| 38 |
+
{
|
| 39 |
+
"prompt": "fix: update payment status handling",
|
| 40 |
+
"response": "diff --git a/src/payment.rs b/src/payment.rs\n..."
|
| 41 |
+
}
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
### Usage
|
| 45 |
+
|
| 46 |
+
```python
|
| 47 |
+
from datasets import load_dataset
|
| 48 |
+
|
| 49 |
+
# Load dataset
|
| 50 |
+
dataset = load_dataset("archit11/hyperswitch-issue-to-code2")
|
| 51 |
+
|
| 52 |
+
# Access train/test splits
|
| 53 |
+
train_data = dataset['train']
|
| 54 |
+
test_data = dataset['test']
|
| 55 |
+
|
| 56 |
+
# Example
|
| 57 |
+
print(train_data[0]['prompt'])
|
| 58 |
+
print(train_data[0]['response'])
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
### Training
|
| 62 |
+
|
| 63 |
+
This dataset is designed for fine-tuning code generation models on Rust commit-to-patch generation tasks.
|
| 64 |
+
|
| 65 |
+
Example training command:
|
| 66 |
+
```bash
|
| 67 |
+
python train_sft.py \
|
| 68 |
+
--dataset archit11/hyperswitch-issue-to-code2 \
|
| 69 |
+
--model Qwen/Qwen3-4B \
|
| 70 |
+
--output_dir ./qwen-rust-sft \
|
| 71 |
+
--use_4bit \
|
| 72 |
+
--use_lora
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
### Data Collection
|
| 76 |
+
|
| 77 |
+
The data was collected using PyDriller and tree-sitter for parsing Rust identifiers:
|
| 78 |
+
- Only commits with 20+ lines changed are included
|
| 79 |
+
- Rust-specific identifier tracking (functions, structs, enums, traits, impls, modules)
|
| 80 |
+
|
| 81 |
+
### Citation
|
| 82 |
+
|
| 83 |
+
If you use this dataset, please cite the Hyperswitch repository:
|
| 84 |
+
```
|
| 85 |
+
@misc{hyperswitch2024,
|
| 86 |
+
title={Hyperswitch},
|
| 87 |
+
author={Juspay},
|
| 88 |
+
year={2024},
|
| 89 |
+
url={https://github.com/juspay/hyperswitch}
|
| 90 |
+
}
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
### License
|
| 94 |
+
|
| 95 |
+
This dataset follows the same license as the Hyperswitch project.
|