Skip to content

Commit

Permalink
chore(weave): Remove comments from code capture #3651
Browse files Browse the repository at this point in the history
  • Loading branch information
tssweeney authored Feb 11, 2025
1 parent 733eb8f commit 07cfbbe
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions weave/flow/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ async def eval_example(example: dict) -> dict:
return eval_row

n_complete = 0
# with console.status("Evaluating...") as status:
dataset = self._post_init_dataset
_rows = dataset.rows
trial_rows = list(_rows) * self.trials
Expand All @@ -283,9 +282,6 @@ async def eval_example(example: dict) -> dict:
):
n_complete += 1
print(f"Evaluated {n_complete} of {len(trial_rows)} examples")
# status.update(
# f"Evaluating... {duration:.2f}s [{n_complete} / {len(self.dataset.rows)} complete]" # type:ignore
# )
if eval_row is None:
eval_row = {self._output_key: None, "scores": {}}
else:
Expand All @@ -300,16 +296,6 @@ async def eval_example(example: dict) -> dict:

@weave.op(call_display_name=default_evaluation_display_name)
async def evaluate(self, model: Union[Op, Model]) -> dict:
# The need for this pattern is quite unfortunate and highlights a gap in our
# data model. As a user, I just want to pass a list of data `eval_rows` to
# summarize. Under the hood, Weave should choose the appropriate storage
# format (in this case `Table`) and serialize it that way. Right now, it is
# just a huge list of dicts. The fact that "as a user" I need to construct
# `weave.Table` at all is a leaky abstraction. Moreover, the need to
# construct `EvaluationResults` just so that tracing and the UI works is
# also bad. In the near-term, this will at least solve the problem of
# breaking summarization with big datasets, but this is not the correct
# long-term solution.
eval_results = await self.get_eval_results(model)
summary = await self.summarize(eval_results)

Expand Down

0 comments on commit 07cfbbe

Please sign in to comment.