Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

renaming tests

klopsahlong8e13bd903326
diff --git a/tests/teleprompt/test_signature_opt.py b/tests/teleprompt/test_copro_optimizer.py
similarity index 100%
rename from tests/teleprompt/test_signature_opt.py
rename to tests/teleprompt/test_copro_optimizer.py
diff --git a/tests/teleprompt/test_signature_opt_bayesian.py b/tests/teleprompt/test_mipro_optimizer.py
similarity index 95%
rename from tests/teleprompt/test_signature_opt_bayesian.py
rename to tests/teleprompt/test_mipro_optimizer.py
index c1cb61de0..17e94a580 100644
--- a/tests/teleprompt/test_signature_opt_bayesian.py
+++ b/tests/teleprompt/test_mipro_optimizer.py
@@ -52,19 +52,12 @@ class ConditionalLM(LM):
elif prompt.endswith("Summary:"):
answer = " summarizing..."
else:
- pairs = re.findall(r"Input: (.*)\nOutput: (.*)", prompt)
- # pairs = re.findall(r"(?<=\n|^)---\n\nInput: (.*?)\nOutput: (.*?)(?=\n\n---|\n*$)", prompt, re.DOTALL)
-
- # pairs = re.findall(r"Input: (.*?)\n(?:Reasoning: .*?\n)?Output: (.*)", prompt, re.DOTALL)
pairs = re.findall(r"Input: (.*?)\n(?:Reasoning:.*?\n)?Output: (.*?)\n", prompt, re.DOTALL)
# breakpoint()
print("PROMPT:", prompt)
print("PAIRS:", pairs)
- # if "What is the capital of Spain?" in prompt:
- # breakpoint()
-
last = re.search(r"Input: (.*)\nReasoning: (.*)$", prompt)
current_question = last.group(1)