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

Debugging encoding #5178

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/docker-build-experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- sessions
- managed-phoenix/test

jobs:
push_to_registry:
Expand Down
7 changes: 6 additions & 1 deletion src/phoenix/server/api/routers/v1/spans.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ async def query_spans_handler(
detail=f"Invalid query: {e}",
status_code=HTTP_422_UNPROCESSABLE_ENTITY,
)
print(f"{queries=}\n\n")
print(f"{span_queries=}\n\n")
print(f"{project_name=}\n\n")
print(f"{end_time=}\n\n")
async with request.app.state.db() as session:
results = []
for query in span_queries:
Expand All @@ -114,14 +118,15 @@ async def query_spans_handler(
)
if not results:
raise HTTPException(status_code=HTTP_404_NOT_FOUND)
print(f"{results=}\n\n")

async def content() -> AsyncIterator[bytes]:
for result in results:
yield df_to_bytes(result)

return StreamingResponse(
content=content(),
media_type="application/x-pandas-arrow",
media_type="application/octet-stream",
)


Expand Down
2 changes: 1 addition & 1 deletion src/phoenix/server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

_WELCOME_MESSAGE = Environment(loader=BaseLoader()).from_string("""

██████╗ ██╗ ██╗ ██████╗ ███████╗███╗ ██╗██╗██╗ ██╗
██████╗ ██╗ ██╗ ██████╗ ███████╗███╗ ██╗██╗██╗ ██╗ (managed by Arize)
██╔══██╗██║ ██║██╔═══██╗██╔════╝████╗ ██║██║╚██╗██╔╝
██████╔╝███████║██║ ██║█████╗ ██╔██╗ ██║██║ ╚███╔╝
██╔═══╝ ██╔══██║██║ ██║██╔══╝ ██║╚██╗██║██║ ██╔██╗
Expand Down
1 change: 1 addition & 0 deletions src/phoenix/session/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ def query_spans(
raise ValueError(response.content.decode())
response.raise_for_status()
source = BytesIO(response.content)
print(f"{response.headers=}")
results = []
while True:
try:
Expand Down
Loading