metadata
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 repository.
Dataset Summary
- Total Examples: 231
- Language: Rust
- Source: Hyperswitch GitHub repository
- Format: Prompt-response pairs for supervised fine-tuning (SFT)
Data Fields
prompt: The commit message describing the changeresponse: The git patch/diff showing the actual code changes
Example
{
"prompt": "fix: update payment status handling",
"response": "diff --git a/src/payment.rs b/src/payment.rs\n..."
}
Usage
from datasets import load_dataset
# Load dataset
dataset = load_dataset("archit11/hyperswitch-issue-to-code2")
# 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:
python train_sft.py \
--dataset archit11/hyperswitch-issue-to-code2 \
--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.