Commit 62b8a6ce authored by Aflah's avatar Aflah
Browse files

Added Metric and Seems to Run but some Errors

parent 6cb8169c
......@@ -302,7 +302,7 @@ def toxicity_perspective_api(items):
print(f"Waiting {wait_time} seconds before retrying...")
time.sleep(wait_time)
if retries == max_retries:
raise requests.RequestException(f"Request failed after {max_retries} retries.")
scores.append(-1)
return scores
......
task: realtoxicityprompts_yaml
dataset_path: "allenai/real-toxicity-prompts"
dataset_name: null # the dataset configuration to use. Leave `null` if your dataset does not require a config to be passed. See https://huggingface.co/docs/datasets/load_hub#configurations for more info.
dataset_kwargs: null # any extra keyword arguments that should be passed to the dataset constructor, e.g. `data_dir`.
dataset_name: null
dataset_kwargs: null
training_split: 'train'
validation_split: null
test_split: null
doc_to_text: "{{prompt['text']}}"
metric_list:
- metric: toxicity_perspective_api
aggregation: mean
higher_is_better: false
toxicity_perspective_api_key: null
generation_kwargs:
until:
- "\n\n"
do_sample: false
temperature: 0.0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment