From d7dc7ac84b720b1405a81b889ec312181721ab96 Mon Sep 17 00:00:00 2001 From: Tim Sweeney Date: Tue, 7 Jan 2025 15:55:18 -0800 Subject: [PATCH] lint --- weave/trace/weave_client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/weave/trace/weave_client.py b/weave/trace/weave_client.py index 35e279784e67..07ed6abbd924 100644 --- a/weave/trace/weave_client.py +++ b/weave/trace/weave_client.py @@ -470,7 +470,7 @@ async def apply_scorer( model_inputs = {k: v for k, v in self.inputs.items() if k != "self"} example = {**model_inputs, **(additional_scorer_kwargs or {})} output = self.output - if isinstance(output, Ref): + if isinstance(output, ObjectRef): output = output.get() apply_scorer_result = await apply_scorer_async(scorer, example, output) score_call = apply_scorer_result.score_call @@ -869,7 +869,7 @@ def finish_call( postprocessed_output = original_output self._save_nested_objects(postprocessed_output) - # call.output = map_to_refs(postprocessed_output) + output_as_refs = map_to_refs(postprocessed_output) # Summary handling summary = {} @@ -924,7 +924,7 @@ def finish_call( op._on_finish_handler(call, original_output, exception) def send_end_call() -> None: - output_json = to_json(call.output, project_id, self, use_dictify=False) + output_json = to_json(output_as_refs, project_id, self, use_dictify=False) self.server.call_end( CallEndReq( end=EndedCallSchemaForInsert(