arize-phoenix 4.10.2rc0__py3-none-any.whl → 4.10.2rc1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of arize-phoenix might be problematic. Click here for more details.

Files changed (38) hide show
  1. {arize_phoenix-4.10.2rc0.dist-info → arize_phoenix-4.10.2rc1.dist-info}/METADATA +4 -3
  2. {arize_phoenix-4.10.2rc0.dist-info → arize_phoenix-4.10.2rc1.dist-info}/RECORD +27 -35
  3. phoenix/server/api/context.py +3 -7
  4. phoenix/server/api/openapi/main.py +18 -2
  5. phoenix/server/api/openapi/schema.py +12 -12
  6. phoenix/server/api/routers/v1/__init__.py +36 -83
  7. phoenix/server/api/routers/v1/dataset_examples.py +102 -123
  8. phoenix/server/api/routers/v1/datasets.py +389 -507
  9. phoenix/server/api/routers/v1/evaluations.py +74 -64
  10. phoenix/server/api/routers/v1/experiment_evaluations.py +67 -91
  11. phoenix/server/api/routers/v1/experiment_runs.py +97 -155
  12. phoenix/server/api/routers/v1/experiments.py +131 -181
  13. phoenix/server/api/routers/v1/spans.py +141 -173
  14. phoenix/server/api/routers/v1/traces.py +113 -128
  15. phoenix/server/api/routers/v1/utils.py +94 -0
  16. phoenix/server/api/types/Span.py +0 -1
  17. phoenix/server/app.py +148 -192
  18. phoenix/server/main.py +0 -3
  19. phoenix/server/static/index.css +6 -0
  20. phoenix/server/static/index.js +8547 -0
  21. phoenix/server/templates/index.html +25 -76
  22. phoenix/server/thread_server.py +2 -2
  23. phoenix/trace/schemas.py +0 -1
  24. phoenix/version.py +1 -1
  25. phoenix/server/openapi/docs.py +0 -221
  26. phoenix/server/static/.vite/manifest.json +0 -78
  27. phoenix/server/static/assets/components-C8sm_r1F.js +0 -1142
  28. phoenix/server/static/assets/index-BEKPzgQs.js +0 -100
  29. phoenix/server/static/assets/pages-bN7juCjh.js +0 -2885
  30. phoenix/server/static/assets/vendor-CUDAPm8e.js +0 -641
  31. phoenix/server/static/assets/vendor-DxkFTwjz.css +0 -1
  32. phoenix/server/static/assets/vendor-arizeai-Do2HOmcL.js +0 -662
  33. phoenix/server/static/assets/vendor-codemirror-CrdxOlMs.js +0 -12
  34. phoenix/server/static/assets/vendor-recharts-PKRvByVe.js +0 -59
  35. phoenix/server/static/assets/vendor-three-DwGkEfCM.js +0 -2998
  36. {arize_phoenix-4.10.2rc0.dist-info → arize_phoenix-4.10.2rc1.dist-info}/WHEEL +0 -0
  37. {arize_phoenix-4.10.2rc0.dist-info → arize_phoenix-4.10.2rc1.dist-info}/licenses/IP_NOTICE +0 -0
  38. {arize_phoenix-4.10.2rc0.dist-info → arize_phoenix-4.10.2rc1.dist-info}/licenses/LICENSE +0 -0
@@ -1,43 +1,3 @@
1
- {% set rendered_files = [] %}
2
- {% set rendered_chunks = [] %}
3
-
4
- {% macro render_chunk(chunk_name, level=0) %}
5
- {% if chunk_name not in rendered_chunks %}
6
- {% set _ = rendered_chunks.append(chunk_name) %}
7
- {% set chunk = manifest[chunk_name] %}
8
-
9
- {% if chunk.css %}
10
- {% for css_file in chunk.css %}
11
- {% if css_file not in rendered_files %}
12
- <link rel="stylesheet" href="{{ basename }}/{{ css_file }}">
13
- {% set _ = rendered_files.append(css_file) %}
14
- {% endif %}
15
- {% endfor %}
16
- {% endif %}
17
-
18
- {% if chunk.imports %}
19
- {% for import in chunk.imports %}
20
- {{ render_chunk(import, level + 1) }}
21
- {% endfor %}
22
- {% endif %}
23
-
24
- {% if level == 0 %}
25
- {% if chunk.file.endswith('.js') and chunk.file not in rendered_files %}
26
- <script type="module" src="{{ basename }}/{{ chunk.file }}"></script>
27
- {% set _ = rendered_files.append(chunk.file) %}
28
- {% elif chunk.file.endswith('.css') and chunk.file not in rendered_files %}
29
- <link rel="stylesheet" href="{{ basename }}/{{ chunk.file }}">
30
- {% set _ = rendered_files.append(chunk.file) %}
31
- {% endif %}
32
- {% endif %}
33
-
34
- {% if chunk.file.endswith('.js') and chunk.file not in rendered_files %}
35
- <link rel="modulepreload" href="{{ basename }}/{{ chunk.file }}">
36
- {% set _ = rendered_files.append(chunk.file) %}
37
- {% endif %}
38
- {% endif %}
39
- {% endmacro %}
40
-
41
1
  <!DOCTYPE html>
42
2
  <html>
43
3
  <head>
@@ -51,6 +11,7 @@
51
11
  <meta property="og:description" content="AI Observability & Evaluation" />
52
12
  <meta property="og:image" content="https://raw.githubusercontent.com/Arize-ai/phoenix-assets/main/images/socal/social-preview-horizontal.jpg" />
53
13
  <meta name="theme-color" content="#ffffff" />
14
+ <link rel="stylesheet" src="{{basename}}/index.css"></link>
54
15
  <link
55
16
  rel="stylesheet"
56
17
  href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&display=swap"
@@ -60,40 +21,28 @@
60
21
  <body>
61
22
  <div id="root"></div>
62
23
  <script>(function() {
63
- // Request Info:
64
- // URL: {{request.url}}
65
- // Base URL: {{request.base_url}}
66
- // Root Path: {{root_path}}
67
- Object.defineProperty(window, "Config", {
68
- // Place any server-side injected config here
69
- // E.g. default UMAP parameters etc. that needs to be
70
- // injected into the client before React runs
71
- value: Object.freeze({
72
- basename: "{{basename}}",
73
- platformVersion: "{{platform_version}}",
74
- hasInferences: Boolean("{{has_inferences}}" == "True"),
75
- hasCorpus: Boolean("{{has_corpus}}" == "True"),
76
- UMAP: {
77
- minDist: parseFloat("{{min_dist}}"),
78
- nNeighbors: parseInt("{{n_neighbors}}"),
79
- nSamples: parseInt("{{n_samples}}"),
80
- }
81
- }),
82
- writable: false
83
- });
84
- })()</script>
85
- {% if is_development %}
86
- <script type="module">
87
- import RefreshRuntime from 'http://localhost:5173/@react-refresh'
88
- RefreshRuntime.injectIntoGlobalHook(window)
89
- window.$RefreshReg$ = () => {}
90
- window.$RefreshSig$ = () => (type) => type
91
- window.__vite_plugin_react_preamble_installed__ = true
92
- </script>
93
- <script type="module" src="http://localhost:5173/@vite/client"></script>
94
- <script type="module" src="http://localhost:5173/index.tsx"></script>
95
- {% else %}
96
- {{ render_chunk('index.tsx') }}
97
- {% endif %}
98
- </body>
24
+ // Request Info:
25
+ // URL: {{request.url}}
26
+ // Base URL: {{request.base_url}}
27
+ // Root Path: {{root_path}}
28
+ Object.defineProperty(window, "Config", {
29
+ // Place any server-side injected config here
30
+ // E.g. default UMAP parameters etc. that needs to be
31
+ // injected into the client before React runs
32
+ value: Object.freeze({
33
+ basename: "{{basename}}",
34
+ platformVersion: "{{platform_version}}",
35
+ hasInferences: Boolean("{{has_inferences}}" == "True"),
36
+ hasCorpus: Boolean("{{has_corpus}}" == "True"),
37
+ UMAP: {
38
+ minDist: parseFloat("{{min_dist}}"),
39
+ nNeighbors: parseInt("{{n_neighbors}}"),
40
+ nSamples: parseInt("{{n_samples}}"),
41
+ }
42
+ }),
43
+ writable: false
44
+ });
45
+ })()</script>
46
+ <script type="module" src="{{basename}}/index.js"></script>
47
+ </body>
99
48
  </html>
@@ -4,7 +4,7 @@ from threading import Thread
4
4
  from time import sleep, time
5
5
  from typing import Generator
6
6
 
7
- from starlette.applications import Starlette
7
+ from fastapi import FastAPI
8
8
  from uvicorn import Config, Server
9
9
  from uvicorn.config import LoopSetupType
10
10
 
@@ -24,7 +24,7 @@ class ThreadServer(Server):
24
24
 
25
25
  def __init__(
26
26
  self,
27
- app: Starlette,
27
+ app: FastAPI,
28
28
  host: str,
29
29
  port: int,
30
30
  root_path: str,
phoenix/trace/schemas.py CHANGED
@@ -39,7 +39,6 @@ class SpanKind(Enum):
39
39
  AGENT = "AGENT"
40
40
  RERANKER = "RERANKER"
41
41
  EVALUATOR = "EVALUATOR"
42
- GUARDRAIL = "GUARDRAIL"
43
42
  UNKNOWN = "UNKNOWN"
44
43
 
45
44
  def __str__(self) -> str:
phoenix/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "4.10.2rc"
1
+ __version__ = "4.10.2rc1"
@@ -1,221 +0,0 @@
1
- import json
2
- from typing import Any, Dict, Optional
3
-
4
- from starlette.responses import HTMLResponse
5
-
6
- swagger_ui_default_parameters: Dict[str, Any] = {
7
- "dom_id": "#swagger-ui",
8
- "layout": "BaseLayout",
9
- "deepLinking": True,
10
- "showExtensions": True,
11
- "showCommonExtensions": True,
12
- }
13
-
14
-
15
- def get_swagger_ui_html(
16
- *,
17
- openapi_url: str = "/schema",
18
- title: str,
19
- swagger_js_url: str = "https://cdn.jsdelivr.net/npm/swagger-ui-dist@5.9.0/swagger-ui-bundle.js",
20
- swagger_css_url: str = "https://cdn.jsdelivr.net/npm/swagger-ui-dist@5.9.0/swagger-ui.css",
21
- swagger_favicon_url: str = "/favicon.ico",
22
- oauth2_redirect_url: Optional[str] = None,
23
- init_oauth: Optional[str] = None,
24
- swagger_ui_parameters: Optional[Dict[str, Any]] = None,
25
- ) -> HTMLResponse:
26
- """
27
- Generate and return the HTML that loads Swagger UI for the interactive API
28
- docs (normally served at `/docs`).
29
- """
30
- current_swagger_ui_parameters = swagger_ui_default_parameters.copy()
31
- if swagger_ui_parameters:
32
- current_swagger_ui_parameters.update(swagger_ui_parameters)
33
-
34
- html = f"""
35
- <!DOCTYPE html>
36
- <html>
37
- <head>
38
- <link type="text/css" rel="stylesheet" href="{swagger_css_url}">
39
- <link rel="shortcut icon" href="{swagger_favicon_url}">
40
- <title>{title}</title>
41
- </head>
42
- <body>
43
- <div id="swagger-ui">
44
- </div>
45
- <script src="{swagger_js_url}"></script>
46
- <style type="text/css">
47
- div[id^="operations-private"]{{display:none}} #operations-tag-private{{display:none}}
48
- </style>
49
- <!-- `SwaggerUIBundle` is now available on the page -->
50
- <script>
51
- const ui = SwaggerUIBundle({{
52
- url: '{openapi_url}',
53
- """
54
-
55
- for key, value in current_swagger_ui_parameters.items():
56
- html += f"{json.dumps(key)}: {json.dumps(value)},\n"
57
-
58
- if oauth2_redirect_url:
59
- html += f"oauth2RedirectUrl: window.location.origin + '{oauth2_redirect_url}',"
60
-
61
- html += """
62
- presets: [
63
- SwaggerUIBundle.presets.apis,
64
- SwaggerUIBundle.SwaggerUIStandalonePreset
65
- ],
66
- })"""
67
-
68
- if init_oauth:
69
- html += f"""
70
- ui.initOAuth({json.dumps(init_oauth)})
71
- """
72
-
73
- html += """
74
- </script>
75
- </body>
76
- </html>
77
- """
78
- return HTMLResponse(html)
79
-
80
-
81
- def get_redoc_html(
82
- *,
83
- openapi_url: str,
84
- title: str,
85
- redoc_js_url: str = "https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js",
86
- redoc_favicon_url: str = "/favicon.ico",
87
- with_google_fonts: bool = True,
88
- ) -> HTMLResponse:
89
- """
90
- Generate and return the HTML response that loads ReDoc for the alternative
91
- API docs (normally served at `/redoc`).
92
-
93
-
94
- """
95
- html = f"""
96
- <!DOCTYPE html>
97
- <html>
98
- <head>
99
- <title>{title}</title>
100
- <!-- needed for adaptive design -->
101
- <meta charset="utf-8"/>
102
- <meta name="viewport" content="width=device-width, initial-scale=1">
103
- """
104
- if with_google_fonts:
105
- html += """
106
- <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
107
- """ # noqa: E501
108
- html += f"""
109
- <link rel="shortcut icon" href="{redoc_favicon_url}">
110
- <!--
111
- ReDoc doesn't change outer page styles
112
- -->
113
- <style>
114
- body {{
115
- margin: 0;
116
- padding: 0;
117
- }}
118
- </style>
119
- </head>
120
- <body>
121
- <noscript>
122
- ReDoc requires Javascript to function. Please enable it to browse the documentation.
123
- </noscript>
124
- <redoc spec-url="{openapi_url}"></redoc>
125
- <script src="{redoc_js_url}"> </script>
126
- </body>
127
- </html>
128
- """
129
- return HTMLResponse(html)
130
-
131
-
132
- # Not needed now but copy-pasting for future reference
133
- def get_swagger_ui_oauth2_redirect_html() -> HTMLResponse:
134
- """
135
- Generate the HTML response with the OAuth2 redirection for Swagger UI.
136
-
137
- You normally don't need to use or change this.
138
- """
139
- # copied from https://github.com/swagger-api/swagger-ui/blob/v4.14.0/dist/oauth2-redirect.html
140
- html = """
141
- <!doctype html>
142
- <html lang="en-US">
143
- <head>
144
- <title>Swagger UI: OAuth2 Redirect</title>
145
- </head>
146
- <body>
147
- <script>
148
- 'use strict';
149
- function run () {
150
- var oauth2 = window.opener.swaggerUIRedirectOauth2;
151
- var sentState = oauth2.state;
152
- var redirectUrl = oauth2.redirectUrl;
153
- var isValid, qp, arr;
154
-
155
- if (/code|token|error/.test(window.location.hash)) {
156
- qp = window.location.hash.substring(1).replace('?', '&');
157
- } else {
158
- qp = location.search.substring(1);
159
- }
160
-
161
- arr = qp.split("&");
162
- arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';});
163
- qp = qp ? JSON.parse('{' + arr.join() + '}',
164
- function (key, value) {
165
- return key === "" ? value : decodeURIComponent(value);
166
- }
167
- ) : {};
168
-
169
- isValid = qp.state === sentState;
170
-
171
- if ((
172
- oauth2.auth.schema.get("flow") === "accessCode" ||
173
- oauth2.auth.schema.get("flow") === "authorizationCode" ||
174
- oauth2.auth.schema.get("flow") === "authorization_code"
175
- ) && !oauth2.auth.code) {
176
- if (!isValid) {
177
- oauth2.errCb({
178
- authId: oauth2.auth.name,
179
- source: "auth",
180
- level: "warning",
181
- message: "Authorization may be unsafe, passed state was changed in server. The passed state wasn't returned from auth server."
182
- });
183
- }
184
-
185
- if (qp.code) {
186
- delete oauth2.state;
187
- oauth2.auth.code = qp.code;
188
- oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
189
- } else {
190
- let oauthErrorMsg;
191
- if (qp.error) {
192
- oauthErrorMsg = "["+qp.error+"]: " +
193
- (qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
194
- (qp.error_uri ? "More info: "+qp.error_uri : "");
195
- }
196
-
197
- oauth2.errCb({
198
- authId: oauth2.auth.name,
199
- source: "auth",
200
- level: "error",
201
- message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server."
202
- });
203
- }
204
- } else {
205
- oauth2.callback({auth: oauth2.auth, token: qp, isValid: isValid, redirectUrl: redirectUrl});
206
- }
207
- window.close();
208
- }
209
-
210
- if (document.readyState !== 'loading') {
211
- run();
212
- } else {
213
- document.addEventListener('DOMContentLoaded', function () {
214
- run();
215
- });
216
- }
217
- </script>
218
- </body>
219
- </html>
220
- """ # noqa: E501
221
- return HTMLResponse(content=html)
@@ -1,78 +0,0 @@
1
- {
2
- "_components-C8sm_r1F.js": {
3
- "file": "assets/components-C8sm_r1F.js",
4
- "name": "components",
5
- "imports": [
6
- "_vendor-CUDAPm8e.js",
7
- "_vendor-arizeai-Do2HOmcL.js",
8
- "_pages-bN7juCjh.js",
9
- "_vendor-three-DwGkEfCM.js",
10
- "_vendor-codemirror-CrdxOlMs.js"
11
- ]
12
- },
13
- "_pages-bN7juCjh.js": {
14
- "file": "assets/pages-bN7juCjh.js",
15
- "name": "pages",
16
- "imports": [
17
- "_vendor-CUDAPm8e.js",
18
- "_components-C8sm_r1F.js",
19
- "_vendor-arizeai-Do2HOmcL.js",
20
- "_vendor-recharts-PKRvByVe.js",
21
- "_vendor-codemirror-CrdxOlMs.js"
22
- ]
23
- },
24
- "_vendor-!~{003}~.js": {
25
- "file": "assets/vendor-DxkFTwjz.css",
26
- "src": "_vendor-!~{003}~.js"
27
- },
28
- "_vendor-CUDAPm8e.js": {
29
- "file": "assets/vendor-CUDAPm8e.js",
30
- "name": "vendor",
31
- "imports": [
32
- "_vendor-three-DwGkEfCM.js"
33
- ],
34
- "css": [
35
- "assets/vendor-DxkFTwjz.css"
36
- ]
37
- },
38
- "_vendor-arizeai-Do2HOmcL.js": {
39
- "file": "assets/vendor-arizeai-Do2HOmcL.js",
40
- "name": "vendor-arizeai",
41
- "imports": [
42
- "_vendor-CUDAPm8e.js"
43
- ]
44
- },
45
- "_vendor-codemirror-CrdxOlMs.js": {
46
- "file": "assets/vendor-codemirror-CrdxOlMs.js",
47
- "name": "vendor-codemirror",
48
- "imports": [
49
- "_vendor-CUDAPm8e.js"
50
- ]
51
- },
52
- "_vendor-recharts-PKRvByVe.js": {
53
- "file": "assets/vendor-recharts-PKRvByVe.js",
54
- "name": "vendor-recharts",
55
- "imports": [
56
- "_vendor-CUDAPm8e.js"
57
- ]
58
- },
59
- "_vendor-three-DwGkEfCM.js": {
60
- "file": "assets/vendor-three-DwGkEfCM.js",
61
- "name": "vendor-three"
62
- },
63
- "index.tsx": {
64
- "file": "assets/index-BEKPzgQs.js",
65
- "name": "index",
66
- "src": "index.tsx",
67
- "isEntry": true,
68
- "imports": [
69
- "_vendor-CUDAPm8e.js",
70
- "_vendor-arizeai-Do2HOmcL.js",
71
- "_components-C8sm_r1F.js",
72
- "_pages-bN7juCjh.js",
73
- "_vendor-three-DwGkEfCM.js",
74
- "_vendor-codemirror-CrdxOlMs.js",
75
- "_vendor-recharts-PKRvByVe.js"
76
- ]
77
- }
78
- }