Merge branch 'main' of hf.co:spaces/meg/backend into main
Browse files
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)
|