Arize-ai / phoenix

AI Observability & Evaluation
https://docs.arize.com/phoenix
Other
3.98k stars 294 forks source link

Deploy Arize-Phoenix App to Linux Server #2250

Closed realnadeemansari closed 8 months ago

realnadeemansari commented 9 months ago

Arize app is not working on linux server I am using Arize version 0.0.40 I have created an Arize app that reads the data from Mongo data and visualizes the observability of the LLM model. I moved the app to a Linux server to run the Arize app as a standalone application but it is showing "Something went wrong" in the browser.

Traceback

Cannot query field 'streamingLastUpdatedAt' on type 'Query'.

GraphQL request:6:3
5 | fragment StreamToggle_data on Query {
6 |   streamingLastUpdatedAt
  |   ^
7 | }
Stack (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 973, in _bootstrap
    self._bootstrap_inner()
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/uvicorn/server.py", line 62, in run
    return asyncio.run(self.serve(sockets=sockets))
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 636, in run_until_complete
    self.run_forever()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
    self._run_once()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1909, in _run_once
    handle._run()
  File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/routing.py", line 758, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/routing.py", line 778, in app
    await route.handle(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/routing.py", line 299, in handle
    await self.app(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/asgi/__init__.py", line 111, in __call__
    return await self.handle_http(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/asgi/__init__.py", line 178, in handle_http
    response = await self.run(request)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/http/async_base_view.py", line 176, in run
    result = await self.execute_operation(
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/http/async_base_view.py", line 115, in execute_operation
    return await self.schema.execute(
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/schema/schema.py", line 256, in execute
    result = await execute(
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/schema/execute.py", line 126, in execute
    process_errors(execution_context.errors, execution_context)
Cannot query field 'streamingLastUpdatedAt' on type 'Query'.

GraphQL request:6:3
5 | fragment StreamToggle_data on Query {
6 |   streamingLastUpdatedAt
  |   ^
7 | }
Stack (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 973, in _bootstrap
    self._bootstrap_inner()
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/uvicorn/server.py", line 62, in run
    return asyncio.run(self.serve(sockets=sockets))
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 636, in run_until_complete
    self.run_forever()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
    self._run_once()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1909, in _run_once
    handle._run()
  File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/routing.py", line 758, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/routing.py", line 778, in app
    await route.handle(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/routing.py", line 299, in handle
    await self.app(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/asgi/__init__.py", line 111, in __call__
    return await self.handle_http(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/asgi/__init__.py", line 178, in handle_http
    response = await self.run(request)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/http/async_base_view.py", line 176, in run
    result = await self.execute_operation(
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/http/async_base_view.py", line 115, in execute_operation
    return await self.schema.execute(
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/schema/schema.py", line 256, in execute
    result = await execute(
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/schema/execute.py", line 126, in execute
    process_errors(execution_context.errors, execution_context)
Cannot query field 'streamingLastUpdatedAt' on type 'Query'.

GraphQL request:6:3
5 | fragment StreamToggle_data on Query {
6 |   streamingLastUpdatedAt
  |   ^
7 | }
Stack (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 973, in _bootstrap
    self._bootstrap_inner()
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/uvicorn/server.py", line 62, in run
    return asyncio.run(self.serve(sockets=sockets))
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 636, in run_until_complete
    self.run_forever()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
    self._run_once()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1909, in _run_once
    handle._run()
  File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/routing.py", line 758, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/routing.py", line 778, in app
    await route.handle(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/routing.py", line 299, in handle
    await self.app(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/asgi/__init__.py", line 111, in __call__
    return await self.handle_http(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/asgi/__init__.py", line 178, in handle_http
    response = await self.run(request)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/http/async_base_view.py", line 176, in run
    result = await self.execute_operation(
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/http/async_base_view.py", line 115, in execute_operation
    return await self.schema.execute(
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/schema/schema.py", line 256, in execute
    result = await execute(
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/schema/execute.py", line 126, in execute
    process_errors(execution_context.errors, execution_context)
Cannot query field 'streamingLastUpdatedAt' on type 'Query'.

GraphQL request:6:3
5 | fragment StreamToggle_data on Query {
6 |   streamingLastUpdatedAt
  |   ^
7 | }
Stack (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 973, in _bootstrap
    self._bootstrap_inner()
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/uvicorn/server.py", line 62, in run
    return asyncio.run(self.serve(sockets=sockets))
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 636, in run_until_complete
    self.run_forever()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
    self._run_once()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1909, in _run_once
    handle._run()
  File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/routing.py", line 758, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/routing.py", line 778, in app
    await route.handle(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/routing.py", line 299, in handle
    await self.app(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/asgi/__init__.py", line 111, in __call__
    return await self.handle_http(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/asgi/__init__.py", line 178, in handle_http
    response = await self.run(request)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/http/async_base_view.py", line 176, in run
    result = await self.execute_operation(
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/http/async_base_view.py", line 115, in execute_operation
    return await self.schema.execute(
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/schema/schema.py", line 256, in execute
    result = await execute(
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/schema/execute.py", line 126, in execute
    process_errors(execution_context.errors, execution_context)
Cannot query field 'streamingLastUpdatedAt' on type 'Query'.

GraphQL request:6:3
5 | fragment StreamToggle_data on Query {
6 |   streamingLastUpdatedAt
  |   ^
7 | }
Stack (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 973, in _bootstrap
    self._bootstrap_inner()
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/uvicorn/server.py", line 62, in run
    return asyncio.run(self.serve(sockets=sockets))
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 636, in run_until_complete
    self.run_forever()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
    self._run_once()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1909, in _run_once
    handle._run()
  File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/routing.py", line 758, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/routing.py", line 778, in app
    await route.handle(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/starlette/routing.py", line 299, in handle
    await self.app(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/asgi/__init__.py", line 111, in __call__
    return await self.handle_http(scope, receive, send)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/asgi/__init__.py", line 178, in handle_http
    response = await self.run(request)
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/http/async_base_view.py", line 176, in run
    result = await self.execute_operation(
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/http/async_base_view.py", line 115, in execute_operation
    return await self.schema.execute(
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/schema/schema.py", line 256, in execute
    result = await execute(
  File "/home/cedidspoc/var/arize-phoenix/venv/lib/python3.10/site-packages/strawberry/schema/execute.py", line 126, in execute
    process_errors(execution_context.errors, execution_context)

Expected behavior The application should be able to access the URL.

Screenshots image

Environment (please complete the following information):

dosubot[bot] commented 9 months ago

🤖

Hey @realnadeemansari, long time no see! Hope you're doing well despite this quirky little hiccup.

The error message "Cannot query field 'streamingLastUpdatedAt' on type 'Query'" you're encountering is likely due to a mismatch in the field name in your query. In the Arize Phoenix codebase, the correct field name is 'streaming_last_updated_at', not 'streamingLastUpdatedAt'.

Field names in GraphQL are case-sensitive and must match exactly with the schema definition. In Python, it's common to use snake_case (lowercase with underscores) for variable names, which is the case in the provided schema. Therefore, you should change your query to use 'streaming_last_updated_at' instead of 'streamingLastUpdatedAt'.

As for the role of the 'streaming_last_updated_at' field in the Arize Phoenix codebase, it is used to track the last updated time of the streaming data. It checks the last updated time for both traces and evaluations, and returns the latest one. You can find the relevant code in the src/phoenix/server/api/schema.py file.

Please try updating your query and let me know if you continue to encounter issues.

Sources

#### About Dosu This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot.
mikeldking commented 8 months ago

@realnadeemansari we can't quite figure out why you have a mismatch in the UI from the query itself? It looks like you have a mismatch in the UI from the server but we don't know how this could happen.

Can you try updating and let us know? pip install -U arize-phoenix[evals]

axiomofjoy commented 8 months ago

@realnadeemansari This issue should be resolved by clearing your browser cache. We've improved our browser caching strategy, so you should no longer hit this issue. Closing this issue for now, feel free to re-open if it persists.