Commit 3369f887 authored by Konrad's avatar Konrad
Browse files

system inst default update

parent 9dfb58a3
......@@ -986,7 +986,7 @@ class ConfigurableTask(Task):
self,
doc: str,
num_fewshot: int,
system_instruction: str = "",
system_instruction: str = None,
apply_chat_template: bool = False,
tokenizer=None,
) -> str:
......@@ -1017,11 +1017,11 @@ class ConfigurableTask(Task):
description = utils.apply_template(self.config.description, doc)
# create system prompt based on the provided system instruction and description
if system_instruction and description:
if system_instruction is not None and description:
system_prompt = (
f"{system_instruction}{self.sampler.fewshot_delimiter}{description}"
)
elif system_instruction:
elif system_instruction is not None:
system_prompt = system_instruction
elif description:
system_prompt = description
......
......@@ -55,7 +55,7 @@ def simple_evaluate(
check_integrity: bool = False,
write_out: bool = False,
log_samples: bool = True,
system_instruction: str = "",
system_instruction: str = None,
apply_chat_template: bool = False,
gen_kwargs: Optional[str] = None,
task_manager: Optional[TaskManager] = None,
......@@ -325,7 +325,7 @@ def evaluate(
bootstrap_iters: Optional[int] = 100000,
write_out: bool = False,
log_samples: bool = True,
system_instruction: str = "",
system_instruction: str = None,
apply_chat_template: bool = False,
verbosity: str = "INFO",
):
......
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