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

system inst default update

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