fix test and pylint checks
This commit is contained in:
@@ -90,6 +90,7 @@ class OpenOrcaSystemDataPrompter(SystemDataPrompter):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def match_prompt_style(self):
|
def match_prompt_style(self):
|
||||||
|
# pylint: disable=duplicate-code
|
||||||
if self.prompt_style == PromptStyle.INSTRUCT.value:
|
if self.prompt_style == PromptStyle.INSTRUCT.value:
|
||||||
self.turn_format = "### User:\n{instruction}\n\n### Additional Context:\n{input}\n\n### Assistant:\n"
|
self.turn_format = "### User:\n{instruction}\n\n### Additional Context:\n{input}\n\n### Assistant:\n"
|
||||||
self.turn_no_input_format = "### User:\n{instruction}\n\n### Assistant:\n"
|
self.turn_no_input_format = "### User:\n{instruction}\n\n### Assistant:\n"
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ class AlpacaPrompter:
|
|||||||
self.match_prompt_style()
|
self.match_prompt_style()
|
||||||
|
|
||||||
def match_prompt_style(self):
|
def match_prompt_style(self):
|
||||||
|
# pylint: disable=duplicate-code
|
||||||
if self.prompt_style == PromptStyle.INSTRUCT.value:
|
if self.prompt_style == PromptStyle.INSTRUCT.value:
|
||||||
self.turn_format = "### Instruction:\n{instruction}\n\n### Input:\n{input}\n\n### Response:\n"
|
self.turn_format = "### Instruction:\n{instruction}\n\n### Input:\n{input}\n\n### Response:\n"
|
||||||
self.turn_no_input_format = (
|
self.turn_no_input_format = (
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ class AlpacaPrompterTest(unittest.TestCase):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
assert "use cot" in res
|
assert "use cot" in res
|
||||||
assert res.startswith("### System:")
|
assert res.startswith("SYSTEM:")
|
||||||
assert "### Instruction:" not in res
|
assert "### Instruction:" not in res
|
||||||
assert "### Input:" not in res
|
assert "### Input:" not in res
|
||||||
assert "alpacas" in res
|
assert "alpacas" in res
|
||||||
|
|||||||
Reference in New Issue
Block a user