File size: 3,040 Bytes
815b0bd
d5f928e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
815b0bd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d5f928e
 
 
 
 
 
 
815b0bd
588a588
 
 
86053d6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
---
language:
- en
license: cc-by-2.0
size_categories:
- 100K<n<1M
source_datasets:
- mrahman2025/OpenClassGen
task_categories:
- text-generation
pretty_name: OpenClassGen Structured v1
tags:
- code
- python
- class-level
- text
dataset_info:
  features:
  - name: id
    dtype: int64
  - name: repository_name
    dtype: string
  - name: file_path
    dtype: string
  - name: class_name
    dtype: string
  - name: gold_code
    dtype: string
  - name: v3_prompt_text
    dtype: string
  - name: v3_target_text
    dtype: string
  - name: imports
    dtype: string
  - name: class_docstring
    dtype: string
  - name: num_functions
    dtype: int64
  - name: num_cross_deps
    dtype: int64
  - name: parallelizable_bodies
    dtype: int64
  - name: docstring_coverage
    dtype: float64
  - name: parse_ok
    dtype: bool
  - name: parse_error
    dtype: string
  - name: source
    dtype: string
  - name: body_spans_json
    dtype: string
  splits:
  - name: train
    num_bytes: 2299548508
    num_examples: 316195
  - name: validation
    num_bytes: 76613499
    num_examples: 12205
  download_size: 633018866
  dataset_size: 2376162007
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
  - split: validation
    path: data/validation-*
---

# OpenClassGen Structured v1

Derived from [mrahman2025/OpenClassGen](https://huggingface.co/datasets/mrahman2025/OpenClassGen) (Rahman et al. 2025, [arXiv:2504.15564](https://arxiv.org/abs/2504.15564)).
License: CC BY 2.0 (same as upstream). Keep `repository_name` and `file_path` when redistributing.
Underlying GitHub repos may carry additional software licenses.

`gold_code` is upstream `human_written_code`.
We add parsed fields, body-span indices, and a Variant-3 prompt/target pair (`v3_prompt_text` / `v3_target_text`).
No unit tests. Splits are repository-disjoint (`train` / `validation`).

## Fields

| Field | Meaning |
| --- | --- |
| `id` | Upstream OpenClassGen id. |
| `repository_name` | GitHub `org/repo`. Split key. |
| `file_path` | Path inside the repo. |
| `class_name` | Class name (may be qualified). |
| `gold_code` | Gold class source (`human_written_code`). |
| `imports` | Imports parsed from gold (may be empty). |
| `class_docstring` | Class docstring from gold, if any. |
| `v3_prompt_text` | Prompt ending at `class ClassName:`: module docstring lists required methods (unordered); no method defs / no `pass`. |
| `v3_target_text` | Indented class body. `v3_prompt_text + v3_target_text` is a full file. |
| `body_spans_json` | JSON list of `{name, start_char, end_char}` over `gold_code` for method bodies. |
| `num_functions` | Method count. |
| `num_cross_deps` | Cross-method / field dependency edge count. |
| `parallelizable_bodies` | Count of mutually independent method bodies. |
| `docstring_coverage` | Fraction of methods with a docstring. |
| `parse_ok` | Gold / v3 render parsed during build. |
| `parse_error` | Error string if not `parse_ok`; else empty. |
| `source` | Always `mrahman2025/OpenClassGen`. |