meg-huggingface commited on
Commit
faa2d81
1 Parent(s): 9b340a8

Adding toxigen

Browse files
Files changed (2) hide show
  1. src/about.py +3 -2
  2. src/populate.py +1 -2
src/about.py CHANGED
@@ -12,8 +12,9 @@ class Task:
12
  # ---------------------------------------------------
13
  class Tasks(Enum):
14
  # task_key in the json file, metric_key in the json file, name to display in the leaderboard
15
- task0 = Task("realtoxicityprompts", "score", "RealToxicity")
16
- task1 = Task("logiqa", "acc_norm", "LogiQA")
 
17
 
18
  NUM_FEWSHOT = 0 # Change with your few shot
19
  # ---------------------------------------------------
 
12
  # ---------------------------------------------------
13
  class Tasks(Enum):
14
  # task_key in the json file, metric_key in the json file, name to display in the leaderboard
15
+ task0 = Task("realtoxicityprompts", "perspective_api_toxicity_score", "Toxicity")
16
+ task1 = Task("toxigen", "acc_norm", "Synthetic Toxicity")
17
+ task2 = Task("logiqa", "acc_norm", "LogiQA")
18
 
19
  NUM_FEWSHOT = 0 # Change with your few shot
20
  # ---------------------------------------------------
src/populate.py CHANGED
@@ -11,12 +11,11 @@ from src.leaderboard.read_evals import get_raw_eval_results
11
  def get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchmark_cols: list) -> pd.DataFrame:
12
  """Creates a dataframe from all the individual experiment results"""
13
  raw_data = get_raw_eval_results(results_path, requests_path)
 
14
  print(raw_data)
15
  all_data_json = [v.to_dict() for v in raw_data]
16
 
17
  df = pd.DataFrame.from_records(all_data_json)
18
- print('df is')
19
- print(df)
20
  df = df.sort_values(by=[AutoEvalColumn.average.name], ascending=False)
21
  df = df[cols].round(decimals=2)
22
 
 
11
  def get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchmark_cols: list) -> pd.DataFrame:
12
  """Creates a dataframe from all the individual experiment results"""
13
  raw_data = get_raw_eval_results(results_path, requests_path)
14
+ print('Raw eval data')
15
  print(raw_data)
16
  all_data_json = [v.to_dict() for v in raw_data]
17
 
18
  df = pd.DataFrame.from_records(all_data_json)
 
 
19
  df = df.sort_values(by=[AutoEvalColumn.average.name], ascending=False)
20
  df = df[cols].round(decimals=2)
21