Datasets:
Upload BUILD.md with huggingface_hub
Browse files
BUILD.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# dataset_v2 — CodeNet Java compile errors, source-name aware
|
| 2 |
+
|
| 3 |
+
Status: **compiled corpus, unlabelled**. Published at
|
| 4 |
+
<https://huggingface.co/datasets/criyle/codenet-compile-errors-v2> (private
|
| 5 |
+
false). Do not mix it with `dataset_v1/`: v1 uses the old `Main.java` convention
|
| 6 |
+
and the 65-leaf v1 taxonomy; v2 has no labels yet.
|
| 7 |
+
|
| 8 |
+
## Build
|
| 9 |
+
|
| 10 |
+
| Step | Command / source |
|
| 11 |
+
|---|---|
|
| 12 |
+
| Source | `iNeil77/CodeNet`, Java split |
|
| 13 |
+
| Filter | `status == "Compile Error"` (53,023 submissions) |
|
| 14 |
+
| Sandbox | `http://10.0.0.162:5050`, OpenJDK 21.0.12.1 |
|
| 15 |
+
| Compile | javac under the declared public top-level class name; `Main.java` fallback |
|
| 16 |
+
| Build | `uploader/04_build_dataset_v2.py` |
|
| 17 |
+
| Publish | `uploader/05_publish_v2.py --repo criyle/codenet-compile-errors-v2` |
|
| 18 |
+
|
| 19 |
+
## Result
|
| 20 |
+
|
| 21 |
+
| Outcome | Rows |
|
| 22 |
+
|---|---:|
|
| 23 |
+
| Ingested `Compile Error` submissions | 53,023 |
|
| 24 |
+
| Compiled cleanly once named after the class (file-name artefacts) | **18,465** |
|
| 25 |
+
| Still failing (the corpus) | **34,555** |
|
| 26 |
+
| javac internal crashes (excluded) | 3 |
|
| 27 |
+
| Rows with no `error:` line | **0** |
|
| 28 |
+
|
| 29 |
+
The source-name fix is the main difference from v1: `s053550749`, for example,
|
| 30 |
+
was a `Class name mismatch with file name` row under `Main.java`; it compiles
|
| 31 |
+
cleanly as `MyClass.java` and is excluded here. Of the 12,208 v1 rows labelled
|
| 32 |
+
`Class name mismatch with file name`, **10,741 now compile cleanly** and **944
|
| 33 |
+
still fail** under the declared name (132 of the remaining corpus rows are
|
| 34 |
+
multiple-public-class errors, where no single file name satisfies javac).
|
| 35 |
+
|
| 36 |
+
## Corpus columns
|
| 37 |
+
|
| 38 |
+
`row_id, sid, submission_id, pid, problem_id, uid, user_id, date, date_iso,
|
| 39 |
+
source_name, code, compilemessage, compile_status, exit_code, javac_version,
|
| 40 |
+
category, label_status, taxonomy_version, session_id, session_6h, source,
|
| 41 |
+
original_status, code_size`
|
| 42 |
+
|
| 43 |
+
- `category` is empty and `label_status=unlabelled`; `taxonomy_version=2.1`.
|
| 44 |
+
- `session_id` is a `(user, problem)` 2-hour session, computed over the **full**
|
| 45 |
+
Java split (accepted submissions included); `session_6h` is the 6-hour variant.
|
| 46 |
+
- 7,251 users, 1,747 problems, **20,567 sessions** (mean 1.68, max 28 rows),
|
| 47 |
+
100% session coverage.
|
| 48 |
+
- Date range 2010-01-04 → 2020-10-01.
|
| 49 |
+
|
| 50 |
+
## Harness bug found and fixed during the build
|
| 51 |
+
|
| 52 |
+
The stock `go_judge` client asks the sandbox to copy out `Main.class`. When a
|
| 53 |
+
clean submission declares only package-private classes (e.g. `class q2`) it
|
| 54 |
+
produces `q2.class`, and go-judge returns
|
| 55 |
+
`File Error: open Main.class: no such file` even though javac exited 0. The first
|
| 56 |
+
pass therefore classified **3,583 clean submissions as `compile_error`**. A
|
| 57 |
+
compile-only request with no `copyOutCached` rechecked those rows: **3,580 were
|
| 58 |
+
clean, 3 were real errors**. The final corpus has 0 rows without an `error:` line.
|
| 59 |
+
The three `An exception has occurred in the compiler (21.0.12.1)` rows are
|
| 60 |
+
excluded as `compiler_crash`.
|
| 61 |
+
|
| 62 |
+
## Files
|
| 63 |
+
|
| 64 |
+
- `corpus_v2.parquet` — 34,555 still-failing submissions (the published train split)
|
| 65 |
+
- `compiled_all.parquet` — 53,023 compile attempts, including artefacts and crashes
|
| 66 |
+
- `session_map_all.parquet` — sessions over the full Java split
|
| 67 |
+
- `source_manifest.json` — counts and SHA-256 hashes
|
| 68 |
+
- `categories.v2.yaml` — active v2.1 taxonomy
|
| 69 |
+
- `codenet_v2.db` — resumable build DB (gitignored)
|
| 70 |
+
|
| 71 |
+
## Reproduce
|
| 72 |
+
|
| 73 |
+
```bash
|
| 74 |
+
.venv/bin/python uploader/04_build_dataset_v2.py
|
| 75 |
+
.venv/bin/python uploader/04_build_dataset_v2.py --recheck-no-error
|
| 76 |
+
.venv/bin/python uploader/04_build_dataset_v2.py --export-only
|
| 77 |
+
.venv/bin/python uploader/05_publish_v2.py --dry-run
|
| 78 |
+
```
|