DSPy: The framework for programming—not prompting—language models
Python
set noop handler as default for bootstrap
Shangyintca4ce5f8eabb
diff --git a/dspy/teleprompt/bootstrap.py b/dspy/teleprompt/bootstrap.pyindex 560a641a2..ef1af8ee2 100644--- a/dspy/teleprompt/bootstrap.py+++ b/dspy/teleprompt/bootstrap.py@@ -5,7 +5,7 @@ import threadingfrom dspy.predict.retry import Retryfrom dspy.primitives import Example-from dspy.primitives.assertions import assert_no_except_handler, assert_transform_module, bypass_assert_handler, suggest_backtrack_handler+from dspy.primitives.assertions import assert_transform_module, noop_handlerfrom .teleprompt import Teleprompterfrom .vanilla import LabeledFewShot@@ -63,9 +63,8 @@ class BootstrapFewShot(Teleprompter):assert self.student._compiled is False, "Student must be uncompiled."- self.student = assert_transform_module(self.student)- self.teacher = assert_transform_module(self.teacher,- assertion_handler=lambda fun: suggest_backtrack_handler(assert_no_except_handler(fun)))+ self.student = assert_transform_module(self.student, noop_handler)+ self.teacher = assert_transform_module(self.teacher, noop_handler)if self.max_labeled_demos and self.teacher._compiled is False:teleprompter = LabeledFewShot(k=self.max_labeled_demos)