diff --git a/weave/flow/eval.py b/weave/flow/eval.py index f9de7838015..76d78c0902b 100644 --- a/weave/flow/eval.py +++ b/weave/flow/eval.py @@ -17,9 +17,9 @@ from weave.flow.obj import Object from weave.scorers import ( Scorer, + _has_oldstyle_scorers, auto_summarize, get_scorer_attributes, - has_oldstyle_scorers, transpose, ) from weave.trace.context.weave_client_context import get_weave_client @@ -135,7 +135,7 @@ def model_post_init(self, __context: Any) -> None: scorers.append(scorer) # Determine output key based on scorer types - if has_oldstyle_scorers(scorers): + if _has_oldstyle_scorers(scorers): self._output_key = "model_output" util.warn_once( logger, diff --git a/weave/scorers/__init__.py b/weave/scorers/__init__.py index 01f400f55e0..28583c5ff17 100644 --- a/weave/scorers/__init__.py +++ b/weave/scorers/__init__.py @@ -1,8 +1,8 @@ from weave.scorers.base_scorer import ( Scorer, + _has_oldstyle_scorers, auto_summarize, get_scorer_attributes, - has_oldstyle_scorers, ) from weave.scorers.classification_scorer import ( MultiTaskBinaryClassificationF1, @@ -40,7 +40,7 @@ "ContextRelevancyScorer", "EmbeddingSimilarityScorer", "get_scorer_attributes", - "has_oldstyle_scorers", + "_has_oldstyle_scorers", "HallucinationFreeScorer", "InstructorLLMScorer", "ValidJSONScorer", diff --git a/weave/scorers/base_scorer.py b/weave/scorers/base_scorer.py index cc243b1a0d6..5ffb8c41662 100644 --- a/weave/scorers/base_scorer.py +++ b/weave/scorers/base_scorer.py @@ -110,7 +110,7 @@ def get_scorer_attributes( return (scorer_name, score_fn, summarize_fn) # type: ignore -def has_oldstyle_scorers(scorers: list[Union[Callable, Op, Scorer]]) -> bool: +def _has_oldstyle_scorers(scorers: list[Union[Callable, Op, Scorer]]) -> bool: """Check if any scorers use the deprecated 'model_output' parameter.""" for scorer in scorers or []: _, score_fn, _ = get_scorer_attributes(scorer)