From 229b9165aacc1fe4ea7b2e8f0508bc4822ce808d Mon Sep 17 00:00:00 2001 From: Wing Lian Date: Mon, 7 Aug 2023 09:36:29 -0400 Subject: [PATCH] fix test and pylint checks --- src/axolotl/prompt_strategies/alpaca_w_system.py | 1 + src/axolotl/prompters.py | 1 + tests/test_prompters.py | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/axolotl/prompt_strategies/alpaca_w_system.py b/src/axolotl/prompt_strategies/alpaca_w_system.py index 134b446fd..a4c827693 100644 --- a/src/axolotl/prompt_strategies/alpaca_w_system.py +++ b/src/axolotl/prompt_strategies/alpaca_w_system.py @@ -90,6 +90,7 @@ class OpenOrcaSystemDataPrompter(SystemDataPrompter): """ def match_prompt_style(self): + # pylint: disable=duplicate-code 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_no_input_format = "### User:\n{instruction}\n\n### Assistant:\n" diff --git a/src/axolotl/prompters.py b/src/axolotl/prompters.py index facac17b6..5187fcf92 100644 --- a/src/axolotl/prompters.py +++ b/src/axolotl/prompters.py @@ -36,6 +36,7 @@ class AlpacaPrompter: self.match_prompt_style() def match_prompt_style(self): + # pylint: disable=duplicate-code if self.prompt_style == PromptStyle.INSTRUCT.value: self.turn_format = "### Instruction:\n{instruction}\n\n### Input:\n{input}\n\n### Response:\n" self.turn_no_input_format = ( diff --git a/tests/test_prompters.py b/tests/test_prompters.py index 112f25d33..6c5b8f27c 100644 --- a/tests/test_prompters.py +++ b/tests/test_prompters.py @@ -70,7 +70,7 @@ class AlpacaPrompterTest(unittest.TestCase): ) ) assert "use cot" in res - assert res.startswith("### System:") + assert res.startswith("SYSTEM:") assert "### Instruction:" not in res assert "### Input:" not in res assert "alpacas" in res