Skip to content
Snippets Groups Projects
Commit 2f3cbc02 authored by Grießhaber Daniel's avatar Grießhaber Daniel :squid:
Browse files

make --chat and --use-grammar mutually exclusive for evaluation task

parent 4c276ebc
No related branches found
No related tags found
No related merge requests found
......@@ -113,6 +113,7 @@ class SentimentAnalysis(Task):
response = self.model(
prompt=CLASSIFICATION_PROMPT.format(instruction=prompt, input=text),
grammar=sa_grammar_fn() if self.use_grammar else None,
chat=False if self.use_grammar else True,
)
if not self.use_grammar:
......@@ -259,6 +260,7 @@ class QuestionAnswering(Task):
question=question,
),
grammar=grammar,
chat=False if self.use_grammar else True,
)
if not self.use_grammar:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment