DSPy: The framework for programming—not prompting—language models
Python
revise comments
lizhijian6beef0b25431
diff --git a/dspy/evaluate/evaluate.py b/dspy/evaluate/evaluate.pyindex 06ec4e63a..27358ed4f 100644--- a/dspy/evaluate/evaluate.py+++ b/dspy/evaluate/evaluate.py@@ -142,7 +142,7 @@ class Evaluate:# Truncate every cell in the DataFramedf = df.applymap(truncate_cell)- # Rename the 'correct' column to the name of the metric function+ # Rename the 'correct' column to the name of the metric objectassert(callable(metric))metric_name = metric.__name__ if isinstance(metric, types.FunctionType) else metric.__class__.__name__df.rename(columns={'correct': metric_name}, inplace=True)