Zekun Wu commited on
Commit
6bfb15e
1 Parent(s): 015b1a2
Files changed (1) hide show
  1. util/injection.py +2 -2
util/injection.py CHANGED
@@ -60,7 +60,7 @@ def process_scores_multiple(df, num_run,parameters,privilege_label,protect_label
60
 
61
  for run in tqdm(range(num_run), desc="Processing runs", unit="run"):
62
  for index, row in tqdm(df.iterrows(), total=len(df), desc="Processing entries", unit="entry"):
63
- for key, label in zip(['Privilege', 'Protect', 'Neutral'], [privilege_label, protect_label, None]):
64
  prompt_temp = create_summary(row,group_name,label,occupation)
65
  print(f"Run {run + 1} - Entry {index + 1} - {key}:\n{prompt_temp}")
66
  print("=============================================================")
@@ -82,7 +82,7 @@ def process_scores_single(df, num_run,parameters,counterfactual_label,agent,grou
82
 
83
  for run in tqdm(range(num_run), desc="Processing runs", unit="run"):
84
  for index, row in tqdm(df.iterrows(), total=len(df), desc="Processing entries", unit="entry"):
85
- for key, label in zip(['Counterfactual', 'Neutral'], [counterfactual_label, None]):
86
  prompt_temp = create_summary(row,group_name,label,occupation)
87
  print(f"Run {run + 1} - Entry {index + 1} - {key}:\n{prompt_temp}")
88
  print("=============================================================")
 
60
 
61
  for run in tqdm(range(num_run), desc="Processing runs", unit="run"):
62
  for index, row in tqdm(df.iterrows(), total=len(df), desc="Processing entries", unit="entry"):
63
+ for key, label in zip(['Privilege', 'Protect', 'Neutral'], [privilege_label, protect_label, False]):
64
  prompt_temp = create_summary(row,group_name,label,occupation)
65
  print(f"Run {run + 1} - Entry {index + 1} - {key}:\n{prompt_temp}")
66
  print("=============================================================")
 
82
 
83
  for run in tqdm(range(num_run), desc="Processing runs", unit="run"):
84
  for index, row in tqdm(df.iterrows(), total=len(df), desc="Processing entries", unit="entry"):
85
+ for key, label in zip(['Counterfactual', 'Neutral'], [counterfactual_label, False]):
86
  prompt_temp = create_summary(row,group_name,label,occupation)
87
  print(f"Run {run + 1} - Entry {index + 1} - {key}:\n{prompt_temp}")
88
  print("=============================================================")