DSPy: The framework for programming—not prompting—language models
Python
ensure deprecated optimizers return expected output
Michael Ryan1a80a9bdf0c5
diff --git a/dspy/teleprompt/signature_opt.py b/dspy/teleprompt/signature_opt.pyindex bacd01d6c..ea4bfa61c 100644--- a/dspy/teleprompt/signature_opt.py+++ b/dspy/teleprompt/signature_opt.py@@ -42,4 +42,4 @@ class SignatureOptimizer(COPRO):super().__init__(prompt_model, metric, breadth, depth, init_temperature, verbose, track_stats)def compile(self, student, *, devset, eval_kwargs):- super().compile(student, trainset=devset, eval_kwargs=eval_kwargs)\ No newline at end of file+ return super().compile(student, trainset=devset, eval_kwargs=eval_kwargs)\ No newline at end of filediff --git a/dspy/teleprompt/signature_opt_bayesian.py b/dspy/teleprompt/signature_opt_bayesian.pyindex 4e6076dc5..e1caef71d 100644--- a/dspy/teleprompt/signature_opt_bayesian.py+++ b/dspy/teleprompt/signature_opt_bayesian.py@@ -68,4 +68,4 @@ class BayesianSignatureOptimizer(MIPRO):# Use trials_num as a fallback if trials_num is not providedif trials_num is None:trials_num = optuna_trials_num- super().compile(student, trainset=devset, max_bootstrapped_demos=max_bootstrapped_demos, max_labeled_demos=max_labeled_demos, eval_kwargs=eval_kwargs, seed=seed, view_data=view_data, view_examples=view_examples, requires_permission_to_run=requires_permission_to_run, num_trials=trials_num)\ No newline at end of file+ return super().compile(student, trainset=devset, max_bootstrapped_demos=max_bootstrapped_demos, max_labeled_demos=max_labeled_demos, eval_kwargs=eval_kwargs, seed=seed, view_data=view_data, view_examples=view_examples, requires_permission_to_run=requires_permission_to_run, num_trials=trials_num)\ No newline at end of file