From 306529c079c0d8db92e7c0aedb6ce6e33eef7538 Mon Sep 17 00:00:00 2001 From: Hassieb Pakzad <68423100+hassiebp@users.noreply.github.com> Date: Thu, 20 Nov 2025 13:50:26 +0100 Subject: [PATCH] docs(experiments): evaluation value cannot be None --- langfuse/experiment.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/langfuse/experiment.py b/langfuse/experiment.py index f4c913c37..dc53a7d77 100644 --- a/langfuse/experiment.py +++ b/langfuse/experiment.py @@ -107,7 +107,6 @@ class Evaluation: - Numeric (int/float): For quantitative metrics like accuracy (0.85), BLEU (0.42) - String: For categorical results like "positive", "negative", "neutral" - Boolean: For binary assessments like "passes_safety_check" - - None: When evaluation cannot be computed (missing data, API errors, etc.) comment: Optional human-readable explanation of the evaluation result. Useful for providing context, explaining scoring rationale, or noting special conditions. Displayed in Langfuse UI for interpretability. @@ -186,7 +185,7 @@ def __init__( self, *, name: str, - value: Union[int, float, str, bool, None], + value: Union[int, float, str, bool], comment: Optional[str] = None, metadata: Optional[Dict[str, Any]] = None, data_type: Optional[ScoreDataType] = None,