Upload structurally-vacuous-filtered methods2test_small (train split cleaned, val/test unchanged)
Browse files- README.md +108 -0
- data/test-00000-of-00001.parquet +3 -0
- data/train-00000-of-00001.parquet +3 -0
- data/validation-00000-of-00001.parquet +3 -0
- filter_stats.json +35 -0
README.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: mit
|
| 5 |
+
task_categories:
|
| 6 |
+
- text-generation
|
| 7 |
+
tags:
|
| 8 |
+
- code
|
| 9 |
+
- java
|
| 10 |
+
- unit-testing
|
| 11 |
+
- methods2test
|
| 12 |
+
configs:
|
| 13 |
+
- config_name: default
|
| 14 |
+
data_files:
|
| 15 |
+
- split: train
|
| 16 |
+
path: data/train-*
|
| 17 |
+
- split: validation
|
| 18 |
+
path: data/validation-*
|
| 19 |
+
- split: test
|
| 20 |
+
path: data/test-*
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
# methods2test_small_cleaned
|
| 24 |
+
|
| 25 |
+
A **structurally-vacuous-filtered** copy of the `train` split of
|
| 26 |
+
[`andstor/methods2test_small`](https://huggingface.co/datasets/andstor/methods2test_small)
|
| 27 |
+
(context config `fm+fc+c+m+f+t+tc`, the one actually used to fine-tune models in
|
| 28 |
+
[andstor/peft-unit-test-generation-replication-package](https://github.com/andstor/peft-unit-test-generation-replication-package)).
|
| 29 |
+
Produced for the investigation in
|
| 30 |
+
[lhnam/PEFT — FINDINGS.md](https://github.com) (`FINDINGS.md` §1.2, §4 item 2),
|
| 31 |
+
which found that **17.8% of the real fine-tuning targets are structurally
|
| 32 |
+
vacuous** (no assertion, empty, or tautological) and hypothesized this is a
|
| 33 |
+
driver of the "convergence attractor" collapse seen when fine-tuning code LLMs
|
| 34 |
+
for JUnit test generation.
|
| 35 |
+
|
| 36 |
+
## What changed vs. the original
|
| 37 |
+
|
| 38 |
+
| Split | Original rows | This dataset | Vacuous rate |
|
| 39 |
+
|---|---|---|---|
|
| 40 |
+
| `train` | 7,440 | **6,124** (vacuous rows dropped) | 17.7% removed |
|
| 41 |
+
| `validation` | 953 | 953 (**unchanged**) | 15.2% (left in, for fair eval_loss) |
|
| 42 |
+
| `test` | 1,017 | 1,017 (**unchanged**) | 16.9% (left in) |
|
| 43 |
+
|
| 44 |
+
Only `train` is filtered. `validation` and `test` are byte-identical to the
|
| 45 |
+
source dataset's `fm+fc+c+m+f+t+tc` config — the point of this dataset is to
|
| 46 |
+
isolate the effect of *training on* cleaner targets while still measuring
|
| 47 |
+
`eval_loss` / benchmark success against the real, unfiltered data distribution.
|
| 48 |
+
Filtering only the split a model actually learns from, and leaving evaluation
|
| 49 |
+
untouched, is what makes a before/after comparison causally meaningful.
|
| 50 |
+
|
| 51 |
+
## Filtering method
|
| 52 |
+
|
| 53 |
+
Each `target` (the reference JUnit test) is classified as vacuous if it does
|
| 54 |
+
**not** contain a real, non-tautological `assert*`/`fail`/`verify` call:
|
| 55 |
+
|
| 56 |
+
```python
|
| 57 |
+
ASSERT_RE = re.compile(r"\b(assert\w*|fail|verify\w*)\s*\(", re.IGNORECASE)
|
| 58 |
+
TAUTOLOGY_RE = re.compile(
|
| 59 |
+
r"assert(true)\s*\(\s*true\s*[,)]|assert(false)\s*\(\s*false\s*[,)]|"
|
| 60 |
+
r'assertequals\s*\(\s*([A-Za-z0-9_."\']+)\s*,\s*\3\s*[,)]',
|
| 61 |
+
re.IGNORECASE,
|
| 62 |
+
)
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
Targets under 15 characters are also treated as vacuous ("empty"). This is the
|
| 66 |
+
exact classifier used throughout the source investigation (see
|
| 67 |
+
`scripts/filter_vacuous_training_data.py` in the repo above), applied here with
|
| 68 |
+
`--mode drop`.
|
| 69 |
+
|
| 70 |
+
Breakdown of the original `train` split before filtering:
|
| 71 |
+
|
| 72 |
+
| Label | Count | % |
|
| 73 |
+
|---|---|---|
|
| 74 |
+
| `has_real_assert` (kept) | 6,124 | 82.3% |
|
| 75 |
+
| `no_assert` | 1,278 | 17.2% |
|
| 76 |
+
| `tautological_assert` | 25 | 0.3% |
|
| 77 |
+
| `empty` | 13 | 0.2% |
|
| 78 |
+
| **vacuous total (dropped)** | **1,316** | **17.7%** |
|
| 79 |
+
|
| 80 |
+
(Matches `FINDINGS.md`'s independently-reported 17.8% to within rounding —
|
| 81 |
+
recomputed directly from this dataset's own source parquet.)
|
| 82 |
+
|
| 83 |
+
## Columns
|
| 84 |
+
|
| 85 |
+
- `id` (string) — original row id from `andstor/methods2test_small`.
|
| 86 |
+
- `source` (string) — the prompt/context (unchanged).
|
| 87 |
+
- `target` (string) — the reference JUnit test (the fine-tuning label).
|
| 88 |
+
|
| 89 |
+
No `weight` column — this is the `drop` variant, not `downweight`. See the
|
| 90 |
+
source script if you want a down-weighted variant instead.
|
| 91 |
+
|
| 92 |
+
## Intended use
|
| 93 |
+
|
| 94 |
+
Point a fine-tuning run's `TRAIN_DATASET` at this repo (config `default`) in
|
| 95 |
+
place of `andstor/methods2test_small` (`fm+fc+c+m+f+t+tc`), keeping everything
|
| 96 |
+
else — model, LoRA config, epochs, learning rate, validation split — identical,
|
| 97 |
+
to test whether removing the training-time shortcut narrows or removes the
|
| 98 |
+
post-fine-tuning "convergence attractor" documented in the source repo's
|
| 99 |
+
`FINDINGS.md`. This is one experiment in an ongoing, self-correcting
|
| 100 |
+
investigation — see that document for the full methodology, caveats, and
|
| 101 |
+
history of revisions before citing any number from this dataset card in a
|
| 102 |
+
paper.
|
| 103 |
+
|
| 104 |
+
## Provenance
|
| 105 |
+
|
| 106 |
+
- Source dataset: [`andstor/methods2test_small`](https://huggingface.co/datasets/andstor/methods2test_small), config `fm+fc+c+m+f+t+tc`, revision confirmed via that dataset's own commit history.
|
| 107 |
+
- Source paper / replication package: [andstor/peft-unit-test-generation-replication-package](https://github.com/andstor/peft-unit-test-generation-replication-package).
|
| 108 |
+
- License inherited as MIT from the source dataset.
|
data/test-00000-of-00001.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1baf6914056f2cafeadd0a9f5fab8b89165be094da980cd471ad86e78c62b85a
|
| 3 |
+
size 882540
|
data/train-00000-of-00001.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0adf0683139bb839fe562493a085b8d9e9b75efa3c4291b3867e76833fe18e1c
|
| 3 |
+
size 5380160
|
data/validation-00000-of-00001.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:59d7e47b80d9c9dfcb713f0328f83a3f24d6465f6430642ff9fa11809b4a5ab4
|
| 3 |
+
size 858449
|
filter_stats.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"validation": {
|
| 3 |
+
"n": 953,
|
| 4 |
+
"counts": {
|
| 5 |
+
"has_real_assert": 808,
|
| 6 |
+
"no_assert": 140,
|
| 7 |
+
"empty": 1,
|
| 8 |
+
"tautological_assert": 4
|
| 9 |
+
},
|
| 10 |
+
"vacuous_pct": 15.2
|
| 11 |
+
},
|
| 12 |
+
"test": {
|
| 13 |
+
"n": 1017,
|
| 14 |
+
"counts": {
|
| 15 |
+
"has_real_assert": 845,
|
| 16 |
+
"no_assert": 168,
|
| 17 |
+
"tautological_assert": 3,
|
| 18 |
+
"empty": 1
|
| 19 |
+
},
|
| 20 |
+
"vacuous_pct": 16.9
|
| 21 |
+
},
|
| 22 |
+
"train_original": {
|
| 23 |
+
"n": 7440,
|
| 24 |
+
"counts": {
|
| 25 |
+
"has_real_assert": 6124,
|
| 26 |
+
"no_assert": 1278,
|
| 27 |
+
"tautological_assert": 25,
|
| 28 |
+
"empty": 13
|
| 29 |
+
},
|
| 30 |
+
"vacuous_pct": 17.7
|
| 31 |
+
},
|
| 32 |
+
"train_cleaned": {
|
| 33 |
+
"n": 6124
|
| 34 |
+
}
|
| 35 |
+
}
|