alexjercan commited on
Commit
cc45734
·
1 Parent(s): 8b06de9

feat: dataset update

Browse files
Files changed (6) hide show
  1. README.md +0 -43
  2. bugnet.py +19 -10
  3. problem_descriptions.json +0 -3
  4. test.jsonl +0 -0
  5. train.jsonl +0 -3
  6. validation.jsonl +0 -3
README.md DELETED
@@ -1,43 +0,0 @@
1
- ---
2
- license: apache-2.0
3
- dataset_info:
4
- features:
5
- - name: problem_id
6
- dtype: string
7
- - name: language
8
- dtype: string
9
- - name: original_status
10
- dtype: string
11
- - name: original_src
12
- dtype: string
13
- - name: changed_src
14
- dtype: string
15
- - name: change
16
- dtype: string
17
- - name: i1
18
- dtype: uint32
19
- - name: i2
20
- dtype: uint32
21
- - name: j1
22
- dtype: uint32
23
- - name: j2
24
- dtype: uint32
25
- - name: error
26
- dtype: string
27
- - name: stderr
28
- dtype: string
29
- - name: description
30
- dtype: string
31
- splits:
32
- - name: train
33
- num_bytes: 244576002
34
- num_examples: 41255
35
- - name: validation
36
- num_bytes: 107794247
37
- num_examples: 20037
38
- - name: test
39
- num_bytes: 1676470
40
- num_examples: 740
41
- download_size: 233313636
42
- dataset_size: 354046719
43
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bugnet.py CHANGED
@@ -20,24 +20,33 @@ _HOMEPAGE = ""
20
  _LICENSE = ""
21
 
22
  _URL = "https://huggingface.co/datasets/alexjercan/bugnet/resolve/main/"
23
- _URLS = {
24
- "train": _URL + "train.jsonl",
25
- "validation": _URL + "validation.jsonl",
26
- "test": _URL + "test.jsonl",
27
- "descriptions": _URL + "problem_descriptions.json",
28
- }
 
 
 
29
 
30
 
31
  class Bugnet(datasets.GeneratorBasedBuilder):
32
  """TODO: Short description of my dataset."""
33
 
34
- VERSION = datasets.Version("1.2.0")
 
 
 
 
 
 
 
35
 
36
  def _info(self):
37
  features = datasets.Features(
38
  {
39
  "problem_id": datasets.Value("string"),
40
- "language": datasets.Value("string"),
41
  "original_status": datasets.Value("string"),
42
  "original_src": datasets.Value("string"),
43
  "changed_src": datasets.Value("string"),
@@ -61,7 +70,8 @@ class Bugnet(datasets.GeneratorBasedBuilder):
61
  )
62
 
63
  def _split_generators(self, dl_manager):
64
- data_dir = dl_manager.download_and_extract(_URLS)
 
65
  return [
66
  datasets.SplitGenerator(
67
  name=datasets.Split.TRAIN,
@@ -102,7 +112,6 @@ class Bugnet(datasets.GeneratorBasedBuilder):
102
 
103
  yield key, {
104
  "problem_id": data["problem_id"],
105
- "language": data["language"],
106
  "original_status": data["original_status"],
107
  "original_src": data["original_src"],
108
  "changed_src": data["changed_src"],
 
20
  _LICENSE = ""
21
 
22
  _URL = "https://huggingface.co/datasets/alexjercan/bugnet/resolve/main/"
23
+
24
+
25
+ def _mk_urls(language):
26
+ return {
27
+ "train": _URL + language + "_train.jsonl",
28
+ "validation": _URL + language + "_validation.jsonl",
29
+ "test": _URL + language + "_test.jsonl",
30
+ "descriptions": _URL + "problem_descriptions.json",
31
+ }
32
 
33
 
34
  class Bugnet(datasets.GeneratorBasedBuilder):
35
  """TODO: Short description of my dataset."""
36
 
37
+ VERSION = datasets.Version("1.3.0")
38
+
39
+ BUILDER_CONFIGS = [
40
+ datasets.BuilderConfig(name="Python", version=VERSION, description="This part of bugnet contains Python bugs"),
41
+ datasets.BuilderConfig(name="C++", version=VERSION, description="This part of bugnet contains C++ bugs"),
42
+ ]
43
+
44
+ DEFAULT_CONFIG_NAME = "Python"
45
 
46
  def _info(self):
47
  features = datasets.Features(
48
  {
49
  "problem_id": datasets.Value("string"),
 
50
  "original_status": datasets.Value("string"),
51
  "original_src": datasets.Value("string"),
52
  "changed_src": datasets.Value("string"),
 
70
  )
71
 
72
  def _split_generators(self, dl_manager):
73
+ urls = _mk_urls(self.config.name)
74
+ data_dir = dl_manager.download_and_extract(urls)
75
  return [
76
  datasets.SplitGenerator(
77
  name=datasets.Split.TRAIN,
 
112
 
113
  yield key, {
114
  "problem_id": data["problem_id"],
 
115
  "original_status": data["original_status"],
116
  "original_src": data["original_src"],
117
  "changed_src": data["changed_src"],
problem_descriptions.json DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:3f0a899d66846f186cdcfd399040a465fef992641949382a9bdbad33e7a67483
3
- size 14911770
 
 
 
 
test.jsonl DELETED
The diff for this file is too large to render. See raw diff
 
train.jsonl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:a7c2ac98c0523c650b491c784e47bc7f58f5ae62cb1931a40ba78d628f3ff947
3
- size 155538062
 
 
 
 
validation.jsonl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:bb53885f091c86f2e45f28199de950ae3c1417e270469391744376e12362ae7a
3
- size 61879173