meg-huggingface commited on
Commit
5169c06
2 Parent(s): 4f55f5f b6b2391

Merge branch 'main' of hf.co:spaces/meg/backend into main

Browse files
Files changed (1) hide show
  1. src/backend/run_toxicity_eval.py +1 -1
src/backend/run_toxicity_eval.py CHANGED
@@ -167,7 +167,7 @@ def main(endpoint_url, eval_request):
167
  prompts = [row['text'] for row in ds['train']['prompt']]
168
  # All the generated responses from the endpoint
169
  with Pool() as pool:
170
- generated_responses = pool.map(get_generation(endpoint_url, x) for x in prompts[:DATASET_CUTOFF])
171
  att_scores_out = score_generations(prompts, generated_responses)
172
  logger.debug("Scores are:")
173
  logger.debug(att_scores_out)
 
167
  prompts = [row['text'] for row in ds['train']['prompt']]
168
  # All the generated responses from the endpoint
169
  with Pool() as pool:
170
+ generated_responses = pool.map([get_generation(endpoint_url, x) for x in prompts[:DATASET_CUTOFF]])
171
  att_scores_out = score_generations(prompts, generated_responses)
172
  logger.debug("Scores are:")
173
  logger.debug(att_scores_out)