ethos_binary
Note
ID: catalog.cards.ethos_binary | Type: TaskCard
{
"loader": {
"name": "binary",
"path": "ethos",
"type": "load_hf"
},
"preprocess_steps": [
{
"page_size": 1000000,
"type": "shuffle"
},
{
"mix": {
"test": "train[80%]",
"train": "train[20%]"
},
"type": "split_random_mix"
},
{
"mappers": {
"label": {
"0": "not hate speech",
"1": "hate speech"
}
},
"type": "map_instance_values"
},
{
"fields": {
"classes": [
"not hate speech",
"hate speech"
],
"text_type": "sentence",
"type_of_class": "hate speech"
},
"type": "add_fields"
}
],
"task": "tasks.classification.multi_class",
"templates": {
"items": [
{
"input_format": "Given this {text_type}: {text}. Classify if it contains {type_of_class}. classes: {classes}.",
"output_format": "{label}",
"postprocessors": [
"processors.take_first_non_empty_line"
],
"type": "input_output_template"
},
{
"input_format": "Does the following {text_type} contains {type_of_class}? Answer only by choosing one of the options {classes}. {text_type}: {text}.",
"output_format": "{label}",
"postprocessors": [
"processors.take_first_non_empty_line"
],
"type": "input_output_template"
},
{
"input_format": "Given this {text_type}: {text}. Classify if it contains {type_of_class}. classes: {classes}. I would classify this {text_type} as: ",
"output_format": "{label}",
"postprocessors": [
"processors.take_first_non_empty_line",
"processors.lower_case_till_punc"
],
"type": "input_output_template"
},
{
"input_format": "Given this {text_type}: {text}. Classify if it contains {type_of_class}. classes: {classes}. I would classify this {text_type} as: ",
"output_format": "{label}",
"postprocessors": [
"processors.take_first_non_empty_line",
"processors.hate_speech_or_not_hate_speech"
],
"type": "input_output_template"
}
],
"type": "templates_list"
},
"type": "task_card"
}