Datasets:
The dataset viewer is not available for this split.
Error code: UnexpectedError
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
codeLens
codeLens brings together curated data from KodCode, TACO, and LeetCodeDataset for studying how code training affects generalization across tasks and algorithmic categories. We clean and organize the source data, add LLM-assisted category annotations to the KodCode portion, and provide SFT and RL configurations with reproducible category-ablation subsets.
What we contribute
- Data curation. We select and prepare source problems for training. For KodCode, this includes deduplication by original question, interface repair, static checks, and reference-solution execution checks, yielding 36,074 problems.
- Category annotation and organization. We use an LLM API to classify KodCode problems, retain the classification reasons and review records, and map the reviewed labels into ten categories. For TACO and LeetCodeDataset, we organize the existing upstream tags into seven ablation groups; these are not new API annotations.
- Support for controlled experiments. We provide SFT examples, RL prompts and execution-based reward tests, validation splits, and the recorded sample IDs used for category-removal experiments. This lets users compare training on the full corpus with training on a specified ablation subset.
The underlying problems, reference answers, and tests come from the credited upstream datasets. Our work is the curation, additional annotation, category mapping, and preparation of these research configurations.
Data configurations
| Configuration | Train | Validation |
|---|---|---|
kodcode_sft |
35,974 | 100 |
kodcode_rl |
35,974 | 100 |
taco_leetcode_sft |
21,779 | 100 |
taco_leetcode_rl |
17,249 | 100 |
Choose an SFT configuration for supervised training on reference answers, or an RL configuration for training with execution-based rewards. KodCode SFT and RL share the same problems and split membership; their row counts should not be added together as distinct problems. The two data families retain their own category systems.
Quick start
After downloading this repository to a folder named dataset:
from datasets import load_dataset
train = load_dataset("./dataset", "kodcode_sft", split="train")
print(train[0]["messages"])
# Select problems with a particular primary category.
dp = train.filter(lambda row: row["primary_category"] == "dynamic_programming")
To load from Hugging Face directly, replace ./dataset with the repository ID
shown on the dataset page (owner/Code-generalization).
| Use | Main fields |
|---|---|
| SFT | messages, or the text pair prompt and response |
| RL | prompt (a list of messages) and reward_model.ground_truth (tests for the scorer) |
| Category analysis | primary_category; KodCode annotation fields or TACO/LeetCode overlap_categories |
Apply the target model's template at training time. Classification reasons and reward tests are not SFT targets and should not be appended to training prompts.
Category annotations
KodCode records include a primary category, auxiliary techniques, a short classification reason, and annotation provenance. Across its 36,074 problems, 7,564 records are marked as reviewed and 1,677 as changed during review. The released ten-category labels are a deterministic mapping of the reviewed earlier labels. See KodCode notes for the model records and field definitions.
A real annotation, showing selected fields:
{
"problem_id": "Algorithm_12700_C",
"primary_category": "dynamic_programming",
"techniques": ["dp_table", "lcs_reconstruction", "backtracking"],
"rationale": "Builds an LCS length table and backtracks to reconstruct the subsequence."
}
KodCode's main ablations remove the selected primary category. TACO/LeetCode ablations remove problems when any mapped category matches the removed group. Use the recorded memberships to reproduce the experimental subsets; a simple category filter does not reproduce their additional sampling. Export commands are in the KodCode and TACO/LeetCode notes.
Quality and usage notes
- All released KodCode problems carry a historical reference-execution-pass flag. In TACO/LeetCode RL training data, 11,587 records are marked as reference-execution-verified and 5,662 as structural-only. Passing the supplied tests does not establish correctness on every possible input.
- KodCode's fixed 100-problem validation set comes from Light-RL-10K, whereas its training set combines two KodCode sources. TACO SFT's 100-problem holdout was added for this release; the other splits preserve the historical setup.
- TACO SFT and RL were separate experiments, not a shared SFT-to-RL partition. There are cross-configuration overlaps; see the split notes before combining them.
- Reward execution requires Linux and an isolated environment. See verification notes for the two reward rules and execution limits. Loading the dataset does not execute the problem code.
To check the local release, run these commands from the repository root:
pip install -r requirements.txt
python scripts/validate_release.py --hf
Sources and license
Please credit the original KodCode, TACO, and LeetCodeDataset work when using their data. Source repositories and attribution are listed in NOTICE. Source-specific terms remain in effect; see LICENSE, including the non-commercial condition on the KodCode-derived portion.
- Downloads last month
- 103