"vscode:/vscode.git/clone" did not exist on "b31b1982776c20b4666930d57e0f04b945440fb0"
Commit 615352c0 authored by Konrad's avatar Konrad
Browse files

add system prompt hash to cache_key

parent 52df595f
...@@ -386,6 +386,11 @@ class Task(abc.ABC): ...@@ -386,6 +386,11 @@ class Task(abc.ABC):
cache_key = f"requests-{self._config.task}-{self.config.num_fewshot}shot-rank{rank}-world_size{world_size}" cache_key = f"requests-{self._config.task}-{self.config.num_fewshot}shot-rank{rank}-world_size{world_size}"
cache_key += "-chat_template" if apply_chat_template else "" cache_key += "-chat_template" if apply_chat_template else ""
cache_key += "-fewshot_as_multiturn" if fewshot_as_multiturn else "" cache_key += "-fewshot_as_multiturn" if fewshot_as_multiturn else ""
cache_key += (
f"-system_prompt_hash{utils.hash_string(system_instruction)}"
if system_instruction is not None
else ""
)
if lm is not None and hasattr(lm, "tokenizer"): if lm is not None and hasattr(lm, "tokenizer"):
cache_key += f"-{lm.tokenizer.name_or_path.replace('/', '__')}" cache_key += f"-{lm.tokenizer.name_or_path.replace('/', '__')}"
......
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