Skip to content

Commit f3e2354

Browse files
authored
enh(mipro): Allow to pass provide_traceback in mipro (stanfordnlp#7890)
1 parent c0d9098 commit f3e2354

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dspy/teleprompt/mipro_optimizer_v2.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ def compile(
109109
tip_aware_proposer: bool = True,
110110
fewshot_aware_proposer: bool = True,
111111
requires_permission_to_run: bool = True,
112+
provide_traceback: bool = False,
112113
) -> Any:
113114
# Set random seeds
114115
seed = seed or self.seed
@@ -158,6 +159,7 @@ def compile(
158159
max_errors=self.max_errors,
159160
display_table=False,
160161
display_progress=True,
162+
provide_traceback=provide_traceback,
161163
)
162164

163165
# Step 1: Bootstrap few-shot examples
@@ -326,7 +328,7 @@ def _get_user_confirmation(
326328
327329
{YELLOW}{BOLD}Estimated Cost Calculation:{ENDC}
328330
329-
{YELLOW}Total Cost = (Number of calls to task model * (Avg Input Token Length per Call * Task Model Price per Input Token + Avg Output Token Length per Call * Task Model Price per Output Token)
331+
{YELLOW}Total Cost = (Number of calls to task model * (Avg Input Token Length per Call * Task Model Price per Input Token + Avg Output Token Length per Call * Task Model Price per Output Token)
330332
+ (Number of program calls * (Avg Input Token Length per Call * Task Prompt Price per Input Token + Avg Output Token Length per Call * Prompt Model Price per Output Token).{ENDC}
331333
332334
For a preliminary estimate of potential costs, we recommend you perform your own calculations based on the task

0 commit comments

Comments
 (0)