From 0ee7f4e83b6aaa9078f3b9185c15ce897a957adc Mon Sep 17 00:00:00 2001 From: Tim Sweeney Date: Thu, 12 Dec 2024 15:08:36 -0800 Subject: [PATCH] lint pass 4 --- tests/trace/builtin_objects/test_builtin_scorer.py | 8 ++++---- weave/trace/weave_client.py | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/trace/builtin_objects/test_builtin_scorer.py b/tests/trace/builtin_objects/test_builtin_scorer.py index 7659311c6d7..d41bfc3fbd8 100644 --- a/tests/trace/builtin_objects/test_builtin_scorer.py +++ b/tests/trace/builtin_objects/test_builtin_scorer.py @@ -4,9 +4,11 @@ # 3. Local Create, Remote Direct Score # 4. Remote Create, Local Direct Score # 5. Remote Create, Remote Direct Score +from __future__ import annotations + import weave from weave.builtin_objects.scorers.LLMJudgeScorer import LLMJudgeScorer -from weave.trace.weave_client import Call, WeaveClient +from weave.trace.weave_client import ApplyScorerResult, Call, WeaveClient from weave.trace_server import trace_server_interface as tsi scorer_args = { @@ -64,9 +66,7 @@ def simple_op(question: str) -> str: def assert_expected_outcome( - # target_call: Call, scorer_res: ApplyScorerResult | tsi.ScoreCallRes - target_call: Call, - scorer_res: dict | tsi.ScoreCallRes, + target_call: Call, scorer_res: ApplyScorerResult | tsi.ScoreCallRes ): scorer_output = None feedback_id = None diff --git a/weave/trace/weave_client.py b/weave/trace/weave_client.py index 999eca03b8c..d933d29dbc1 100644 --- a/weave/trace/weave_client.py +++ b/weave/trace/weave_client.py @@ -51,6 +51,7 @@ from weave.trace.sanitize import REDACT_KEYS, REDACTED_VALUE from weave.trace.serialize import from_json, isinstance_namedtuple, to_json from weave.trace.serializer import get_serializer_for_obj +from weave.trace.settings import client_parallelism from weave.trace.table import Table from weave.trace.util import deprecated, log_once from weave.trace.vals import WeaveObject, WeaveTable, make_trace_obj @@ -626,7 +627,7 @@ def __init__( self.project = project self.server = server self._anonymous_ops: dict[str, Op] = {} - self.future_executor = FutureExecutor(max_workers=0) # client_parallelism()) + self.future_executor = FutureExecutor(max_workers=client_parallelism()) self.ensure_project_exists = ensure_project_exists if ensure_project_exists: