File size: 2,016 Bytes
4106c3c
dc849a2
 
 
 
 
 
 
 
 
 
 
 
 
4106c3c
dc849a2
 
 
 
 
 
 
 
 
fad7c66
dc849a2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---
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**: 900
- **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-issue-to-code_v3")

# 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-issue-to-code_v3 \
    --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.