Skip to content

Commit f234396

Browse files
committed
Enhance run_optimization function: adjust BootstrapFewShot parameters for improved performance
1 parent eb151c2 commit f234396

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

notebooks/dspy_tasks/actions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def _make_module_with_instructions():
114114
if optimizer == "MIPROv2":
115115
opt = dspy.MIPROv2(metric=task.metric_fn, auto="light")
116116
else:
117-
opt = dspy.BootstrapFewShot(metric=task.metric_fn, max_bootstrapped_demos=4, max_labeled_demos=8)
117+
opt = dspy.BootstrapFewShot(metric=task.metric_fn, max_bootstrapped_demos=6, max_labeled_demos=8, max_rounds=3)
118118
optimized_module = opt.compile(module_fresh, trainset=trainset)
119119
opt_elapsed = time.time() - start
120120

0 commit comments

Comments
 (0)