abhinav-joshi commited on
Commit
8011593
1 Parent(s): d3010bb

fix input verification

Browse files
Files changed (2) hide show
  1. submissions/baseline/results.json +133 -1
  2. uploads.py +17 -10
submissions/baseline/results.json CHANGED
@@ -1 +1,133 @@
1
- [{"Method": "SOTA", "Submitted By": "multiple", "Github Link": "exploration-lab.github.io/IL-TUR/", "L-NER": {"strict mF1": "48.58"}, "RR": {"mF1": "69.01"}, "CJPE": {"mF1": "81.31", "ROUGE-L": "56.00", "BLEU": "32.00"}, "BAIL": {"mF1": "81"}, "LSI": {"mF1": "28.08"}, "PCR": {"muF1@K": "39.15"}, "SUMM": {"ROUGE-L": "33.00", "BERTSCORE": "86.00"}, "L-MT": {"BLEU": "28.00", "GLEU": "32.00", "chrF++": "57.00"}}, {"Method": "BERT", "Submitted By": "multiple", "Github Link": "", "L-NER": {"strict mF1": "39.59"}, "RR": {"mF1": "58"}, "CJPE": {"mF1": "71.14", "ROUGE-L": "-", "BLEU": "-"}, "BAIL": {"mF1": "-"}, "LSI": {"mF1": "-"}, "PCR": {"muF1@K": "18.44"}, "SUMM": {"ROUGE-L": "9.24", "BERTSCORE": "-"}, "L-MT": {"BLEU": "-", "GLEU": "-", "chrF++": "-"}}, {"Method": "LegalBERT", "Submitted By": "multiple", "Github Link": "", "L-NER": {"strict mF1": "45.58"}, "RR": {"mF1": "54"}, "CJPE": {"mF1": "78.21", "ROUGE-L": "-", "BLEU": "-"}, "BAIL": {"mF1": "-"}, "LSI": {"mF1": "-"}, "PCR": {"muF1@K": "21.74"}, "SUMM": {"ROUGE-L": "8.67", "BERTSCORE": "-"}, "L-MT": {"BLEU": "-", "GLEU": "-", "chrF++": "-"}}, {"Method": "InLegalBERT", "Submitted By": "multiple", "Github Link": "", "L-NER": {"strict mF1": "48.58"}, "RR": {"mF1": "58"}, "CJPE": {"mF1": "81.31", "ROUGE-L": "-", "BLEU": "-"}, "BAIL": {"mF1": "-"}, "LSI": {"mF1": "-"}, "PCR": {"muF1@K": "26.23"}, "SUMM": {"ROUGE-L": "7.57", "BERTSCORE": "-"}, "L-MT": {"BLEU": "-", "GLEU": "-", "chrF++": "-"}}, {"Method": "GPT-3.5 (0-shot)", "Submitted By": "IL-TUR", "Github Link": "", "L-NER": {"strict mF1": "30.59"}, "RR": {"mF1": "30.95"}, "CJPE": {"mF1": "54.17", "ROUGE-L": "30.00", "BLEU": "8.00"}, "BAIL": {"mF1": "51.04"}, "LSI": {"mF1": "21.55"}, "PCR": {"muF1@K": "-"}, "SUMM": {"ROUGE-L": "21.00", "BERTSCORE": "85.00"}, "L-MT": {"BLEU": "23.00", "GLEU": "28.00", "chrF++": "42.00"}}, {"Method": "GPT-3.5 (1-shot)", "Submitted By": "IL-TUR", "Github Link": "", "L-NER": {"strict mF1": "23.68"}, "RR": {"mF1": "30.05"}, "CJPE": {"mF1": "51.46", "ROUGE-L": "29.00", "BLEU": "15.00"}, "BAIL": {"mF1": "46.35"}, "LSI": {"mF1": "22.61"}, "PCR": {"muF1@K": "-"}, "SUMM": {"ROUGE-L": "20.00", "BERTSCORE": "84.00"}, "L-MT": {"BLEU": "25.00", "GLEU": "28.00", "chrF++": "43.00"}}, {"Method": "GPT-3.5 (2-shot)", "Submitted By": "IL-TUR", "Github Link": "", "L-NER": {"strict mF1": "32.84"}, "RR": {"mF1": "30.31"}, "CJPE": {"mF1": "56.74", "ROUGE-L": "30.00", "BLEU": "11.00"}, "BAIL": {"mF1": "61"}, "LSI": {"mF1": "21.4"}, "PCR": {"muF1@K": "-"}, "SUMM": {"ROUGE-L": "22.00", "BERTSCORE": "84.00"}, "L-MT": {"BLEU": "26.00", "GLEU": "29.00", "chrF++": "43.00"}}, {"Method": "GPT-4 (0-shot)", "Submitted By": "IL-TUR", "Github Link": "", "L-NER": {"strict mF1": "13.65"}, "RR": {"mF1": "37.37"}, "CJPE": {"mF1": "68.29", "ROUGE-L": "40.00", "BLEU": "14.00"}, "BAIL": {"mF1": "51.46"}, "LSI": {"mF1": "23.99"}, "PCR": {"muF1@K": "-"}, "SUMM": {"ROUGE-L": "23.00", "BERTSCORE": "85.00"}, "L-MT": {"BLEU": "33.00", "GLEU": "36.00", "chrF++": "50.00"}}, {"Method": "GPT-4 (1-shot)", "Submitted By": "IL-TUR", "Github Link": "", "L-NER": {"strict mF1": "10.51"}, "RR": {"mF1": "37.43"}, "CJPE": {"mF1": "47.26", "ROUGE-L": "39.00", "BLEU": "16.00"}, "BAIL": {"mF1": "56.9"}, "LSI": {"mF1": "22.26"}, "PCR": {"muF1@K": "-"}, "SUMM": {"ROUGE-L": "16.00", "BERTSCORE": "81.00"}, "L-MT": {"BLEU": "35.00", "GLEU": "38.00", "chrF++": "52.00"}}, {"Method": "GPT-4 (2-shot)", "Submitted By": "IL-TUR", "Github Link": "", "L-NER": {"strict mF1": "24.03"}, "RR": {"mF1": "38.18"}, "CJPE": {"mF1": "60.44", "ROUGE-L": "43.00", "BLEU": "18.00"}, "BAIL": {"mF1": "66.67"}, "LSI": {"mF1": "20.53"}, "PCR": {"muF1@K": "-"}, "SUMM": {"ROUGE-L": "17.00", "BERTSCORE": "81.00"}, "L-MT": {"BLEU": "36.00", "GLEU": "39.00", "chrF++": "53.00"}}, {"Method": "GPT-5 (2-shot)", "Submitted By": "IL-TUR", "Github Link": "dummy submission", "L-NER": {"strict mF1": "-"}, "RR": {"mF1": "0.10"}, "CJPE": {"mF1": "-", "ROUGE-L": "-", "BLEU": "-"}, "BAIL": {"mF1": "0.02"}, "LSI": {"mF1": "0.26"}, "PCR": {"muF1@K": "0.63"}, "SUMM": {"ROUGE-L": "-", "BERTSCORE": "-"}, "L-MT": {"BLEU": "-", "GLEU": "-", "chrF++": "-"}}]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "Method": "SOTA",
4
+ "Submitted By": "multiple",
5
+ "Github Link": "exploration-lab.github.io/IL-TUR/",
6
+ "L-NER": {"strict mF1": "48.58"},
7
+ "RR": {"mF1": "69.01"},
8
+ "CJPE": {"mF1": "81.31", "ROUGE-L": "56.00", "BLEU": "32.00"},
9
+ "BAIL": {"mF1": "81"},
10
+ "LSI": {"mF1": "28.08"},
11
+ "PCR": {"muF1@K": "39.15"},
12
+ "SUMM": {"ROUGE-L": "33.00", "BERTSCORE": "86.00"},
13
+ "L-MT": {"BLEU": "28.00", "GLEU": "32.00", "chrF++": "57.00"}
14
+ },
15
+ {
16
+ "Method": "BERT",
17
+ "Submitted By": "multiple",
18
+ "Github Link": "",
19
+ "L-NER": {"strict mF1": "39.59"},
20
+ "RR": {"mF1": "58"},
21
+ "CJPE": {"mF1": "71.14", "ROUGE-L": "-", "BLEU": "-"},
22
+ "BAIL": {"mF1": "-"},
23
+ "LSI": {"mF1": "-"},
24
+ "PCR": {"muF1@K": "18.44"},
25
+ "SUMM": {"ROUGE-L": "9.24", "BERTSCORE": "-"},
26
+ "L-MT": {"BLEU": "-", "GLEU": "-", "chrF++": "-"}
27
+ },
28
+ {
29
+ "Method": "LegalBERT",
30
+ "Submitted By": "multiple",
31
+ "Github Link": "",
32
+ "L-NER": {"strict mF1": "45.58"},
33
+ "RR": {"mF1": "54"},
34
+ "CJPE": {"mF1": "78.21", "ROUGE-L": "-", "BLEU": "-"},
35
+ "BAIL": {"mF1": "-"},
36
+ "LSI": {"mF1": "-"},
37
+ "PCR": {"muF1@K": "21.74"},
38
+ "SUMM": {"ROUGE-L": "8.67", "BERTSCORE": "-"},
39
+ "L-MT": {"BLEU": "-", "GLEU": "-", "chrF++": "-"}
40
+ },
41
+ {
42
+ "Method": "InLegalBERT",
43
+ "Submitted By": "multiple",
44
+ "Github Link": "",
45
+ "L-NER": {"strict mF1": "48.58"},
46
+ "RR": {"mF1": "58"},
47
+ "CJPE": {"mF1": "81.31", "ROUGE-L": "-", "BLEU": "-"},
48
+ "BAIL": {"mF1": "-"},
49
+ "LSI": {"mF1": "-"},
50
+ "PCR": {"muF1@K": "26.23"},
51
+ "SUMM": {"ROUGE-L": "7.57", "BERTSCORE": "-"},
52
+ "L-MT": {"BLEU": "-", "GLEU": "-", "chrF++": "-"}
53
+ },
54
+ {
55
+ "Method": "GPT-3.5 (0-shot)",
56
+ "Submitted By": "IL-TUR",
57
+ "Github Link": "",
58
+ "L-NER": {"strict mF1": "30.59"},
59
+ "RR": {"mF1": "30.95"},
60
+ "CJPE": {"mF1": "54.17", "ROUGE-L": "30.00", "BLEU": "8.00"},
61
+ "BAIL": {"mF1": "51.04"},
62
+ "LSI": {"mF1": "21.55"},
63
+ "PCR": {"muF1@K": "-"},
64
+ "SUMM": {"ROUGE-L": "21.00", "BERTSCORE": "85.00"},
65
+ "L-MT": {"BLEU": "23.00", "GLEU": "28.00", "chrF++": "42.00"}
66
+ },
67
+ {
68
+ "Method": "GPT-3.5 (1-shot)",
69
+ "Submitted By": "IL-TUR",
70
+ "Github Link": "",
71
+ "L-NER": {"strict mF1": "23.68"},
72
+ "RR": {"mF1": "30.05"},
73
+ "CJPE": {"mF1": "51.46", "ROUGE-L": "29.00", "BLEU": "15.00"},
74
+ "BAIL": {"mF1": "46.35"},
75
+ "LSI": {"mF1": "22.61"},
76
+ "PCR": {"muF1@K": "-"},
77
+ "SUMM": {"ROUGE-L": "20.00", "BERTSCORE": "84.00"},
78
+ "L-MT": {"BLEU": "25.00", "GLEU": "28.00", "chrF++": "43.00"}
79
+ },
80
+ {
81
+ "Method": "GPT-3.5 (2-shot)",
82
+ "Submitted By": "IL-TUR",
83
+ "Github Link": "",
84
+ "L-NER": {"strict mF1": "32.84"},
85
+ "RR": {"mF1": "30.31"},
86
+ "CJPE": {"mF1": "56.74", "ROUGE-L": "30.00", "BLEU": "11.00"},
87
+ "BAIL": {"mF1": "61"},
88
+ "LSI": {"mF1": "21.4"},
89
+ "PCR": {"muF1@K": "-"},
90
+ "SUMM": {"ROUGE-L": "22.00", "BERTSCORE": "84.00"},
91
+ "L-MT": {"BLEU": "26.00", "GLEU": "29.00", "chrF++": "43.00"}
92
+ },
93
+ {
94
+ "Method": "GPT-4 (0-shot)",
95
+ "Submitted By": "IL-TUR",
96
+ "Github Link": "",
97
+ "L-NER": {"strict mF1": "13.65"},
98
+ "RR": {"mF1": "37.37"},
99
+ "CJPE": {"mF1": "68.29", "ROUGE-L": "40.00", "BLEU": "14.00"},
100
+ "BAIL": {"mF1": "51.46"},
101
+ "LSI": {"mF1": "23.99"},
102
+ "PCR": {"muF1@K": "-"},
103
+ "SUMM": {"ROUGE-L": "23.00", "BERTSCORE": "85.00"},
104
+ "L-MT": {"BLEU": "33.00", "GLEU": "36.00", "chrF++": "50.00"}
105
+ },
106
+ {
107
+ "Method": "GPT-4 (1-shot)",
108
+ "Submitted By": "IL-TUR",
109
+ "Github Link": "",
110
+ "L-NER": {"strict mF1": "10.51"},
111
+ "RR": {"mF1": "37.43"},
112
+ "CJPE": {"mF1": "47.26", "ROUGE-L": "39.00", "BLEU": "16.00"},
113
+ "BAIL": {"mF1": "56.9"},
114
+ "LSI": {"mF1": "22.26"},
115
+ "PCR": {"muF1@K": "-"},
116
+ "SUMM": {"ROUGE-L": "16.00", "BERTSCORE": "81.00"},
117
+ "L-MT": {"BLEU": "35.00", "GLEU": "38.00", "chrF++": "52.00"}
118
+ },
119
+ {
120
+ "Method": "GPT-4 (2-shot)",
121
+ "Submitted By": "IL-TUR",
122
+ "Github Link": "",
123
+ "L-NER": {"strict mF1": "24.03"},
124
+ "RR": {"mF1": "38.18"},
125
+ "CJPE": {"mF1": "60.44", "ROUGE-L": "43.00", "BLEU": "18.00"},
126
+ "BAIL": {"mF1": "66.67"},
127
+ "LSI": {"mF1": "20.53"},
128
+ "PCR": {"muF1@K": "-"},
129
+ "SUMM": {"ROUGE-L": "17.00", "BERTSCORE": "81.00"},
130
+ "L-MT": {"BLEU": "36.00", "GLEU": "39.00", "chrF++": "53.00"}
131
+ }
132
+ ]
133
+
uploads.py CHANGED
@@ -47,16 +47,11 @@ def input_verification(method_name, url, path_to_file, organisation, mail):
47
  ):
48
  return format_warning("Please fill all the fields.")
49
 
50
- # Verify email format
51
- _, parsed_mail = parseaddr(mail)
52
- if "@" not in parsed_mail:
53
- return format_warning("Please provide a valid email address.")
54
-
55
  # Check if file is attached
56
  if path_to_file is None:
57
  return format_warning("Please attach a file.")
58
 
59
- return parsed_mail
60
 
61
 
62
  def add_new_eval(
@@ -70,9 +65,21 @@ def add_new_eval(
70
  """Add a new evaluation to the leaderboard."""
71
 
72
  # Verify input
73
- parsed_mail = input_verification(method_name, url, path_to_file, organisation, mail)
74
- if parsed_mail.startswith("<p"): # If it's a warning message
75
- return parsed_mail
 
 
 
 
 
 
 
 
 
 
 
 
76
 
77
  # Process submission
78
  if SUBMISSION_FORMAT == "predictions":
@@ -109,5 +116,5 @@ def add_new_eval(
109
 
110
  return format_log(
111
  f"Method {method_name} submitted by {organisation} successfully. \n"
112
- "Please refresh the leaderboard, and wait a bit to see the score displayed"
113
  )
 
47
  ):
48
  return format_warning("Please fill all the fields.")
49
 
 
 
 
 
 
50
  # Check if file is attached
51
  if path_to_file is None:
52
  return format_warning("Please attach a file.")
53
 
54
+ return
55
 
56
 
57
  def add_new_eval(
 
65
  """Add a new evaluation to the leaderboard."""
66
 
67
  # Verify input
68
+ # Check if any field is empty
69
+ if any(
70
+ input == "" for input in [method_name, url, path_to_file, organisation, mail]
71
+ ):
72
+ return format_warning("Please fill all the fields.")
73
+
74
+ # Check if file is attached
75
+ if path_to_file is None:
76
+ return format_warning("Please attach a file.")
77
+
78
+ # Verify email format
79
+ _, parsed_mail = parseaddr(mail)
80
+ if "@" not in parsed_mail:
81
+ print(parseaddr(mail))
82
+ return format_warning("Please provide a valid email address.")
83
 
84
  # Process submission
85
  if SUBMISSION_FORMAT == "predictions":
 
116
 
117
  return format_log(
118
  f"Method {method_name} submitted by {organisation} successfully. \n"
119
+ "Please refresh the leaderboard, and wait for the evaluation results."
120
  )