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