arize-phoenix 4.30.1__py3-none-any.whl → 4.31.0__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.
- {arize_phoenix-4.30.1.dist-info → arize_phoenix-4.31.0.dist-info}/METADATA +1 -1
- {arize_phoenix-4.30.1.dist-info → arize_phoenix-4.31.0.dist-info}/RECORD +21 -20
- phoenix/otel/otel.py +115 -6
- phoenix/server/api/context.py +2 -0
- phoenix/server/api/dataloaders/__init__.py +2 -0
- phoenix/server/api/dataloaders/dataset_example_revisions.py +54 -17
- phoenix/server/api/dataloaders/experiment_run_annotations.py +40 -0
- phoenix/server/api/types/ExperimentRun.py +1 -9
- phoenix/server/app.py +36 -2
- phoenix/server/dml_event_handler.py +1 -0
- phoenix/server/main.py +21 -1
- phoenix/server/static/.vite/manifest.json +9 -9
- phoenix/server/static/assets/{components-CkSg5zK4.js → components-CEsu6itL.js} +1 -1
- phoenix/server/static/assets/{index-DTecsU5w.js → index-Cuxn1Qdi.js} +1 -1
- phoenix/server/static/assets/{pages-C6emDFIO.js → pages-eeRVG3GZ.js} +218 -180
- phoenix/trace/fixtures.py +46 -10
- phoenix/trace/utils.py +2 -8
- phoenix/version.py +1 -1
- {arize_phoenix-4.30.1.dist-info → arize_phoenix-4.31.0.dist-info}/WHEEL +0 -0
- {arize_phoenix-4.30.1.dist-info → arize_phoenix-4.31.0.dist-info}/licenses/IP_NOTICE +0 -0
- {arize_phoenix-4.30.1.dist-info → arize_phoenix-4.31.0.dist-info}/licenses/LICENSE +0 -0
phoenix/server/main.py
CHANGED
|
@@ -143,7 +143,9 @@ if __name__ == "__main__":
|
|
|
143
143
|
# Whether the app is running in a development environment
|
|
144
144
|
parser.add_argument("--dev", action="store_true")
|
|
145
145
|
parser.add_argument("--no-ui", action="store_true")
|
|
146
|
+
|
|
146
147
|
subparsers = parser.add_subparsers(dest="command", required=True)
|
|
148
|
+
|
|
147
149
|
serve_parser = subparsers.add_parser("serve")
|
|
148
150
|
serve_parser.add_argument(
|
|
149
151
|
"--with-fixture",
|
|
@@ -182,14 +184,27 @@ if __name__ == "__main__":
|
|
|
182
184
|
"database is new."
|
|
183
185
|
),
|
|
184
186
|
)
|
|
187
|
+
serve_parser.add_argument(
|
|
188
|
+
"--scaffold-datasets",
|
|
189
|
+
action="store_true", # default is False
|
|
190
|
+
required=False,
|
|
191
|
+
help=(
|
|
192
|
+
"Whether or not to add any datasets defined in "
|
|
193
|
+
"the inputted project or trace fixture. "
|
|
194
|
+
"Default is False. "
|
|
195
|
+
),
|
|
196
|
+
)
|
|
197
|
+
|
|
185
198
|
datasets_parser = subparsers.add_parser("datasets")
|
|
186
199
|
datasets_parser.add_argument("--primary", type=str, required=True)
|
|
187
200
|
datasets_parser.add_argument("--reference", type=str, required=False)
|
|
188
201
|
datasets_parser.add_argument("--corpus", type=str, required=False)
|
|
189
202
|
datasets_parser.add_argument("--trace", type=str, required=False)
|
|
203
|
+
|
|
190
204
|
fixture_parser = subparsers.add_parser("fixture")
|
|
191
205
|
fixture_parser.add_argument("fixture", type=str, choices=[fixture.name for fixture in FIXTURES])
|
|
192
206
|
fixture_parser.add_argument("--primary-only", action="store_true") # Default is False
|
|
207
|
+
|
|
193
208
|
trace_fixture_parser = subparsers.add_parser("trace-fixture")
|
|
194
209
|
trace_fixture_parser.add_argument(
|
|
195
210
|
"fixture", type=str, choices=[fixture.name for fixture in TRACES_FIXTURES]
|
|
@@ -197,19 +212,22 @@ if __name__ == "__main__":
|
|
|
197
212
|
trace_fixture_parser.add_argument(
|
|
198
213
|
"--simulate-streaming", action="store_true"
|
|
199
214
|
) # Default is False
|
|
215
|
+
|
|
200
216
|
demo_parser = subparsers.add_parser("demo")
|
|
201
217
|
demo_parser.add_argument("fixture", type=str, choices=[fixture.name for fixture in FIXTURES])
|
|
202
218
|
demo_parser.add_argument(
|
|
203
219
|
"trace_fixture", type=str, choices=[fixture.name for fixture in TRACES_FIXTURES]
|
|
204
220
|
)
|
|
205
221
|
demo_parser.add_argument("--simulate-streaming", action="store_true")
|
|
206
|
-
args = parser.parse_args()
|
|
207
222
|
|
|
223
|
+
args = parser.parse_args()
|
|
208
224
|
db_connection_str = (
|
|
209
225
|
args.database_url if args.database_url else get_env_database_connection_str()
|
|
210
226
|
)
|
|
211
227
|
export_path = Path(args.export_path) if args.export_path else EXPORT_DIR
|
|
228
|
+
|
|
212
229
|
force_fixture_ingestion = False
|
|
230
|
+
scaffold_datasets = False
|
|
213
231
|
if args.command == "datasets":
|
|
214
232
|
primary_inferences_name = args.primary
|
|
215
233
|
reference_inferences_name = args.reference
|
|
@@ -264,6 +282,7 @@ if __name__ == "__main__":
|
|
|
264
282
|
for fixture in get_trace_fixtures_by_project_name(name)
|
|
265
283
|
)
|
|
266
284
|
force_fixture_ingestion = args.force_fixture_ingestion
|
|
285
|
+
scaffold_datasets = args.scaffold_datasets
|
|
267
286
|
host: Optional[str] = args.host or get_env_host()
|
|
268
287
|
display_host = host or "localhost"
|
|
269
288
|
# If the host is "::", the convention is to bind to all interfaces. However, uvicorn
|
|
@@ -355,6 +374,7 @@ if __name__ == "__main__":
|
|
|
355
374
|
secret=secret,
|
|
356
375
|
tracing_fixture_names=tracing_fixture_names,
|
|
357
376
|
force_fixture_ingestion=force_fixture_ingestion,
|
|
377
|
+
scaffold_datasets=scaffold_datasets,
|
|
358
378
|
)
|
|
359
379
|
server = Server(config=Config(app, host=host, port=port, root_path=host_root_path)) # type: ignore
|
|
360
380
|
Thread(target=_write_pid_file_when_ready, args=(server,), daemon=True).start()
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_components-
|
|
3
|
-
"file": "assets/components-
|
|
2
|
+
"_components-CEsu6itL.js": {
|
|
3
|
+
"file": "assets/components-CEsu6itL.js",
|
|
4
4
|
"name": "components",
|
|
5
5
|
"imports": [
|
|
6
6
|
"_vendor-DsnEJuEV.js",
|
|
7
7
|
"_vendor-arizeai-DtynTLNi.js",
|
|
8
|
-
"_pages-
|
|
8
|
+
"_pages-eeRVG3GZ.js",
|
|
9
9
|
"_vendor-three-DwGkEfCM.js",
|
|
10
10
|
"_vendor-codemirror-C5to5cK4.js"
|
|
11
11
|
]
|
|
12
12
|
},
|
|
13
|
-
"_pages-
|
|
14
|
-
"file": "assets/pages-
|
|
13
|
+
"_pages-eeRVG3GZ.js": {
|
|
14
|
+
"file": "assets/pages-eeRVG3GZ.js",
|
|
15
15
|
"name": "pages",
|
|
16
16
|
"imports": [
|
|
17
17
|
"_vendor-DsnEJuEV.js",
|
|
18
|
-
"_components-
|
|
18
|
+
"_components-CEsu6itL.js",
|
|
19
19
|
"_vendor-arizeai-DtynTLNi.js",
|
|
20
20
|
"_vendor-recharts-reihe2SJ.js",
|
|
21
21
|
"_vendor-codemirror-C5to5cK4.js"
|
|
@@ -61,15 +61,15 @@
|
|
|
61
61
|
"name": "vendor-three"
|
|
62
62
|
},
|
|
63
63
|
"index.tsx": {
|
|
64
|
-
"file": "assets/index-
|
|
64
|
+
"file": "assets/index-Cuxn1Qdi.js",
|
|
65
65
|
"name": "index",
|
|
66
66
|
"src": "index.tsx",
|
|
67
67
|
"isEntry": true,
|
|
68
68
|
"imports": [
|
|
69
69
|
"_vendor-DsnEJuEV.js",
|
|
70
70
|
"_vendor-arizeai-DtynTLNi.js",
|
|
71
|
-
"_pages-
|
|
72
|
-
"_components-
|
|
71
|
+
"_pages-eeRVG3GZ.js",
|
|
72
|
+
"_components-CEsu6itL.js",
|
|
73
73
|
"_vendor-three-DwGkEfCM.js",
|
|
74
74
|
"_vendor-recharts-reihe2SJ.js",
|
|
75
75
|
"_vendor-codemirror-C5to5cK4.js"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as e1,p as $n,d as n1,r as p,j as e,R as Y,n as H1,a as Ee,C as Ne,b as q,s as Zn,e as Gn,f as se,g as De,h as Ze,i as _e,k as ve,l as Un,m as Qn,o as le,q as jn,t as qn,u as Wn,v as o,w as m,x as Ae,$ as N,L as K1,y as Jn,z as Xn,A as Yn,B as et,D as f1,F as Oe,E as ue,G as nt,H as tt,I as B1,S as at,J as it,Q as L1,K as rt,M as lt,N as ot,P as Ge,O as $1,T as st,U as ct,V as dt,W as ut,X as mt,Y as pt,Z as ht,_ as gt,a0 as ft,a1 as ze,a2 as z,a3 as Z1,a4 as Lt,a5 as Ct,a6 as vt,a7 as yt,a8 as bt}from"./vendor-DsnEJuEV.js";import{u as kt,_ as X,a as Se,b as Q,c as V,T as R,F as G1,d as B,I as E,e as S,f as G,A as wt,g as U1,h as y,i as D,j as b,k as xt,l as St,P as Mt,R as $,m as Me,n as Tt,o as It,L as t1,p as ee,q as ne,r as Te,s as Et,t as Q1,E as j1,v as Dt,w as Vt,x as _t,y as Ft,z as Nt,B as Pt,C as C1,D as At,G as Ot}from"./vendor-arizeai-DtynTLNi.js";import{u as zt}from"./pages-
|
|
1
|
+
import{c as e1,p as $n,d as n1,r as p,j as e,R as Y,n as H1,a as Ee,C as Ne,b as q,s as Zn,e as Gn,f as se,g as De,h as Ze,i as _e,k as ve,l as Un,m as Qn,o as le,q as jn,t as qn,u as Wn,v as o,w as m,x as Ae,$ as N,L as K1,y as Jn,z as Xn,A as Yn,B as et,D as f1,F as Oe,E as ue,G as nt,H as tt,I as B1,S as at,J as it,Q as L1,K as rt,M as lt,N as ot,P as Ge,O as $1,T as st,U as ct,V as dt,W as ut,X as mt,Y as pt,Z as ht,_ as gt,a0 as ft,a1 as ze,a2 as z,a3 as Z1,a4 as Lt,a5 as Ct,a6 as vt,a7 as yt,a8 as bt}from"./vendor-DsnEJuEV.js";import{u as kt,_ as X,a as Se,b as Q,c as V,T as R,F as G1,d as B,I as E,e as S,f as G,A as wt,g as U1,h as y,i as D,j as b,k as xt,l as St,P as Mt,R as $,m as Me,n as Tt,o as It,L as t1,p as ee,q as ne,r as Te,s as Et,t as Q1,E as j1,v as Dt,w as Vt,x as _t,y as Ft,z as Nt,B as Pt,C as C1,D as At,G as Ot}from"./vendor-arizeai-DtynTLNi.js";import{u as zt}from"./pages-eeRVG3GZ.js";import{V as Rt}from"./vendor-three-DwGkEfCM.js";import{j as q1,E as W1,l as J1,a as X1,R as Re,n as He,p as Ht,b as Kt}from"./vendor-codemirror-C5to5cK4.js";const Bt=n=>{const t=a=>({markdownDisplayMode:"text",setMarkdownDisplayMode:i=>{a({markdownDisplayMode:i})},traceStreamingEnabled:!0,setTraceStreamingEnabled:i=>{a({traceStreamingEnabled:i})},showSpanAside:!0,setShowSpanAside:i=>{a({showSpanAside:i})},showMetricsInTraceTree:!0,setShowMetricsInTraceTree:i=>{a({showMetricsInTraceTree:i})},...n});return e1()($n(n1(t),{name:"arize-phoenix-preferences"}))},Y1=p.createContext(null);function F2({children:n,...t}){const a=p.useRef();return a.current||(a.current=Bt(t)),e(Y1.Provider,{value:a.current,children:n})}function ke(n,t){const a=Y.useContext(Y1);if(!a)throw new Error("Missing PreferencesContext.Provider in the tree");return H1(a,n,t)}var Z=(n=>(n.primary="primary",n.reference="reference",n.corpus="corpus",n))(Z||{});function A(n){throw new Error("Unreachable")}function a1(n){return typeof n=="number"||n===null}function $t(n){return typeof n=="string"||n===null}function N2(n){return Array.isArray(n)?n.every(t=>typeof t=="string"):!1}function Zt(n){return typeof n=="object"&&n!==null}const i1=p.createContext(null);function Ke(){const n=Y.useContext(i1);if(n===null)throw new Error("useInferences must be used within a InferencesProvider");return n}function P2(n){return e(i1.Provider,{value:{primaryInferences:n.primaryInferences,referenceInferences:n.referenceInferences,corpusInferences:n.corpusInferences,getInferencesNameByRole:t=>{var a,i;switch(t){case Z.primary:return n.primaryInferences.name;case Z.reference:return((a=n.referenceInferences)==null?void 0:a.name)??"reference";case Z.corpus:return((i=n.corpusInferences)==null?void 0:i.name)??"corpus";default:A()}}},children:n.children})}const en=function(){var n={defaultValue:null,kind:"LocalArgument",name:"clusters"},t={defaultValue:null,kind:"LocalArgument",name:"dataQualityMetricColumnName"},a={defaultValue:null,kind:"LocalArgument",name:"fetchDataQualityMetric"},i={defaultValue:null,kind:"LocalArgument",name:"fetchPerformanceMetric"},r={defaultValue:null,kind:"LocalArgument",name:"performanceMetric"},l=[{alias:null,args:null,kind:"ScalarField",name:"primaryValue",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"referenceValue",storageKey:null}],s=[{alias:null,args:[{kind:"Variable",name:"clusters",variableName:"clusters"}],concreteType:"Cluster",kind:"LinkedField",name:"clusters",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"eventIds",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"driftRatio",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"primaryToCorpusRatio",storageKey:null},{condition:"fetchDataQualityMetric",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[{fields:[{kind:"Variable",name:"columnName",variableName:"dataQualityMetricColumnName"},{kind:"Literal",name:"metric",value:"mean"}],kind:"ObjectValue",name:"metric"}],concreteType:"DatasetValues",kind:"LinkedField",name:"dataQualityMetric",plural:!1,selections:l,storageKey:null}]},{condition:"fetchPerformanceMetric",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[{fields:[{kind:"Variable",name:"metric",variableName:"performanceMetric"}],kind:"ObjectValue",name:"metric"}],concreteType:"DatasetValues",kind:"LinkedField",name:"performanceMetric",plural:!1,selections:l,storageKey:null}]}],storageKey:null}];return{fragment:{argumentDefinitions:[n,t,a,i,r],kind:"Fragment",metadata:null,name:"pointCloudStore_clusterMetricsQuery",selections:s,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,a,t,i,r],kind:"Operation",name:"pointCloudStore_clusterMetricsQuery",selections:s},params:{cacheID:"86666967012812887ac0a0149d2d2535",id:null,metadata:{},name:"pointCloudStore_clusterMetricsQuery",operationKind:"query",text:`query pointCloudStore_clusterMetricsQuery(
|
|
2
2
|
$clusters: [ClusterInput!]!
|
|
3
3
|
$fetchDataQualityMetric: Boolean!
|
|
4
4
|
$dataQualityMetricColumnName: String
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as d,j as e,d4 as P,v as s,F,R as v,w as E,aP as S,d5 as L,d6 as R,d7 as a,d8 as w,d9 as z,b as A,da as j}from"./vendor-DsnEJuEV.js";import{S as C,j as k,Z as $,U as _,t as I,a4 as O}from"./vendor-arizeai-DtynTLNi.js";import{E as T,L as D,a as N,h as G,M,b as m,D as U,d as B,c as q,e as J,P as K,f as W,T as H,p as V,g,i as Y,j as Z,k as u,l as Q,m as h,n as b,o as X,q as ee,r as re,s as ae,t as te,A as oe,S as ne,F as se}from"./pages-
|
|
1
|
+
import{r as d,j as e,d4 as P,v as s,F,R as v,w as E,aP as S,d5 as L,d6 as R,d7 as a,d8 as w,d9 as z,b as A,da as j}from"./vendor-DsnEJuEV.js";import{S as C,j as k,Z as $,U as _,t as I,a4 as O}from"./vendor-arizeai-DtynTLNi.js";import{E as T,L as D,a as N,h as G,M,b as m,D as U,d as B,c as q,e as J,P as K,f as W,T as H,p as V,g,i as Y,j as Z,k as u,l as Q,m as h,n as b,o as X,q as ee,r as re,s as ae,t as te,A as oe,S as ne,F as se}from"./pages-eeRVG3GZ.js";import{b9 as ie,d as le,R as ce,ba as de,bb as pe}from"./components-CEsu6itL.js";import"./vendor-three-DwGkEfCM.js";import"./vendor-recharts-reihe2SJ.js";import"./vendor-codemirror-C5to5cK4.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))c(t);new MutationObserver(t=>{for(const o of t)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&c(i)}).observe(document,{childList:!0,subtree:!0});function l(t){const o={};return t.integrity&&(o.integrity=t.integrity),t.referrerPolicy&&(o.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?o.credentials="include":t.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function c(t){if(t.ep)return;t.ep=!0;const o=l(t);fetch(t.href,o)}})();const x="arize-phoenix-feature-flags",p={__CLEAR__:!0};function me(){const r=localStorage.getItem(x);if(!r)return p;try{const n=JSON.parse(r);return Object.assign({},p,n)}catch{return p}}const f=d.createContext(null);function ge(){const r=v.useContext(f);if(r===null)throw new Error("useFeatureFlags must be used within a FeatureFlagsProvider");return r}function ue(r){const[n,l]=d.useState(me()),c=t=>{localStorage.setItem(x,JSON.stringify(t)),l(t)};return e(f.Provider,{value:{featureFlags:n,setFeatureFlags:c},children:e(he,{children:r.children})})}function he(r){const{children:n}=r,{featureFlags:l,setFeatureFlags:c}=ge(),[t,o]=d.useState(!1);return P("ctrl+shift+f",()=>o(!0)),s(F,{children:[n,e(_,{type:"modal",isDismissable:!0,onDismiss:()=>o(!1),children:t&&e(C,{title:"Feature Flags",children:e(k,{height:"size-1000",padding:"size-100",children:Object.keys(l).map(i=>e($,{isSelected:l[i],onChange:y=>c({...l,[i]:y}),children:i},i))})})})]})}function be(){return e(S,{styles:r=>E`
|
|
2
2
|
body {
|
|
3
3
|
background-color: var(--ac-global-color-grey-75);
|
|
4
4
|
color: var(--ac-global-text-color-900);
|