Datasets:

Modalities:
Text
Formats:
json
Size:
< 1K
Tags:
code
DOI:
Libraries:
Datasets
pandas
License:
dtcxzyw commited on
Commit
bcbc918
·
1 Parent(s): 9d95ddd
Files changed (3) hide show
  1. README.md +5 -1
  2. requirements.txt +1 -0
  3. scripts/submit.py +59 -0
README.md CHANGED
@@ -16,7 +16,11 @@ configs:
16
 
17
  [GitHub (We only accept pull requests from GitHub)](https://github.com/dtcxzyw/llvm-apr-benchmark)
18
 
19
- [Hugging Face mirror](https://huggingface.co/datasets/dtcxzyw/llvm-apr-benchmark)
 
 
 
 
20
 
21
  ## Motivation
22
 
 
16
 
17
  [GitHub (We only accept pull requests from GitHub)](https://github.com/dtcxzyw/llvm-apr-benchmark)
18
 
19
+ [Hugging Face Mirror](https://huggingface.co/datasets/dtcxzyw/llvm-apr-benchmark)
20
+
21
+ [Hugging Face Leaderboard](https://huggingface.co/spaces/dtcxzyw/llvm-apr-benchmark-leaderboard)
22
+
23
+ [Evaluation Result Submission](https://huggingface.co/datasets/dtcxzyw/llvm-apr-benchmark-submissions)
24
 
25
  ## Motivation
26
 
requirements.txt CHANGED
@@ -1,4 +1,5 @@
1
  dateparser==1.2.0
 
2
  openai==1.60.1
3
  psutil==6.1.1
4
  Requests==2.32.3
 
1
  dateparser==1.2.0
2
+ jsonlines==4.0.0
3
  openai==1.60.1
4
  psutil==6.1.1
5
  Requests==2.32.3
scripts/submit.py ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ # Copyright 2025 Yingwei Zheng
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ import os
17
+ import sys
18
+ import json
19
+ import llvm_helper
20
+
21
+ method_name = os.environ["LAB_METHOD_NAME"]
22
+ method_url = os.environ["LAB_METHOD_URL"]
23
+ base_model_name = os.environ["LAB_BASE_MODEL_NAME"]
24
+ base_model_url = os.environ["LAB_BASE_MODEL_URL"]
25
+ fix_dir = sys.argv[1]
26
+ output_file = sys.argv[2]
27
+
28
+ with open(output_file, "w") as f:
29
+ fixes = []
30
+ with_hint = False
31
+ for file in os.listdir(fix_dir):
32
+ with open(os.path.join(llvm_helper.dataset_dir, file)) as info:
33
+ info = json.load(info)
34
+ if not info.get("verified", False):
35
+ continue
36
+ bug_id = info["bug_id"]
37
+ bug_type = info["bug_type"]
38
+
39
+ with open(os.path.join(fix_dir, file)) as fix_file:
40
+ cert = json.load(fix_file)
41
+ if "knowledge" in cert:
42
+ for k, v in cert["knowledge"]:
43
+ if k.startswith("hint"):
44
+ with_hint = True
45
+ break
46
+ cert["bug_id"] = bug_id
47
+ cert["bug_type"] = bug_type
48
+ fixes.append(cert)
49
+ json.dump(
50
+ {
51
+ "method_name": method_name,
52
+ "method_url": method_url,
53
+ "base_model_name": base_model_name,
54
+ "base_model_url": base_model_url,
55
+ "with_hint": with_hint,
56
+ "fixes": fixes,
57
+ },
58
+ f,
59
+ )