diff --git a/weave/__init__.py b/weave/__init__.py index 1b352f5f7aa..6232ff9e87c 100644 --- a/weave/__init__.py +++ b/weave/__init__.py @@ -24,7 +24,8 @@ def __getattr__(name: str) -> Any: """This function defines module-level lazy imports. - The scorer module is particularly heavy, so we defer to speed up weave import.""" + The scorer module is particularly heavy, so we defer to speed up weave import. + This allows `Scorer` to stay at top-level without incurring import overhead.""" if name == "Scorer": from weave.flow.scorer import Scorer diff --git a/weave/flow/scorer.py b/weave/flow/scorer.py index 86df3d6a055..16dea6a4774 100644 --- a/weave/flow/scorer.py +++ b/weave/flow/scorer.py @@ -10,3 +10,5 @@ DeprecationWarning, stacklevel=2, ) + +__docspec__ = [Scorer]