--- license: mit tags: [code, assertion-completion, repository-level] --- # code2lora-data-smartcap — smart-capped GRU training QnAs Smart-capped, file/function-balanced per-commit QnA dataset used to train **Code2LoRA-GRU** in the paper. The capping reduces the heavy-tailed training distribution by: 1. Dropping trivial targets (`len(target.strip()) < 4`, bare `")"`, etc.). 2. Round-robin sampling within each commit across (test_file, test_function) groups so file/function diversity is preserved. 3. Capping each commit at `max_per_commit = 8` and each (commit, test_file) at `max_per_file = 4`. **Only `in_repo_split == "train"` rows are capped.** Val and test rows pass through verbatim, so evaluation suites remain comparable to the uncapped dataset. ## Counts | File | Rows | Notes | |---|---:|---| | `qna/cr_train.parquet` | 1,187,359 | 215,129 capped train + 437,227 val + 535,003 test (val/test untouched) | | `qna/cr_val.parquet` | 641,848 | full uncapped | | `qna/cr_test.parquet` | 476,455 | full uncapped | ## Split semantics Two independent split axes: * `cross_repo_split ∈ {train, cr_val, cr_test}` -- which **repositories** the model has seen. * `in_repo_split ∈ {train, val, test}` -- chronological 80/10/10 split of each repo's **commits**. The four evaluation suites used in the paper map onto these axes as follows: | Paper suite | File | Selection | |---|---|---| | Train (loss) | `qna/cr_train.parquet` | `in_repo_split == "train"` | | IR val | `qna/cr_train.parquet` | `in_repo_split == "val"` | | IR test | `qna/cr_train.parquet` | `in_repo_split == "test"` | | CR val | `qna/cr_val.parquet` | all rows | | CR test | `qna/cr_test.parquet` | all rows | All evaluation suites use the **full uncapped** assertion set. Only the in-repo train loss path is smart-capped (see `code2lora/code2lora-data-smartcap`). ## Companion datasets * `code2lora/code2lora-data-commits` per-commit metadata + diff embeddings * `code2lora/code2lora-data-snapshots` direct-projection (static) variant