Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Elron Bandel <elron.bandel@ibm.com>
  • Loading branch information
elronbandel committed Feb 20, 2024
1 parent da300c6 commit 0424d9d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 34 deletions.
23 changes: 0 additions & 23 deletions src/unitxt/catalog/tasks/classification/multi_class/two_texts.json

This file was deleted.

18 changes: 7 additions & 11 deletions tests/library/test_recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def test_standard_recipe(self):
recipe = StandardRecipe(
card="cards.wnli",
template=InputOutputTemplate(
input_format="{premise}",
input_format="{text_a}",
output_format="{label}",
instruction="classify",
),
Expand All @@ -29,22 +29,18 @@ def test_standard_recipe(self):

for instance in stream["train"]:
print_dict(instance)
del instance["additional_inputs"]
self.assertDictEqual(
instance,
{
"metrics": ["metrics.accuracy"],
"metrics": [
"metrics.f1_micro",
"metrics.accuracy",
"metrics.f1_macro",
],
"source": "classify\n\nUser:I stuck a pin through a carrot. When I pulled the pin out, it had a hole.\nAgent:",
"target": "not entailment",
"references": ["not entailment"],
"additional_inputs": {
"key": ["choices", "premise", "hypothesis", "label"],
"value": [
"['entailment', 'not entailment']",
"I stuck a pin through a carrot. When I pulled the pin out, it had a hole.",
"The carrot had a hole.",
"not entailment",
],
},
"group": "unitxt",
"postprocessors": ["processors.to_string_stripped"],
},
Expand Down

0 comments on commit 0424d9d

Please sign in to comment.