Skip to content

Commit ca768d3

Browse files
authored
fix unnecessary mlflow dep (#7942)
1 parent 6ecc92d commit ca768d3

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

dspy/teleprompt/mipro_optimizer_v2.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -649,8 +649,6 @@ def _log_minibatch_eval(
649649
trajectory = "[" + full_eval_scores + "]"
650650
logger.info(f"Full eval scores so far: {trajectory}")
651651
logger.info(f"Best full score so far: {best_score}")
652-
import mlflow
653-
mlflow.log_metric("best score", best_score, step=trial.number)
654652
logger.info(
655653
f"{'=' * len(f'== Trial {trial.number + 1} / {adjusted_num_trials} - Minibatch Evaluation ==')}\n\n"
656654
)
@@ -681,8 +679,6 @@ def _log_normal_eval(
681679
full_eval_scores = ", ".join([f"{s['score']}" for s in score_data if s["full_eval"]])
682680
logger.info(f"Scores so far: {'[' + full_eval_scores + ']'}")
683681
logger.info(f"Best score so far: {best_score}")
684-
import mlflow
685-
mlflow.log_metric("best score", best_score, step=trial.number)
686682
logger.info(f"{'=' * len(f'===== Trial {trial.number + 1} / {num_trials} =====')}\n\n")
687683

688684
def _select_and_insert_instructions_and_demos(

dspy/utils/callback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def on_evaluate_start(
241241
def on_evaluate_end(
242242
self,
243243
call_id: str,
244-
outputs: Optional[Dict[str, Any]],
244+
outputs: Optional[Any],
245245
exception: Optional[Exception] = None,
246246
):
247247
"""A handler triggered after evaluation is executed.

0 commit comments

Comments
 (0)