Skip to content

Commit

Permalink
ankush comment
Browse files Browse the repository at this point in the history
  • Loading branch information
isahers1 committed Jan 10, 2025
1 parent c9071a4 commit 41cd64f
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions python/langsmith/evaluation/_arunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,13 +617,6 @@ def _reset_example_attachments(self, example: schemas.Example) -> schemas.Exampl
_tenant_id=example._tenant_id,
)

def _make_fresh_examples(
self,
examples: List[schemas.Example],
) -> List[schemas.Example]:
"""Create fresh copies of examples with reset readers."""
return [self._reset_example_attachments(example) for example in examples]

async def aget_examples(self) -> AsyncIterator[schemas.Example]:
if self._examples is None:
self._examples = _aresolve_data(
Expand All @@ -642,7 +635,12 @@ async def aget_examples(self) -> AsyncIterator[schemas.Example]:
examples_list = [example async for example in self._examples]
self._examples = async_chain_from_iterable(
[
async_iter_from_list(self._make_fresh_examples(examples_list))
async_iter_from_list(
[
self._reset_example_attachments(example)
for example in examples_list
]
)
for _ in range(self._num_repetitions)
]
)
Expand Down

0 comments on commit 41cd64f

Please sign in to comment.