galtimur commited on
Commit
0c58008
·
verified ·
1 Parent(s): fe82027

Update src/leaderboard_formatting.py

Browse files
Files changed (1) hide show
  1. src/leaderboard_formatting.py +11 -1
src/leaderboard_formatting.py CHANGED
@@ -1,5 +1,6 @@
1
  from typing import List
2
 
 
3
  COLUMNS_PRETTY = {
4
  "bleu": "BLEU",
5
  "chrf": "ChrF",
@@ -25,7 +26,7 @@ COLUMNS_PRETTY = {
25
  "context": "Context",
26
  }
27
 
28
-
29
  METRICS_PER_TASK = {
30
  "commit_message_generation": [
31
  "BLEU",
@@ -58,6 +59,9 @@ METRICS_PER_TASK = {
58
  "ChrF",
59
  "API Recall",
60
  ]
 
 
 
61
  }
62
 
63
 
@@ -67,6 +71,7 @@ SORT_COLUMN_PER_TASK = {
67
  "bug_localization": "Model Name",
68
  "module_summarization": "CompScore",
69
  "library_based_code_generation": "API Recall",
 
70
  }
71
 
72
 
@@ -83,6 +88,9 @@ def get_columns_per_task(task_id: str) -> List[str]:
83
  if task_id == 'library_based_code_generation':
84
  return ["Model Name", "Context"] + metrics_per_task + ["Availability", "Submitted By", "Resources"]
85
 
 
 
 
86
  return ["Model Name", "Context Size", "Availability"] + metrics_per_task + ["Submitted By", "Resources"]
87
 
88
 
@@ -92,4 +100,6 @@ def get_types_per_task(task_id: str) -> List[str]:
92
  return ["html", "markdown", "markdown", "html"] + ["number" for _ in metrics_per_task] + ["markdown", "markdown", "html"]
93
  if task_id == 'bug_localization':
94
  return ["html", "markdown", "markdown", "html"] + ["number" for _ in metrics_per_task] + ["markdown", "html"]
 
 
95
  return ["html", "markdown", "markdown"] + ["number" for _ in metrics_per_task] + ["markdown", "html"]
 
1
  from typing import List
2
 
3
+ # Common dictionary to map the columns names
4
  COLUMNS_PRETTY = {
5
  "bleu": "BLEU",
6
  "chrf": "ChrF",
 
26
  "context": "Context",
27
  }
28
 
29
+ # Add your metrics
30
  METRICS_PER_TASK = {
31
  "commit_message_generation": [
32
  "BLEU",
 
59
  "ChrF",
60
  "API Recall",
61
  ]
62
+ "ci_builds_repair": [
63
+ "Pass@1",
64
+ ]
65
  }
66
 
67
 
 
71
  "bug_localization": "Model Name",
72
  "module_summarization": "CompScore",
73
  "library_based_code_generation": "API Recall",
74
+ "ci_builds_repair": "Pass@1"
75
  }
76
 
77
 
 
88
  if task_id == 'library_based_code_generation':
89
  return ["Model Name", "Context"] + metrics_per_task + ["Availability", "Submitted By", "Resources"]
90
 
91
+ if task_id == 'ci_builds_repair':
92
+ return ["Model Name", "Context Size"] + metrics_per_task + ["Availability", "Submitted By", "Resources"]
93
+
94
  return ["Model Name", "Context Size", "Availability"] + metrics_per_task + ["Submitted By", "Resources"]
95
 
96
 
 
100
  return ["html", "markdown", "markdown", "html"] + ["number" for _ in metrics_per_task] + ["markdown", "markdown", "html"]
101
  if task_id == 'bug_localization':
102
  return ["html", "markdown", "markdown", "html"] + ["number" for _ in metrics_per_task] + ["markdown", "html"]
103
+ if task_id == 'ci_builds_repair':
104
+ return ["html", "markdown"] + ["number" for _ in metrics_per_task] + ["markdown", "markdown", "html"]
105
  return ["html", "markdown", "markdown"] + ["number" for _ in metrics_per_task] + ["markdown", "html"]