Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add trace and document evals to GET v1/evaluations #2910

Merged
merged 9 commits into from
Apr 17, 2024

Conversation

axiomofjoy
Copy link
Contributor

  • adds traces and document evaluations to GET v1/evaluations

resolves #2894

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@axiomofjoy axiomofjoy changed the base branch from main to sql April 17, 2024 00:34
Comment on lines -136 to -145
loop = asyncio.get_running_loop()

async def content() -> AsyncIterator[bytes]:
for eval_name, span_evals_dataframe_for_name in span_evals_dataframe.groupby(
"name", as_index=False
):
span_evals = SpanEvaluations(str(eval_name), span_evals_dataframe_for_name)
yield await loop.run_in_executor(
None, lambda: table_to_bytes(span_evals.to_pyarrow_table())
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Starlette will ensure that this is non-blocking, even if we pass in a synchronous stream to content.

https://github.com/encode/starlette/blob/eb76cae6fdb6c1b0bfcace17d0dec946fe767f84/starlette/responses.py#L230

@axiomofjoy axiomofjoy marked this pull request as ready for review April 17, 2024 00:57
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Apr 17, 2024
@axiomofjoy axiomofjoy merged commit 79229f2 into sql Apr 17, 2024
11 checks passed
@axiomofjoy axiomofjoy deleted the get-document-evals-2894 branch April 17, 2024 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[persistence] wire evaluations GET endpoint to db
2 participants