arize-phoenix 5.1.3__py3-none-any.whl → 5.1.4__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-5.1.3.dist-info → arize_phoenix-5.1.4.dist-info}/METADATA +1 -1
- {arize_phoenix-5.1.3.dist-info → arize_phoenix-5.1.4.dist-info}/RECORD +11 -11
- phoenix/server/static/.vite/manifest.json +9 -9
- phoenix/server/static/assets/{components-XIEhA1rq.js → components-rP68rA45.js} +2 -2
- phoenix/server/static/assets/{index-DY9zA_Wc.js → index-CHLTxqHu.js} +1 -1
- phoenix/server/static/assets/{pages-BGZBXlrn.js → pages-gwtz6mex.js} +5 -5
- phoenix/trace/otel.py +2 -1
- phoenix/version.py +1 -1
- {arize_phoenix-5.1.3.dist-info → arize_phoenix-5.1.4.dist-info}/WHEEL +0 -0
- {arize_phoenix-5.1.3.dist-info → arize_phoenix-5.1.4.dist-info}/licenses/IP_NOTICE +0 -0
- {arize_phoenix-5.1.3.dist-info → arize_phoenix-5.1.4.dist-info}/licenses/LICENSE +0 -0
|
@@ -6,7 +6,7 @@ phoenix/exceptions.py,sha256=n2L2KKuecrdflB9MsCdAYCiSEvGJptIsfRkXMoJle7A,169
|
|
|
6
6
|
phoenix/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
7
7
|
phoenix/services.py,sha256=aTxhcOA1pZHB6U-B3TEcp6fqDF5oT0xCUvEUNMZVTUQ,5175
|
|
8
8
|
phoenix/settings.py,sha256=ht-0oN-sMV6SPXrk7Tu1EZlngpAYkGNLYPhO8DyrdQI,661
|
|
9
|
-
phoenix/version.py,sha256=
|
|
9
|
+
phoenix/version.py,sha256=wQ7GIU7vx8_5kvdxc8_FSLwGCA9W3Ex29OSYU0A5tyo,22
|
|
10
10
|
phoenix/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
phoenix/core/embedding_dimension.py,sha256=zKGbcvwOXgLf-yrJBpQyKtd-LEOPRKHnUToyAU8Owis,87
|
|
12
12
|
phoenix/core/model.py,sha256=km_a--PBHOuA337ClRw9xqhOHhrUT6Rl9pz_zV0JYkQ,4843
|
|
@@ -258,10 +258,10 @@ phoenix/server/static/apple-touch-icon-76x76.png,sha256=CT_xT12I0u2i0WU8JzBZBuOQ
|
|
|
258
258
|
phoenix/server/static/apple-touch-icon.png,sha256=fOfpjqGpWYbJ0eAurKsyoZP1EAs6ZVooBJ_SGk2ZkDs,3801
|
|
259
259
|
phoenix/server/static/favicon.ico,sha256=bY0vvCKRftemZfPShwZtE93DiiQdaYaozkPGwNFr6H8,34494
|
|
260
260
|
phoenix/server/static/modernizr.js,sha256=mvK-XtkNqjOral-QvzoqsyOMECXIMu5BQwSVN_wcU9c,2564
|
|
261
|
-
phoenix/server/static/.vite/manifest.json,sha256=
|
|
262
|
-
phoenix/server/static/assets/components-
|
|
263
|
-
phoenix/server/static/assets/index-
|
|
264
|
-
phoenix/server/static/assets/pages-
|
|
261
|
+
phoenix/server/static/.vite/manifest.json,sha256=m-L41ESalPUFFiNXV5MXzbjrXvWRe0EGb4OYPZiMiS4,1929
|
|
262
|
+
phoenix/server/static/assets/components-rP68rA45.js,sha256=09AjciFfDrLsdvf664-0OWZMl4w5Da9SZ9wrCdsyOk4,260149
|
|
263
|
+
phoenix/server/static/assets/index-CHLTxqHu.js,sha256=Eq7C2V8KWJYa50N80IlfHHxwq3MgmJy8CIDNfGXo04Y,6947
|
|
264
|
+
phoenix/server/static/assets/pages-gwtz6mex.js,sha256=pXDio_UYT8pRWwSONS8kNFIbCRaacVP8ZiUiTXZ4Tj0,557771
|
|
265
265
|
phoenix/server/static/assets/vendor-D8cj1ZYg.js,sha256=UeDWj3xjmDOo7XvqugE_ePbZZG_o1X6QqdB2Jop7dPs,1435307
|
|
266
266
|
phoenix/server/static/assets/vendor-DxkFTwjz.css,sha256=nZrkr0u6NNElFGvpWHk9GTHeGoibCXCli1bE7mXZGZg,1816
|
|
267
267
|
phoenix/server/static/assets/vendor-arizeai-BU1VHwXB.js,sha256=6rYhFTNVr64dh6y8iVOiRUr9YGLxTXJO2vbOlvltamE,304401
|
|
@@ -281,7 +281,7 @@ phoenix/trace/errors.py,sha256=wB1z8qdPckngdfU-TORToekvg3344oNFAA83_hC2yFY,180
|
|
|
281
281
|
phoenix/trace/evaluation_conventions.py,sha256=t8jydM3U0-T5YpiQKRJ3tWdWGlHtzKyttYdw-ddvPOk,1048
|
|
282
282
|
phoenix/trace/exporter.py,sha256=bUXh8fjJIbHurrnt4bAm-cCWqUN5FqNsIc8DZzzklkQ,4695
|
|
283
283
|
phoenix/trace/fixtures.py,sha256=nfVbYYCNNO6HX5SRZHPxcy6tZZkC8xc3FbvvMLfsDhA,19005
|
|
284
|
-
phoenix/trace/otel.py,sha256=
|
|
284
|
+
phoenix/trace/otel.py,sha256=c3Iy9sUTYBliwYfChZIQ9_6xTti1BijY7t_4s2tqbyw,10028
|
|
285
285
|
phoenix/trace/projects.py,sha256=2BwlNjFE-uwpqYtCu5YyBiYZk9wRPpM13vh3-Cv7GkA,2157
|
|
286
286
|
phoenix/trace/schemas.py,sha256=HpWSyzec0yDHEQXEDuwyLbhpvKrqkGps8BJqGiIFj8Y,5978
|
|
287
287
|
phoenix/trace/span_evaluations.py,sha256=GaADtJLi2njra4aYaie0BIwkSgdxPB_SNseglI4ykZA,13104
|
|
@@ -306,8 +306,8 @@ phoenix/utilities/logging.py,sha256=B8t2WPULOwVyuGLRLbwKsw5N41N26vtgF-lCAYgWTEk,
|
|
|
306
306
|
phoenix/utilities/project.py,sha256=8IJuMM4yUMoooPi37sictGj8Etu9rGmq6RFtc9848cQ,436
|
|
307
307
|
phoenix/utilities/re.py,sha256=nr_B0txj_7CXc45953X6vr2KCRSWMuaXJSEkL8s8Sjc,2036
|
|
308
308
|
phoenix/utilities/span_store.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
309
|
-
arize_phoenix-5.1.
|
|
310
|
-
arize_phoenix-5.1.
|
|
311
|
-
arize_phoenix-5.1.
|
|
312
|
-
arize_phoenix-5.1.
|
|
313
|
-
arize_phoenix-5.1.
|
|
309
|
+
arize_phoenix-5.1.4.dist-info/METADATA,sha256=dJXHwHorZ7a3TOTwg12O0Thp4TSnbar7HrUF9QB_VoY,11833
|
|
310
|
+
arize_phoenix-5.1.4.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
311
|
+
arize_phoenix-5.1.4.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
|
|
312
|
+
arize_phoenix-5.1.4.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
|
|
313
|
+
arize_phoenix-5.1.4.dist-info/RECORD,,
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_components-
|
|
3
|
-
"file": "assets/components-
|
|
2
|
+
"_components-rP68rA45.js": {
|
|
3
|
+
"file": "assets/components-rP68rA45.js",
|
|
4
4
|
"name": "components",
|
|
5
5
|
"imports": [
|
|
6
6
|
"_vendor-D8cj1ZYg.js",
|
|
7
7
|
"_vendor-arizeai-BU1VHwXB.js",
|
|
8
|
-
"_pages-
|
|
8
|
+
"_pages-gwtz6mex.js",
|
|
9
9
|
"_vendor-three-DwGkEfCM.js",
|
|
10
10
|
"_vendor-codemirror-BDMHmh1x.js"
|
|
11
11
|
]
|
|
12
12
|
},
|
|
13
|
-
"_pages-
|
|
14
|
-
"file": "assets/pages-
|
|
13
|
+
"_pages-gwtz6mex.js": {
|
|
14
|
+
"file": "assets/pages-gwtz6mex.js",
|
|
15
15
|
"name": "pages",
|
|
16
16
|
"imports": [
|
|
17
17
|
"_vendor-D8cj1ZYg.js",
|
|
18
18
|
"_vendor-arizeai-BU1VHwXB.js",
|
|
19
|
-
"_components-
|
|
19
|
+
"_components-rP68rA45.js",
|
|
20
20
|
"_vendor-recharts-BATX_8yP.js",
|
|
21
21
|
"_vendor-codemirror-BDMHmh1x.js"
|
|
22
22
|
]
|
|
@@ -61,15 +61,15 @@
|
|
|
61
61
|
"name": "vendor-three"
|
|
62
62
|
},
|
|
63
63
|
"index.tsx": {
|
|
64
|
-
"file": "assets/index-
|
|
64
|
+
"file": "assets/index-CHLTxqHu.js",
|
|
65
65
|
"name": "index",
|
|
66
66
|
"src": "index.tsx",
|
|
67
67
|
"isEntry": true,
|
|
68
68
|
"imports": [
|
|
69
69
|
"_vendor-D8cj1ZYg.js",
|
|
70
70
|
"_vendor-arizeai-BU1VHwXB.js",
|
|
71
|
-
"_pages-
|
|
72
|
-
"_components-
|
|
71
|
+
"_pages-gwtz6mex.js",
|
|
72
|
+
"_components-rP68rA45.js",
|
|
73
73
|
"_vendor-three-DwGkEfCM.js",
|
|
74
74
|
"_vendor-recharts-BATX_8yP.js",
|
|
75
75
|
"_vendor-codemirror-BDMHmh1x.js"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as $e,p as at,d as Ze,r as g,j as e,R as W,n as U1,a as Fe,C as Oe,b as X,s as it,e as rt,f as de,g as _e,h as Je,i as ze,k as ue,l as l1,m as lt,o as le,q as ot,t as st,u as o1,v as o,w as m,L as Q1,x as ct,N as dt,y as ut,z as mt,$ as N,A as Ge,B as pt,D as ht,E as gt,F as ft,G as w1,H as ce,I as he,J as Lt,K as j1,S as Ct,M as yt,Q as x1,O as vt,P as bt,T as kt,U as Ye,V as q1,W as wt,X as xt,Y as St,Z as Mt,_ as Tt,a0 as It,a1 as Et,a2 as Dt,a3 as Vt,a4 as Te,a5 as F,a6 as W1,a7 as Pt,a8 as Ft,a9 as _t,aa as At,ab as Nt,ac as zt,ad as Rt}from"./vendor-D8cj1ZYg.js";import{u as Ot,A as Ht,I,a as x,_ as X1,b as v,c as D,d as b,e as H,f as q,T as B,g as Kt,h as Y,i as Ie,j as V,F as J1,k as z,l as Bt,m as $t,P as Zt,R as U,n as Ee,o as Gt,p as Ut,L as d1,q as ee,r as ne,s as De,t as Y1,v as en,E as nn,w as Qt,x as jt,y as qt,z as Wt,B as tn,C as u1,D as Xt,G as Jt,H as S1,J as Yt}from"./vendor-arizeai-BU1VHwXB.js";import{u as ea}from"./pages-
|
|
1
|
+
import{c as $e,p as at,d as Ze,r as g,j as e,R as W,n as U1,a as Fe,C as Oe,b as X,s as it,e as rt,f as de,g as _e,h as Je,i as ze,k as ue,l as l1,m as lt,o as le,q as ot,t as st,u as o1,v as o,w as m,L as Q1,x as ct,N as dt,y as ut,z as mt,$ as N,A as Ge,B as pt,D as ht,E as gt,F as ft,G as w1,H as ce,I as he,J as Lt,K as j1,S as Ct,M as yt,Q as x1,O as vt,P as bt,T as kt,U as Ye,V as q1,W as wt,X as xt,Y as St,Z as Mt,_ as Tt,a0 as It,a1 as Et,a2 as Dt,a3 as Vt,a4 as Te,a5 as F,a6 as W1,a7 as Pt,a8 as Ft,a9 as _t,aa as At,ab as Nt,ac as zt,ad as Rt}from"./vendor-D8cj1ZYg.js";import{u as Ot,A as Ht,I,a as x,_ as X1,b as v,c as D,d as b,e as H,f as q,T as B,g as Kt,h as Y,i as Ie,j as V,F as J1,k as z,l as Bt,m as $t,P as Zt,R as U,n as Ee,o as Gt,p as Ut,L as d1,q as ee,r as ne,s as De,t as Y1,v as en,E as nn,w as Qt,x as jt,y as qt,z as Wt,B as tn,C as u1,D as Xt,G as Jt,H as S1,J as Yt}from"./vendor-arizeai-BU1VHwXB.js";import{u as ea}from"./pages-gwtz6mex.js";import{V as na}from"./vendor-three-DwGkEfCM.js";import{j as an,E as rn,l as ln,a as on,R as Ue,n as Qe,p as ta,b as aa}from"./vendor-codemirror-BDMHmh1x.js";const ia=n=>{const t=a=>({markdownDisplayMode:"text",setMarkdownDisplayMode:i=>{a({markdownDisplayMode:i})},traceStreamingEnabled:!0,setTraceStreamingEnabled:i=>{a({traceStreamingEnabled:i})},lastNTimeRangeKey:"7d",setLastNTimeRangeKey:i=>{a({lastNTimeRangeKey:i})},projectsAutoRefreshEnabled:!0,setProjectAutoRefreshEnabled:i=>{a({projectsAutoRefreshEnabled:i})},showSpanAside:!0,setShowSpanAside:i=>{a({showSpanAside:i})},showMetricsInTraceTree:!0,setShowMetricsInTraceTree:i=>{a({showMetricsInTraceTree:i})},...n});return $e()(at(Ze(t),{name:"arize-phoenix-preferences"}))},sn=g.createContext(null);function ol({children:n,...t}){const[a]=g.useState(()=>ia(t));return e(sn.Provider,{value:a,children:n})}function se(n,t){const a=W.useContext(sn);if(!a)throw new Error("Missing PreferencesContext.Provider in the tree");return U1(a,n,t)}var Q=(n=>(n.primary="primary",n.reference="reference",n.corpus="corpus",n))(Q||{});function R(n){throw new Error("Unreachable")}function m1(n){return typeof n=="number"||n===null}function ra(n){return typeof n=="string"||n===null}function sl(n){return Array.isArray(n)?n.every(t=>typeof t=="string"):!1}function la(n){return typeof n=="object"&&n!==null}const p1=g.createContext(null);function je(){const n=W.useContext(p1);if(n===null)throw new Error("useInferences must be used within a InferencesProvider");return n}function cl(n){return e(p1.Provider,{value:{primaryInferences:n.primaryInferences,referenceInferences:n.referenceInferences,corpusInferences:n.corpusInferences,getInferencesNameByRole:t=>{var a,i;switch(t){case Q.primary:return n.primaryInferences.name;case Q.reference:return((a=n.referenceInferences)==null?void 0:a.name)??"reference";case Q.corpus:return((i=n.corpusInferences)==null?void 0:i.name)??"corpus";default:R()}}},children:n.children})}const cn=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
|
|
@@ -144,7 +144,7 @@ import{c as $e,p as at,d as Ze,r as g,j as e,R as W,n as U1,a as Fe,C as Oe,b as
|
|
|
144
144
|
id
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
`}}}();mn.hash="e8fa488a0d466b5e40fdadc1e5227a57";const oa=30,M1=5,T1=100,sa=0,I1=0,E1=.99,ca=500,D1=300,V1=1e5,da=10,P1=1,ua=2,ma=1,pa=0;var T=(n=>(n.inferences="inferences",n.correctness="correctness",n.dimension="dimension",n))(T||{}),fe=(n=>(n.list="list",n.gallery="gallery",n))(fe||{}),ge=(n=>(n.small="small",n.medium="medium",n.large="large",n))(ge||{}),E=(n=>(n.primary="primary",n.reference="reference",n.corpus="corpus",n))(E||{}),_=(n=>(n.correct="correct",n.incorrect="incorrect",n.unknown="unknown",n))(_||{});const ha=["#05fbff","#cb8afd"],ga=["#00add0","#4500d9"],J="#a5a5a5",me=J;function fa(n){return n.endsWith("/")?n.slice(0,-1):n}const Ve=`${window.location.protocol}//${window.location.host}${fa(window.Config.basename)}`,dl=window.Config.platformVersion,He="returnUrl",La=()=>window.location.pathname+window.location.search,Ca=()=>`${He}=${encodeURIComponent(La())}`,ul=({path:n,searchParams:t})=>{const i=new URL(window.location.href).searchParams.get(He),r=new URLSearchParams(t||{});i&&r.set(He,i);const l=r.toString();return`${n}${l?`?${l}`:""}`},ya=n=>!(typeof n!="string"||!n.startsWith("/")||n.replace(/\\/g,"/").startsWith("//")),va=n=>ya(n)?n:"/",ml=()=>{const n=new URL(window.location.href);return va(n.searchParams.get(He))},ba=Ve+"/auth/refresh";class F1 extends Error{constructor(){super("Unauthorized")}}async function ka(n,t){try{return await fetch(n,t).then(a=>{if(a.status===401)throw new F1;return a})}catch(a){if(a instanceof F1)return await wa(),fetch(n,t)}throw new Error("An unexpected error occurred while fetching data")}let be=null;async function wa(){return be||(be=fetch(ba,{method:"POST"}).then(n=>(n.ok||(window.location.href=`/login?${Ca()}`),be=null,n)),be)}const xa=Ve+"/graphql",Sa=window.Config.authenticationEnabled?ka:fetch,Ma=async(n,t,a)=>{const r=await(await Sa(xa,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:n.text,variables:t})})).json();if(Array.isArray(r.errors))throw new Error(`Error fetching GraphQL query '${n.name}' with variables '${JSON.stringify(t)}': ${JSON.stringify(r.errors)}`);return r},Pe=new Fe.Environment({network:Fe.Network.create(Ma),store:new Fe.Store(new Fe.RecordSource,{gcReleaseBufferSize:10})});function pn(n){return n.includes("PRIMARY")?Q.primary:n.includes("CORPUS")?Q.corpus:Q.reference}function h1(n){const t=[],a=[],i=[];return n.forEach(r=>{const l=pn(r);l==Q.primary?t.push(r):l==Q.corpus?i.push(r):a.push(r)}),{primaryEventIds:t,referenceEventIds:a,corpusEventIds:i}}const Ke=10,we="unknown",hn=rt,gn=it,Ta=n=>gn[n],Ia=n=>hn(n/Ke);var Le=(n=>(n.move="move",n.select="select",n))(Le||{}),g1=(n=>(n.default="default",n.highlight="highlight",n))(g1||{});const pe=()=>bn()==="light"?ga:ha;function pl(){const n=pe();return{coloringStrategy:T.inferences,pointGroupVisibility:{[E.primary]:!0,[E.reference]:!0},pointGroupColors:{[E.primary]:n[0],[E.reference]:n[1],[E.corpus]:J},metric:{type:"drift",metric:"euclideanDistance"}}}function hl(){const n=pe();return{coloringStrategy:T.inferences,pointGroupVisibility:{[E.primary]:!0,[E.corpus]:!0},pointGroupColors:{[E.primary]:n[0],[E.corpus]:J},metric:{type:"retrieval",metric:"queryDistance"},clusterSort:{dir:"desc",column:"primaryMetricValue"}}}function gl(){return{coloringStrategy:T.correctness,pointGroupVisibility:{[_.correct]:!0,[_.incorrect]:!0,[_.unknown]:!0},pointGroupColors:{[_.correct]:Oe.Discrete2.LightBlueOrange[0],[_.incorrect]:Oe.Discrete2.LightBlueOrange[1],[_.unknown]:me},metric:{type:"performance",metric:"accuracyScore"},clusterSort:{dir:"asc",column:"primaryMetricValue"}}}const Ea=n=>{const t={loading:!1,errorMessage:null,points:[],eventIdToDataMap:new Map,clusters:[],clusterSort:{dir:"desc",column:"driftRatio"},pointData:null,selectedEventIds:new Set,hoveredEventId:null,highlightedClusterId:null,selectedClusterId:null,canvasMode:"move",pointSizeScale:1,clusterColorMode:"default",coloringStrategy:T.inferences,inferencesVisibility:{primary:!0,reference:!0,corpus:!0},pointGroupVisibility:{[E.primary]:!0,[E.reference]:!0,[E.corpus]:!0},pointGroupColors:{[E.primary]:pe()[0],[E.reference]:pe()[1],[E.corpus]:J},eventIdToGroup:{},selectionDisplay:fe.gallery,selectionGridSize:ge.large,dimension:null,dimensionMetadata:null,umapParameters:{minDist:sa,nNeighbors:oa,nSamples:ca},hdbscanParameters:{minClusterSize:da,clusterMinSamples:ma,clusterSelectionEpsilon:pa},clustersLoading:!1,metric:{type:"drift",metric:"euclideanDistance"},selectionSearchText:""},a=(i,r)=>({...t,...n,setInitialData:async({points:l,clusters:s,retrievals:d})=>{const c=r(),u=new Map,h=d.reduce((L,C)=>{const{queryId:w}=C;return L[w]?L[w].push(C):L[w]=[C],L},{});l.forEach(L=>{L={...L,retrievals:h[L.eventId]??[]},u.set(L.eventId,L)});const p=s.map(A1).sort(n1(c.clusterSort));i({loading:!1,points:l,eventIdToDataMap:u,clusters:p,clustersLoading:!1,selectedEventIds:new Set,selectedClusterId:null,pointData:null,eventIdToGroup:re({points:l,coloringStrategy:c.coloringStrategy,pointsData:c.pointData??{},dimension:c.dimension||null,dimensionMetadata:c.dimensionMetadata})});const f=await Pa(l.map(L=>L.eventId)).catch(()=>i({errorMessage:"Failed to load the point events"}));f&&i({pointData:f,clusters:p,clustersLoading:!1,eventIdToGroup:re({points:l,coloringStrategy:c.coloringStrategy,pointsData:f??{},dimension:c.dimension||null,dimensionMetadata:c.dimensionMetadata})})},setClusters:l=>{const s=r(),d=l.map(A1).sort(n1(s.clusterSort));i({clusters:d,clustersLoading:!1,selectedClusterId:null,highlightedClusterId:null})},setClusterSort:l=>{const d=[...r().clusters].sort(n1(l));i({clusterSort:l,clusters:d})},setSelectedEventIds:l=>i({selectedEventIds:l,selectionSearchText:""}),setHoveredEventId:l=>i({hoveredEventId:l}),setHighlightedClusterId:l=>i({highlightedClusterId:l}),setSelectedClusterId:l=>i({selectedClusterId:l,highlightedClusterId:null}),setPointSizeScale:l=>i({pointSizeScale:l}),setCanvasMode:l=>i({canvasMode:l}),setClusterColorMode:l=>i({clusterColorMode:l}),setColoringStrategy:l=>{const s=r();switch(i({coloringStrategy:l}),l){case T.correctness:i({pointGroupVisibility:{[_.correct]:!0,[_.incorrect]:!0,[_.unknown]:!0},pointGroupColors:{[_.correct]:Oe.Discrete2.LightBlueOrange[0],[_.incorrect]:Oe.Discrete2.LightBlueOrange[1],[_.unknown]:me},dimension:null,dimensionMetadata:null,eventIdToGroup:re({points:s.points,coloringStrategy:l,pointsData:s.pointData??{},dimension:s.dimension||null,dimensionMetadata:s.dimensionMetadata})});break;case T.inferences:{i({pointGroupVisibility:{[E.primary]:!0,[E.reference]:!0,[E.corpus]:!0},pointGroupColors:{[E.primary]:pe()[0],[E.reference]:pe()[1],[E.corpus]:J},dimension:null,dimensionMetadata:null,eventIdToGroup:re({points:s.points,coloringStrategy:l,pointsData:s.pointData??{},dimension:s.dimension||null,dimensionMetadata:s.dimensionMetadata})});break}case T.dimension:{i({pointGroupVisibility:{unknown:!0},pointGroupColors:{unknown:me},dimension:null,dimensionMetadata:null,eventIdToGroup:re({points:s.points,coloringStrategy:l,pointsData:s.pointData??{},dimension:s.dimension||null,dimensionMetadata:s.dimensionMetadata})});break}default:R()}},inferencesVisibility:{primary:!0,reference:!0,corpus:!0},setInferencesVisibility:l=>i({inferencesVisibility:l}),setPointGroupVisibility:l=>i({pointGroupVisibility:l}),selectionDisplay:fe.gallery,setSelectionDisplay:l=>i({selectionDisplay:l}),setSelectionGridSize:l=>i({selectionGridSize:l}),reset:()=>{i({points:[],clusters:[],selectedEventIds:new Set,selectedClusterId:null,eventIdToGroup:{}})},setDimension:async l=>{const s=r();i({dimension:l,dimensionMetadata:null});const d=await Va(l).catch(()=>i({errorMessage:"Failed to load the dimension metadata"}));if(d){if(i({dimensionMetadata:d}),d.categories&&d.categories.length){const c=d.categories.length,h=c<=gn.length?Ta:p=>hn(p/c);i({pointGroupVisibility:{...d.categories.reduce((p,f)=>({...p,[f]:!0}),{}),unknown:!0},pointGroupColors:{...d.categories.reduce((p,f,L)=>({...p,[f]:h(L)}),{}),unknown:me},eventIdToGroup:re({points:s.points,coloringStrategy:s.coloringStrategy,pointsData:s.pointData??{},dimension:l,dimensionMetadata:d})})}else if(d.interval!==null){const c=fn(d.interval);i({pointGroupVisibility:{...c.reduce((u,h)=>({...u,[h.name]:!0}),{}),unknown:!0},pointGroupColors:{...c.reduce((u,h,p)=>({...u,[h.name]:Ia(p)}),{}),unknown:me},eventIdToGroup:re({points:s.points,coloringStrategy:s.coloringStrategy,pointsData:s.pointData??{},dimension:l,dimensionMetadata:d})})}}},setDimensionMetadata:l=>i({dimensionMetadata:l}),setUMAPParameters:l=>i({umapParameters:l}),setHDBSCANParameters:async l=>{const s=r();i({hdbscanParameters:l,clustersLoading:!0});const d=await Fa({metric:s.metric,points:s.points,hdbscanParameters:l});s.setClusters(d)},getHDSCANParameters:()=>r().hdbscanParameters,getMetric:()=>r().metric,setErrorMessage:l=>i({errorMessage:l}),setLoading:l=>i({loading:l}),setMetric:async l=>{const s=r();i({metric:l,clustersLoading:!0});const d=await _a({metric:l,clusters:s.clusters,hdbscanParameters:s.hdbscanParameters});s.setClusters(d)},setSelectionSearchText:l=>i({selectionSearchText:l})});return $e()(Ze(a))},_1=new Intl.NumberFormat([],{maximumFractionDigits:2});function Da({min:n,max:t}){return`${_1.format(n)} - ${_1.format(t)}`}function fn({min:n,max:t}){const i=(t-n)/Ke,r=[];for(let l=0;l<Ke;l++){const s=n+l*i,d=n+(l+1)*i;r.push({min:s,max:d,name:Da({min:s,max:d})})}return r}function e1({numericGroupIntervals:n,numericValue:t}){let a=we,i=n.findIndex(r=>t>=r.min&&t<r.max);return i=i===-1?Ke-1:i,a=n[i].name,a}function re(n){const{points:t,coloringStrategy:a,pointsData:i,dimension:r,dimensionMetadata:l}=n,s={},d=t.map(c=>c.eventId);switch(a){case T.inferences:{const{primaryEventIds:c,referenceEventIds:u,corpusEventIds:h}=h1(d);c.forEach(p=>{s[p]=E.primary}),u.forEach(p=>{s[p]=E.reference}),h.forEach(p=>{s[p]=E.corpus});break}case T.correctness:{t.forEach(c=>{let u=_.unknown;const{predictionLabel:h,actualLabel:p}=c.eventMetadata;h!==null&&p!==null&&(u=h===p?_.correct:_.incorrect),s[c.eventId]=u});break}case T.dimension:{let c;l&&(l==null?void 0:l.interval)!==null&&(c=fn(l.interval));const u=(r==null?void 0:r.type)==="prediction"&&(r==null?void 0:r.dataType)==="categorical",h=(r==null?void 0:r.type)==="prediction"&&(r==null?void 0:r.dataType)==="numeric",p=(r==null?void 0:r.type)==="actual"&&(r==null?void 0:r.dataType)==="categorical",f=(r==null?void 0:r.type)==="actual"&&(r==null?void 0:r.dataType)==="numeric";t.forEach(L=>{let C=we;const w=i[L.eventId];if(r!=null&&w!=null)if(u)C=w.eventMetadata.predictionLabel??we;else if(h){if(c==null)throw new Error("Cannot color by prediction score without numeric group intervals");const S=w.eventMetadata.predictionScore;typeof S=="number"&&(C=e1({numericGroupIntervals:c,numericValue:S}))}else if(f){if(c==null)throw new Error("Cannot color by actual score without numeric group intervals");const S=w.eventMetadata.actualScore;typeof S=="number"&&(C=e1({numericGroupIntervals:c,numericValue:S}))}else if(p)C=w.eventMetadata.actualLabel??we;else{const S=w.dimensions.find(A=>A.dimension.name===r.name);if(S!=null&&r.dataType==="categorical")C=S.value??we;else if(S!=null&&r.dataType==="numeric"&&c!=null){const A=typeof(S==null?void 0:S.value)=="string"?parseFloat(S.value):null;typeof A=="number"&&(C=e1({numericGroupIntervals:c,numericValue:A}))}}s[L.eventId]=C});break}default:R()}return s}async function Va(n){const t=await X.fetchQuery(Pe,mn,{id:n.id,getDimensionMinMax:n.dataType==="numeric",getDimensionCategories:n.dataType==="categorical"}).toPromise(),a=t==null?void 0:t.dimension;if(!n)throw new Error("Dimension not found");let i=null;return typeof(a==null?void 0:a.min)=="number"&&typeof(a==null?void 0:a.max)=="number"&&(i={min:a.min,max:a.max}),{interval:i,categories:(a==null?void 0:a.categories)??null}}async function Pa(n){var u,h,p,f,L,C;const{primaryEventIds:t,referenceEventIds:a,corpusEventIds:i}=h1([...n]),r=await X.fetchQuery(Pe,un,{primaryEventIds:t,referenceEventIds:a,corpusEventIds:i}).toPromise(),l=((h=(u=r==null?void 0:r.model)==null?void 0:u.primaryInferences)==null?void 0:h.events)??[],s=((f=(p=r==null?void 0:r.model)==null?void 0:p.referenceInferences)==null?void 0:f.events)??[],d=((C=(L=r==null?void 0:r.model)==null?void 0:L.corpusInferences)==null?void 0:C.events)??[];return[...l,...s,...d].reduce((w,O)=>(w[O.id]=O,w),{})}async function Fa({metric:n,points:t,hdbscanParameters:a}){const i=await X.fetchQuery(Pe,dn,{eventIds:t.map(r=>r.eventId),coordinates:t.map(r=>({x:r.position[0],y:r.position[1],z:r.position[2]})),fetchDataQualityMetric:n.type==="dataQuality",dataQualityMetricColumnName:n.type==="dataQuality"?n.dimension.name:null,fetchPerformanceMetric:n.type==="performance",performanceMetric:n.type==="performance"?n.metric:"accuracyScore",...a},{fetchPolicy:"network-only"}).toPromise();return(i==null?void 0:i.hdbscanClustering)??[]}async function _a({metric:n,clusters:t,hdbscanParameters:a}){const i=await X.fetchQuery(Pe,cn,{clusters:t.map(r=>({id:r.id,eventIds:r.eventIds})),fetchDataQualityMetric:n.type==="dataQuality",dataQualityMetricColumnName:n.type==="dataQuality"?n.dimension.name:null,fetchPerformanceMetric:n.type==="performance",performanceMetric:n.type==="performance"?n.metric:"accuracyScore",...a},{fetchPolicy:"network-only"}).toPromise();return(i==null?void 0:i.clusters)??[]}const n1=n=>(t,a)=>{const{dir:i,column:r}=n,l=i==="asc",s=t[r],d=a[r];return s==null?1:d==null?-1:s>d?l?1:-1:s<d?l?-1:1:0};function A1(n){let t=n.driftRatio,a=null;return n.dataQualityMetric?(t=n.dataQualityMetric.primaryValue,a=n.dataQualityMetric.referenceValue):n.performanceMetric?(t=n.performanceMetric.primaryValue,a=n.performanceMetric.referenceValue):n.primaryToCorpusRatio!=null&&(t=(n.primaryToCorpusRatio+1)/2*100),{...n,size:n.eventIds.length,primaryMetricValue:t,referenceMetricValue:a}}const f1=g.createContext(null);function fl({children:n,...t}){const a=g.useRef();return a.current||(a.current=Ea(t)),e(f1.Provider,{value:a.current,children:n})}function y(n,t){const a=g.useContext(f1);if(!a)throw new Error("Missing PointCloudContext.Provider in the tree");return U1(a,n,t)}var Z=(n=>(n.last_hour="Last Hour",n.last_day="Last Day",n.last_week="Last Week",n.last_month="Last Month",n.last_3_months="Last 3 Months",n.first_hour="First Hour",n.first_day="First Day",n.first_week="First Week",n.first_month="First Month",n.all="All",n))(Z||{});const Ln=g.createContext(null);function Aa(){const n=g.useContext(Ln);if(n===null)throw new Error("useTimeRange must be used within a TimeRangeProvider");return n}function Na(n,t){return g.useMemo(()=>{switch(n){case"Last Hour":{const i=de(st(t.end),{roundingMethod:"ceil"});return{start:o1(i,1),end:i}}case"Last Day":{const i=de(ot(t.end),{roundingMethod:"ceil"});return{start:le(i,1),end:i}}case"Last Week":{const i=de(_e(t.end),{roundingMethod:"ceil"});return{start:le(i,7),end:i}}case"Last Month":{const i=de(_e(t.end),{roundingMethod:"ceil"});return{start:le(i,30),end:i}}case"Last 3 Months":{const i=de(_e(t.end),{roundingMethod:"ceil"});return{start:le(i,90),end:i}}case"First Hour":{const i=l1(t.start);return{start:i,end:lt(i,1)}}case"First Day":{const i=ue(t.start);return{start:i,end:ze(i,1)}}case"First Week":{const i=Je(t.start);return{start:i,end:ze(i,7)}}case"First Month":{const i=Je(t.start);return{start:i,end:ze(i,30)}}case"All":{const i=de(_e(t.end),{roundingMethod:"floor"});return{start:Je(t.start),end:i}}default:R()}},[n,t])}function Ll(n){const[t,a]=g.useState("Last Month"),i=Na(t,n.timeRangeBounds),r=g.useCallback(l=>{g.startTransition(()=>{a(l)})},[]);return e(Ln.Provider,{value:{timeRange:i,timePreset:t,setTimePreset:r},children:n.children})}const Cn=g.createContext(null);function Cl({children:n}){const[t,a]=Ot({style:{zIndex:1e3}}),i=g.useCallback(l=>{t({variant:"danger",...l})},[t]),r=g.useCallback(l=>{t({variant:"success",...l})},[t]);return o(Cn.Provider,{value:{notify:t,notifyError:i,notifySuccess:r},children:[n,a]})}function yn(){const n=g.useContext(Cn);if(n===null)throw new Error("useGlobalNotification must be used within a NotificationProvider");return n}function yl(){return yn().notifyError}function vl(){return yn().notifySuccess}const vn="arize-phoenix-theme";function bn(){return localStorage.getItem(vn)==="light"?"light":"dark"}const L1=g.createContext(null);function j(){const n=g.useContext(L1);if(n===null)throw new Error("useTheme must be used within a ThemeProvider");return n}function bl(n){const[t,a]=g.useState(bn()),i=g.useCallback(r=>{localStorage.setItem(vn,r),a(r)},[]);return e(L1.Provider,{value:{theme:t,setTheme:i},children:n.children})}function kn(n){return e("div",{onClick:t=>t.stopPropagation(),css:m`
|
|
147
|
+
`}}}();mn.hash="e8fa488a0d466b5e40fdadc1e5227a57";const oa=30,M1=5,T1=100,sa=0,I1=0,E1=.99,ca=500,D1=300,V1=1e5,da=10,P1=1,ua=2,ma=1,pa=0;var T=(n=>(n.inferences="inferences",n.correctness="correctness",n.dimension="dimension",n))(T||{}),fe=(n=>(n.list="list",n.gallery="gallery",n))(fe||{}),ge=(n=>(n.small="small",n.medium="medium",n.large="large",n))(ge||{}),E=(n=>(n.primary="primary",n.reference="reference",n.corpus="corpus",n))(E||{}),_=(n=>(n.correct="correct",n.incorrect="incorrect",n.unknown="unknown",n))(_||{});const ha=["#05fbff","#cb8afd"],ga=["#00add0","#4500d9"],J="#a5a5a5",me=J;function fa(n){return n.endsWith("/")?n.slice(0,-1):n}const Ve=`${window.location.protocol}//${window.location.host}${fa(window.Config.basename)}`,dl=window.Config.platformVersion,He="returnUrl",La=()=>window.location.pathname+window.location.search,Ca=()=>`${He}=${encodeURIComponent(La())}`,ul=({path:n,searchParams:t})=>{const i=new URL(window.location.href).searchParams.get(He),r=new URLSearchParams(t||{});i&&r.set(He,i);const l=r.toString();return`${n}${l?`?${l}`:""}`},ya=n=>!(typeof n!="string"||!n.startsWith("/")||n.replace(/\\/g,"/").startsWith("//")),va=n=>ya(n)?n:"/",ml=()=>{const n=new URL(window.location.href);return va(n.searchParams.get(He))},ba=Ve+"/auth/refresh";class F1 extends Error{constructor(){super("Unauthorized")}}async function ka(n,t){try{return await fetch(n,t).then(a=>{if(a.status===401)throw new F1;return a})}catch(a){if(a instanceof F1)return await wa(),fetch(n,t)}throw new Error("An unexpected error occurred while fetching data")}let be=null;async function wa(){return be||(be=fetch(ba,{method:"POST"}).then(n=>(n.ok||(window.location.href=`/login?${Ca()}`),be=null,n)),be)}const xa=Ve+"/graphql",Sa=window.Config.authenticationEnabled?ka:fetch,Ma=async(n,t,a)=>{const r=await(await Sa(xa,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:n.text,variables:t})})).json();if(Array.isArray(r.errors))throw new Error(`Error fetching GraphQL query '${n.name}' with variables '${JSON.stringify(t)}': ${JSON.stringify(r.errors)}`);return r},Pe=new Fe.Environment({network:Fe.Network.create(Ma),store:new Fe.Store(new Fe.RecordSource,{gcReleaseBufferSize:10})});function pn(n){return n.includes("PRIMARY")?Q.primary:n.includes("CORPUS")?Q.corpus:Q.reference}function h1(n){const t=[],a=[],i=[];return n.forEach(r=>{const l=pn(r);l==Q.primary?t.push(r):l==Q.corpus?i.push(r):a.push(r)}),{primaryEventIds:t,referenceEventIds:a,corpusEventIds:i}}const Ke=10,we="unknown",hn=rt,gn=it,Ta=n=>gn[n],Ia=n=>hn(n/Ke);var Le=(n=>(n.move="move",n.select="select",n))(Le||{}),g1=(n=>(n.default="default",n.highlight="highlight",n))(g1||{});const pe=()=>bn()==="light"?ga:ha;function pl(){const n=pe();return{coloringStrategy:T.inferences,pointGroupVisibility:{[E.primary]:!0,[E.reference]:!0},pointGroupColors:{[E.primary]:n[0],[E.reference]:n[1],[E.corpus]:J},metric:{type:"drift",metric:"euclideanDistance"}}}function hl(){const n=pe();return{coloringStrategy:T.inferences,pointGroupVisibility:{[E.primary]:!0,[E.corpus]:!0},pointGroupColors:{[E.primary]:n[0],[E.corpus]:J},metric:{type:"retrieval",metric:"queryDistance"},clusterSort:{dir:"desc",column:"primaryMetricValue"}}}function gl(){return{coloringStrategy:T.correctness,pointGroupVisibility:{[_.correct]:!0,[_.incorrect]:!0,[_.unknown]:!0},pointGroupColors:{[_.correct]:Oe.Discrete2.LightBlueOrange[0],[_.incorrect]:Oe.Discrete2.LightBlueOrange[1],[_.unknown]:me},metric:{type:"performance",metric:"accuracyScore"},clusterSort:{dir:"asc",column:"primaryMetricValue"}}}const Ea=n=>{const t={loading:!1,errorMessage:null,points:[],eventIdToDataMap:new Map,clusters:[],clusterSort:{dir:"desc",column:"driftRatio"},pointData:null,selectedEventIds:new Set,hoveredEventId:null,highlightedClusterId:null,selectedClusterId:null,canvasMode:"move",pointSizeScale:1,clusterColorMode:"default",coloringStrategy:T.inferences,inferencesVisibility:{primary:!0,reference:!0,corpus:!0},pointGroupVisibility:{[E.primary]:!0,[E.reference]:!0,[E.corpus]:!0},pointGroupColors:{[E.primary]:pe()[0],[E.reference]:pe()[1],[E.corpus]:J},eventIdToGroup:{},selectionDisplay:fe.gallery,selectionGridSize:ge.large,dimension:null,dimensionMetadata:null,umapParameters:{minDist:sa,nNeighbors:oa,nSamples:ca},hdbscanParameters:{minClusterSize:da,clusterMinSamples:ma,clusterSelectionEpsilon:pa},clustersLoading:!1,metric:{type:"drift",metric:"euclideanDistance"},selectionSearchText:""},a=(i,r)=>({...t,...n,setInitialData:async({points:l,clusters:s,retrievals:d})=>{const c=r(),u=new Map,h=d.reduce((L,C)=>{const{queryId:w}=C;return L[w]?L[w].push(C):L[w]=[C],L},{});l.forEach(L=>{L={...L,retrievals:h[L.eventId]??[]},u.set(L.eventId,L)});const p=s.map(A1).sort(n1(c.clusterSort));i({loading:!1,points:l,eventIdToDataMap:u,clusters:p,clustersLoading:!1,selectedEventIds:new Set,selectedClusterId:null,pointData:null,eventIdToGroup:re({points:l,coloringStrategy:c.coloringStrategy,pointsData:c.pointData??{},dimension:c.dimension||null,dimensionMetadata:c.dimensionMetadata})});const f=await Pa(l.map(L=>L.eventId)).catch(()=>i({errorMessage:"Failed to load the point events"}));f&&i({pointData:f,clusters:p,clustersLoading:!1,eventIdToGroup:re({points:l,coloringStrategy:c.coloringStrategy,pointsData:f??{},dimension:c.dimension||null,dimensionMetadata:c.dimensionMetadata})})},setClusters:l=>{const s=r(),d=l.map(A1).sort(n1(s.clusterSort));i({clusters:d,clustersLoading:!1,selectedClusterId:null,highlightedClusterId:null})},setClusterSort:l=>{const d=[...r().clusters].sort(n1(l));i({clusterSort:l,clusters:d})},setSelectedEventIds:l=>i({selectedEventIds:l,selectionSearchText:""}),setHoveredEventId:l=>i({hoveredEventId:l}),setHighlightedClusterId:l=>i({highlightedClusterId:l}),setSelectedClusterId:l=>i({selectedClusterId:l,highlightedClusterId:null}),setPointSizeScale:l=>i({pointSizeScale:l}),setCanvasMode:l=>i({canvasMode:l}),setClusterColorMode:l=>i({clusterColorMode:l}),setColoringStrategy:l=>{const s=r();switch(i({coloringStrategy:l}),l){case T.correctness:i({pointGroupVisibility:{[_.correct]:!0,[_.incorrect]:!0,[_.unknown]:!0},pointGroupColors:{[_.correct]:Oe.Discrete2.LightBlueOrange[0],[_.incorrect]:Oe.Discrete2.LightBlueOrange[1],[_.unknown]:me},dimension:null,dimensionMetadata:null,eventIdToGroup:re({points:s.points,coloringStrategy:l,pointsData:s.pointData??{},dimension:s.dimension||null,dimensionMetadata:s.dimensionMetadata})});break;case T.inferences:{i({pointGroupVisibility:{[E.primary]:!0,[E.reference]:!0,[E.corpus]:!0},pointGroupColors:{[E.primary]:pe()[0],[E.reference]:pe()[1],[E.corpus]:J},dimension:null,dimensionMetadata:null,eventIdToGroup:re({points:s.points,coloringStrategy:l,pointsData:s.pointData??{},dimension:s.dimension||null,dimensionMetadata:s.dimensionMetadata})});break}case T.dimension:{i({pointGroupVisibility:{unknown:!0},pointGroupColors:{unknown:me},dimension:null,dimensionMetadata:null,eventIdToGroup:re({points:s.points,coloringStrategy:l,pointsData:s.pointData??{},dimension:s.dimension||null,dimensionMetadata:s.dimensionMetadata})});break}default:R()}},inferencesVisibility:{primary:!0,reference:!0,corpus:!0},setInferencesVisibility:l=>i({inferencesVisibility:l}),setPointGroupVisibility:l=>i({pointGroupVisibility:l}),selectionDisplay:fe.gallery,setSelectionDisplay:l=>i({selectionDisplay:l}),setSelectionGridSize:l=>i({selectionGridSize:l}),reset:()=>{i({points:[],clusters:[],selectedEventIds:new Set,selectedClusterId:null,eventIdToGroup:{}})},setDimension:async l=>{const s=r();i({dimension:l,dimensionMetadata:null});const d=await Va(l).catch(()=>i({errorMessage:"Failed to load the dimension metadata"}));if(d){if(i({dimensionMetadata:d}),d.categories&&d.categories.length){const c=d.categories.length,h=c<=gn.length?Ta:p=>hn(p/c);i({pointGroupVisibility:{...d.categories.reduce((p,f)=>({...p,[f]:!0}),{}),unknown:!0},pointGroupColors:{...d.categories.reduce((p,f,L)=>({...p,[f]:h(L)}),{}),unknown:me},eventIdToGroup:re({points:s.points,coloringStrategy:s.coloringStrategy,pointsData:s.pointData??{},dimension:l,dimensionMetadata:d})})}else if(d.interval!==null){const c=fn(d.interval);i({pointGroupVisibility:{...c.reduce((u,h)=>({...u,[h.name]:!0}),{}),unknown:!0},pointGroupColors:{...c.reduce((u,h,p)=>({...u,[h.name]:Ia(p)}),{}),unknown:me},eventIdToGroup:re({points:s.points,coloringStrategy:s.coloringStrategy,pointsData:s.pointData??{},dimension:l,dimensionMetadata:d})})}}},setDimensionMetadata:l=>i({dimensionMetadata:l}),setUMAPParameters:l=>i({umapParameters:l}),setHDBSCANParameters:async l=>{const s=r();i({hdbscanParameters:l,clustersLoading:!0});const d=await Fa({metric:s.metric,points:s.points,hdbscanParameters:l});s.setClusters(d)},getHDSCANParameters:()=>r().hdbscanParameters,getMetric:()=>r().metric,setErrorMessage:l=>i({errorMessage:l}),setLoading:l=>i({loading:l}),setMetric:async l=>{const s=r();i({metric:l,clustersLoading:!0});const d=await _a({metric:l,clusters:s.clusters,hdbscanParameters:s.hdbscanParameters});s.setClusters(d)},setSelectionSearchText:l=>i({selectionSearchText:l})});return $e()(Ze(a))},_1=new Intl.NumberFormat([],{maximumFractionDigits:2});function Da({min:n,max:t}){return`${_1.format(n)} - ${_1.format(t)}`}function fn({min:n,max:t}){const i=(t-n)/Ke,r=[];for(let l=0;l<Ke;l++){const s=n+l*i,d=n+(l+1)*i;r.push({min:s,max:d,name:Da({min:s,max:d})})}return r}function e1({numericGroupIntervals:n,numericValue:t}){let a=we,i=n.findIndex(r=>t>=r.min&&t<r.max);return i=i===-1?Ke-1:i,a=n[i].name,a}function re(n){const{points:t,coloringStrategy:a,pointsData:i,dimension:r,dimensionMetadata:l}=n,s={},d=t.map(c=>c.eventId);switch(a){case T.inferences:{const{primaryEventIds:c,referenceEventIds:u,corpusEventIds:h}=h1(d);c.forEach(p=>{s[p]=E.primary}),u.forEach(p=>{s[p]=E.reference}),h.forEach(p=>{s[p]=E.corpus});break}case T.correctness:{t.forEach(c=>{let u=_.unknown;const{predictionLabel:h,actualLabel:p}=c.eventMetadata;h!==null&&p!==null&&(u=h===p?_.correct:_.incorrect),s[c.eventId]=u});break}case T.dimension:{let c;l&&(l==null?void 0:l.interval)!==null&&(c=fn(l.interval));const u=(r==null?void 0:r.type)==="prediction"&&(r==null?void 0:r.dataType)==="categorical",h=(r==null?void 0:r.type)==="prediction"&&(r==null?void 0:r.dataType)==="numeric",p=(r==null?void 0:r.type)==="actual"&&(r==null?void 0:r.dataType)==="categorical",f=(r==null?void 0:r.type)==="actual"&&(r==null?void 0:r.dataType)==="numeric";t.forEach(L=>{let C=we;const w=i[L.eventId];if(r!=null&&w!=null)if(u)C=w.eventMetadata.predictionLabel??we;else if(h){if(c==null)throw new Error("Cannot color by prediction score without numeric group intervals");const S=w.eventMetadata.predictionScore;typeof S=="number"&&(C=e1({numericGroupIntervals:c,numericValue:S}))}else if(f){if(c==null)throw new Error("Cannot color by actual score without numeric group intervals");const S=w.eventMetadata.actualScore;typeof S=="number"&&(C=e1({numericGroupIntervals:c,numericValue:S}))}else if(p)C=w.eventMetadata.actualLabel??we;else{const S=w.dimensions.find(A=>A.dimension.name===r.name);if(S!=null&&r.dataType==="categorical")C=S.value??we;else if(S!=null&&r.dataType==="numeric"&&c!=null){const A=typeof(S==null?void 0:S.value)=="string"?parseFloat(S.value):null;typeof A=="number"&&(C=e1({numericGroupIntervals:c,numericValue:A}))}}s[L.eventId]=C});break}default:R()}return s}async function Va(n){const t=await X.fetchQuery(Pe,mn,{id:n.id,getDimensionMinMax:n.dataType==="numeric",getDimensionCategories:n.dataType==="categorical"}).toPromise(),a=t==null?void 0:t.dimension;if(!n)throw new Error("Dimension not found");let i=null;return typeof(a==null?void 0:a.min)=="number"&&typeof(a==null?void 0:a.max)=="number"&&(i={min:a.min,max:a.max}),{interval:i,categories:(a==null?void 0:a.categories)??null}}async function Pa(n){var u,h,p,f,L,C;const{primaryEventIds:t,referenceEventIds:a,corpusEventIds:i}=h1([...n]),r=await X.fetchQuery(Pe,un,{primaryEventIds:t,referenceEventIds:a,corpusEventIds:i}).toPromise(),l=((h=(u=r==null?void 0:r.model)==null?void 0:u.primaryInferences)==null?void 0:h.events)??[],s=((f=(p=r==null?void 0:r.model)==null?void 0:p.referenceInferences)==null?void 0:f.events)??[],d=((C=(L=r==null?void 0:r.model)==null?void 0:L.corpusInferences)==null?void 0:C.events)??[];return[...l,...s,...d].reduce((w,O)=>(w[O.id]=O,w),{})}async function Fa({metric:n,points:t,hdbscanParameters:a}){const i=await X.fetchQuery(Pe,dn,{eventIds:t.map(r=>r.eventId),coordinates:t.map(r=>({x:r.position[0],y:r.position[1],z:r.position[2]})),fetchDataQualityMetric:n.type==="dataQuality",dataQualityMetricColumnName:n.type==="dataQuality"?n.dimension.name:null,fetchPerformanceMetric:n.type==="performance",performanceMetric:n.type==="performance"?n.metric:"accuracyScore",...a},{fetchPolicy:"network-only"}).toPromise();return(i==null?void 0:i.hdbscanClustering)??[]}async function _a({metric:n,clusters:t,hdbscanParameters:a}){const i=await X.fetchQuery(Pe,cn,{clusters:t.map(r=>({id:r.id,eventIds:r.eventIds})),fetchDataQualityMetric:n.type==="dataQuality",dataQualityMetricColumnName:n.type==="dataQuality"?n.dimension.name:null,fetchPerformanceMetric:n.type==="performance",performanceMetric:n.type==="performance"?n.metric:"accuracyScore",...a},{fetchPolicy:"network-only"}).toPromise();return(i==null?void 0:i.clusters)??[]}const n1=n=>(t,a)=>{const{dir:i,column:r}=n,l=i==="asc",s=t[r],d=a[r];return s==null?1:d==null?-1:s>d?l?1:-1:s<d?l?-1:1:0};function A1(n){let t=n.driftRatio,a=null;return n.dataQualityMetric?(t=n.dataQualityMetric.primaryValue,a=n.dataQualityMetric.referenceValue):n.performanceMetric?(t=n.performanceMetric.primaryValue,a=n.performanceMetric.referenceValue):n.primaryToCorpusRatio!=null&&(t=(n.primaryToCorpusRatio+1)/2*100),{...n,size:n.eventIds.length,primaryMetricValue:t,referenceMetricValue:a}}const f1=g.createContext(null);function fl({children:n,...t}){const[a]=g.useState(()=>Ea(t));return e(f1.Provider,{value:a,children:n})}function y(n,t){const a=g.useContext(f1);if(!a)throw new Error("Missing PointCloudContext.Provider in the tree");return U1(a,n,t)}var Z=(n=>(n.last_hour="Last Hour",n.last_day="Last Day",n.last_week="Last Week",n.last_month="Last Month",n.last_3_months="Last 3 Months",n.first_hour="First Hour",n.first_day="First Day",n.first_week="First Week",n.first_month="First Month",n.all="All",n))(Z||{});const Ln=g.createContext(null);function Aa(){const n=g.useContext(Ln);if(n===null)throw new Error("useTimeRange must be used within a TimeRangeProvider");return n}function Na(n,t){return g.useMemo(()=>{switch(n){case"Last Hour":{const i=de(st(t.end),{roundingMethod:"ceil"});return{start:o1(i,1),end:i}}case"Last Day":{const i=de(ot(t.end),{roundingMethod:"ceil"});return{start:le(i,1),end:i}}case"Last Week":{const i=de(_e(t.end),{roundingMethod:"ceil"});return{start:le(i,7),end:i}}case"Last Month":{const i=de(_e(t.end),{roundingMethod:"ceil"});return{start:le(i,30),end:i}}case"Last 3 Months":{const i=de(_e(t.end),{roundingMethod:"ceil"});return{start:le(i,90),end:i}}case"First Hour":{const i=l1(t.start);return{start:i,end:lt(i,1)}}case"First Day":{const i=ue(t.start);return{start:i,end:ze(i,1)}}case"First Week":{const i=Je(t.start);return{start:i,end:ze(i,7)}}case"First Month":{const i=Je(t.start);return{start:i,end:ze(i,30)}}case"All":{const i=de(_e(t.end),{roundingMethod:"floor"});return{start:Je(t.start),end:i}}default:R()}},[n,t])}function Ll(n){const[t,a]=g.useState("Last Month"),i=Na(t,n.timeRangeBounds),r=g.useCallback(l=>{g.startTransition(()=>{a(l)})},[]);return e(Ln.Provider,{value:{timeRange:i,timePreset:t,setTimePreset:r},children:n.children})}const Cn=g.createContext(null);function Cl({children:n}){const[t,a]=Ot({style:{zIndex:1e3}}),i=g.useCallback(l=>{t({variant:"danger",...l})},[t]),r=g.useCallback(l=>{t({variant:"success",...l})},[t]);return o(Cn.Provider,{value:{notify:t,notifyError:i,notifySuccess:r},children:[n,a]})}function yn(){const n=g.useContext(Cn);if(n===null)throw new Error("useGlobalNotification must be used within a NotificationProvider");return n}function yl(){return yn().notifyError}function vl(){return yn().notifySuccess}const vn="arize-phoenix-theme";function bn(){return localStorage.getItem(vn)==="light"?"light":"dark"}const L1=g.createContext(null);function j(){const n=g.useContext(L1);if(n===null)throw new Error("useTheme must be used within a ThemeProvider");return n}function bl(n){const[t,a]=g.useState(bn()),i=g.useCallback(r=>{localStorage.setItem(vn,r),a(r)},[]);return e(L1.Provider,{value:{theme:t,setTheme:i},children:n.children})}function kn(n){return e("div",{onClick:t=>t.stopPropagation(),css:m`
|
|
148
148
|
display: inline-block;
|
|
149
149
|
`,children:e(Q1,{css:m`
|
|
150
150
|
color: var(--ac-global-color-primary);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,w as h,aR as b,d6 as x,d7 as f,v as n,d8 as r,d9 as y,da as P,r as v,b as w,db as R}from"./vendor-D8cj1ZYg.js";import{v as L,a4 as z}from"./vendor-arizeai-BU1VHwXB.js";import{E,L as k,R as $,r as j,a as S,F as A,A as I,b as F,c as T,P as C,h as O,M as D,d,D as B,e as M,f as N,g as q,i as G,j as W,T as K,p as H,k as c,l as J,m as Q,n as p,o as U,q as m,s as g,t as V,v as X,w as Y,x as Z,y as _,z as ee,B as re,S as ae,C as oe,G as te}from"./pages-
|
|
1
|
+
import{j as e,w as h,aR as b,d6 as x,d7 as f,v as n,d8 as r,d9 as y,da as P,r as v,b as w,db as R}from"./vendor-D8cj1ZYg.js";import{v as L,a4 as z}from"./vendor-arizeai-BU1VHwXB.js";import{E,L as k,R as $,r as j,a as S,F as A,A as I,b as F,c as T,P as C,h as O,M as D,d,D as B,e as M,f as N,g as q,i as G,j as W,T as K,p as H,k as c,l as J,m as Q,n as p,o as U,q as m,s as g,t as V,v as X,w as Y,x as Z,y as _,z as ee,B as re,S as ae,C as oe,G as te}from"./pages-gwtz6mex.js";import{bo as ne,i as se,R as le,bp as ie,bq as de}from"./components-rP68rA45.js";import"./vendor-three-DwGkEfCM.js";import"./vendor-recharts-BATX_8yP.js";import"./vendor-codemirror-BDMHmh1x.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const t of o)if(t.type==="childList")for(const l of t.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function u(o){const t={};return o.integrity&&(t.integrity=o.integrity),o.referrerPolicy&&(t.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?t.credentials="include":o.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function i(o){if(o.ep)return;o.ep=!0;const t=u(o);fetch(o.href,t)}})();function ce(){return e(b,{styles:a=>h`
|
|
2
2
|
body {
|
|
3
3
|
background-color: var(--ac-global-color-grey-75);
|
|
4
4
|
color: var(--ac-global-text-color-900);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as m,j as e,ae as ss,v as s,H as j,R as Ce,w as C,af as De,y as ee,b as T,ag as xn,ah as Ye,$ as W,ai as ta,B as me,D as ge,G as H,F as wn,o as Fl,aj as Ge,ak as re,al as We,am as os,I as Va,an as An,a4 as Fe,a5 as q,a6 as ds,ao as fe,ap as sn,aq as cs,ar as Sa,as as va,at as Ca,au as zn,av as Ie,aw as oa,n as za,a as us,ax as ms,ay as gs,aa as ps,ab as ys,az as fs,c as hs,d as ks,aA as bs,x as Ss}from"./vendor-D8cj1ZYg.js";import{C as U,d as F,K as Jn,D as G,c as h,I as E,a as L,J as $a,G as Se,H as B,M as un,N as he,O as vs,m as Qa,Q as Zn,P as hn,S as Oe,i as Kl,j as te,q as Pn,r as _n,v as oe,b as K,o as xl,U as Ne,L as Bn,V as Dl,e as M,t as Y,W as Tl,X as Il,Y as Cs,Z as Fs,h as In,w as Xn,T as Le,k as Z,B as da,s as ve,$ as z,a0 as Ll,E as ca,f as Hn,a1 as Oa,a2 as Ks,z as ua,u as xs,a3 as Ds,R as nl,n as Ts}from"./vendor-arizeai-BU1VHwXB.js";import{N as Is,T as Ls,L as ue,u as de,B as ws,a as on,D as As,G as Ps,b as _s,c as Es,S as Rs,R as Ke,d as Pe,e as je,f as ja,P as wl,g as Al,M as al,h as ll,i as Yn,j as Ms,k as Ns,l as Q,m as Pl,n as xe,o as ma,p as En,q as _l,r as Rn,s as Mn,t as El,v as qe,w as Ve,C as ce,x as ga,y as en,z as qa,A as Ue,E as Rl,F as Vs,H as zs,I as $s,J as Qs,K as Os,O as js,Q as ze,U as se,V as qs,W as Us,X as Ml,Y as Bs,Z as Hs,_ as tl,$ as Gs,a0 as Ws,a1 as Js,a2 as Zs,a3 as Xs,a4 as Ys,a5 as Nl,a6 as kn,a7 as eo,a8 as no,a9 as ao,aa as lo,ab as to,ac as pn,ad as Ua,ae as Vl,af as Dn,ag as _a,ah as Fn,ai as _e,aj as io,ak as ro,al as ie,am as zl,an as pa,ao as we,ap as Ba,aq as bn,ar as ne,as as Be,at as so,au as Ha,av as Re,aw as Me,ax as yn,ay as Ga,az as $l,aA as oo,aB as Ql,aC as Te,aD as $e,aE as ea,aF as co,aG as na,aH as ya,aI as Ol,aJ as jl,aK as uo,aL as ql,aM as Ul,aN as Bl,aO as Nn,aP as Je,aQ as He,aR as ke,aS as mo,aT as il,aU as Hl,aV as go,aW as po,aX as yo,aY as fo,aZ as ho,a_ as Tn,a$ as cn,b0 as Ea,b1 as Sn,b2 as Gl,b3 as ko,b4 as mn,b5 as bo,b6 as fa,b7 as So,b8 as Wa,b9 as vo,ba as Ja,bb as Wl,bc as Jl,bd as Co,be as Ra,bf as Zl,bg as Fo,bh as Ko,bi as ia,bj as xo,bk as Xl,bl as Yl,bm as Do,bn as To}from"./components-
|
|
1
|
+
import{r as m,j as e,ae as ss,v as s,H as j,R as Ce,w as C,af as De,y as ee,b as T,ag as xn,ah as Ye,$ as W,ai as ta,B as me,D as ge,G as H,F as wn,o as Fl,aj as Ge,ak as re,al as We,am as os,I as Va,an as An,a4 as Fe,a5 as q,a6 as ds,ao as fe,ap as sn,aq as cs,ar as Sa,as as va,at as Ca,au as zn,av as Ie,aw as oa,n as za,a as us,ax as ms,ay as gs,aa as ps,ab as ys,az as fs,c as hs,d as ks,aA as bs,x as Ss}from"./vendor-D8cj1ZYg.js";import{C as U,d as F,K as Jn,D as G,c as h,I as E,a as L,J as $a,G as Se,H as B,M as un,N as he,O as vs,m as Qa,Q as Zn,P as hn,S as Oe,i as Kl,j as te,q as Pn,r as _n,v as oe,b as K,o as xl,U as Ne,L as Bn,V as Dl,e as M,t as Y,W as Tl,X as Il,Y as Cs,Z as Fs,h as In,w as Xn,T as Le,k as Z,B as da,s as ve,$ as z,a0 as Ll,E as ca,f as Hn,a1 as Oa,a2 as Ks,z as ua,u as xs,a3 as Ds,R as nl,n as Ts}from"./vendor-arizeai-BU1VHwXB.js";import{N as Is,T as Ls,L as ue,u as de,B as ws,a as on,D as As,G as Ps,b as _s,c as Es,S as Rs,R as Ke,d as Pe,e as je,f as ja,P as wl,g as Al,M as al,h as ll,i as Yn,j as Ms,k as Ns,l as Q,m as Pl,n as xe,o as ma,p as En,q as _l,r as Rn,s as Mn,t as El,v as qe,w as Ve,C as ce,x as ga,y as en,z as qa,A as Ue,E as Rl,F as Vs,H as zs,I as $s,J as Qs,K as Os,O as js,Q as ze,U as se,V as qs,W as Us,X as Ml,Y as Bs,Z as Hs,_ as tl,$ as Gs,a0 as Ws,a1 as Js,a2 as Zs,a3 as Xs,a4 as Ys,a5 as Nl,a6 as kn,a7 as eo,a8 as no,a9 as ao,aa as lo,ab as to,ac as pn,ad as Ua,ae as Vl,af as Dn,ag as _a,ah as Fn,ai as _e,aj as io,ak as ro,al as ie,am as zl,an as pa,ao as we,ap as Ba,aq as bn,ar as ne,as as Be,at as so,au as Ha,av as Re,aw as Me,ax as yn,ay as Ga,az as $l,aA as oo,aB as Ql,aC as Te,aD as $e,aE as ea,aF as co,aG as na,aH as ya,aI as Ol,aJ as jl,aK as uo,aL as ql,aM as Ul,aN as Bl,aO as Nn,aP as Je,aQ as He,aR as ke,aS as mo,aT as il,aU as Hl,aV as go,aW as po,aX as yo,aY as fo,aZ as ho,a_ as Tn,a$ as cn,b0 as Ea,b1 as Sn,b2 as Gl,b3 as ko,b4 as mn,b5 as bo,b6 as fa,b7 as So,b8 as Wa,b9 as vo,ba as Ja,bb as Wl,bc as Jl,bd as Co,be as Ra,bf as Zl,bg as Fo,bh as Ko,bi as ia,bj as xo,bk as Xl,bl as Yl,bm as Do,bn as To}from"./components-rP68rA45.js";import{R as nn,C as aa,X as an,Y as Ae,a as ln,T as tn,B as Ln,A as Gn,b as et,c as Za,L as nt,d as Io,P as Lo,e as wo,f as Ao}from"./vendor-recharts-BATX_8yP.js";import{p as Xa,R as ha,n as ka,j as Po,E as _o,k as Eo,c as Ro}from"./vendor-codemirror-BDMHmh1x.js";const at="arize-phoenix-feature-flags",Fa={playground:!1};function Mo(){const n=localStorage.getItem(at);if(!n)return Fa;try{const a=JSON.parse(n);return Object.assign({},Fa,a)}catch{return Fa}}const lt=m.createContext(null);function tt(){const n=Ce.useContext(lt);if(n===null)throw new Error("useFeatureFlags must be used within a FeatureFlagsProvider");return n}function No(n){const{featureFlags:a}=tt();return a[n]}function Mg(n){const[a,l]=m.useState(Mo()),t=i=>{localStorage.setItem(at,JSON.stringify(i)),l(i)};return e(lt.Provider,{value:{featureFlags:a,setFeatureFlags:t},children:e(Vo,{children:n.children})})}function Vo(n){const{children:a}=n,{featureFlags:l,setFeatureFlags:t}=tt(),[i,r]=m.useState(!1);return ss("ctrl+shift+f",()=>r(!0)),s(j,{children:[a,e(G,{type:"modal",isDismissable:!0,onDismiss:()=>r(!1),children:i&&e(U,{title:"Feature Flags",children:e(F,{height:"size-1000",padding:"size-100",children:Object.keys(l).map(o=>e(Jn,{isSelected:l[o],onChange:u=>t({...l,[o]:u}),children:o},o))})})})]})}const it=m.createContext(null);function zo(){const n=m.useContext(it);if(n===null)throw new Error("useFunctionality must be used within a FunctionalityProvider");return n}function Ng(n){return e(it.Provider,{value:{authenticationEnabled:window.Config.authenticationEnabled},children:n.children})}const $o=C`
|
|
2
2
|
display: flex;
|
|
3
3
|
direction: row;
|
|
4
4
|
height: 100vh;
|
|
@@ -1956,7 +1956,7 @@ fragment SpansTable_spans_1XEuU on Project {
|
|
|
1956
1956
|
}
|
|
1957
1957
|
id
|
|
1958
1958
|
}
|
|
1959
|
-
`}}}();Fi.hash="4827989f55b1c0bd269253b6bc977439";const Ki=function(){var n=["spans"],a={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}];return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:null,kind:"LocalArgument",name:"filterCondition"},{defaultValue:50,kind:"LocalArgument",name:"first"},{defaultValue:{col:"startTime",dir:"desc"},kind:"LocalArgument",name:"sort"},{kind:"RootArgument",name:"timeRange"}],kind:"Fragment",metadata:{connection:[{count:"first",cursor:"after",direction:"forward",path:n}],refetch:{connection:{forward:{count:"first",cursor:"after"},backward:null,path:n},fragmentPathInResult:["node"],operation:Fi,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"SpansTable_spans",selections:[a,{args:null,kind:"FragmentSpread",name:"SpanColumnSelector_annotations"},{alias:"spans",args:[{kind:"Variable",name:"filterCondition",variableName:"filterCondition"},{kind:"Variable",name:"sort",variableName:"sort"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],concreteType:"SpanConnection",kind:"LinkedField",name:"__SpansTable_spans_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"span",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},a,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"statusCode",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:t,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:t,storageKey:null},{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DocumentRetrievalMetrics",kind:"LinkedField",name:"documentRetrievalMetrics",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"evaluationName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"ndcg",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"precision",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hit",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},l],type:"Project",abstractKey:null}}();Ki.hash="4827989f55b1c0bd269253b6bc977439";const xi=m.createContext(null);function mu({children:n,...a}){const
|
|
1959
|
+
`}}}();Fi.hash="4827989f55b1c0bd269253b6bc977439";const Ki=function(){var n=["spans"],a={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}];return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:null,kind:"LocalArgument",name:"filterCondition"},{defaultValue:50,kind:"LocalArgument",name:"first"},{defaultValue:{col:"startTime",dir:"desc"},kind:"LocalArgument",name:"sort"},{kind:"RootArgument",name:"timeRange"}],kind:"Fragment",metadata:{connection:[{count:"first",cursor:"after",direction:"forward",path:n}],refetch:{connection:{forward:{count:"first",cursor:"after"},backward:null,path:n},fragmentPathInResult:["node"],operation:Fi,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"SpansTable_spans",selections:[a,{args:null,kind:"FragmentSpread",name:"SpanColumnSelector_annotations"},{alias:"spans",args:[{kind:"Variable",name:"filterCondition",variableName:"filterCondition"},{kind:"Variable",name:"sort",variableName:"sort"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],concreteType:"SpanConnection",kind:"LinkedField",name:"__SpansTable_spans_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"span",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},a,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"statusCode",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"spanId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:t,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:t,storageKey:null},{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DocumentRetrievalMetrics",kind:"LinkedField",name:"documentRetrievalMetrics",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"evaluationName",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"ndcg",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"precision",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hit",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},l],type:"Project",abstractKey:null}}();Ki.hash="4827989f55b1c0bd269253b6bc977439";const xi=m.createContext(null);function mu({children:n,...a}){const[l]=m.useState(()=>uo(a));return e(xi.Provider,{value:l,children:n})}function Xe(n,a){const l=Ce.useContext(xi);if(!l)throw new Error("Missing TracingContext.Provider in the tree");return za(l,n,a)}function Di(n){const{appendFilterCondition:a}=Ci(),{annotation:l}=n,{name:t,label:i,score:r}=l,o=m.useMemo(()=>{const u=[];return i!=null&&(u.push({filterName:"Match label",filterCondition:`annotations['${t}'].label == "${i}"`}),u.push({filterName:"Exclude label",filterCondition:`annotations['${t}'].label != "${i}"`})),typeof r=="number"&&(u.push({filterName:"Greater than score",filterCondition:`annotations['${t}'].score > ${r}`}),u.push({filterName:"Less than score",filterCondition:`annotations['${t}'].score < ${r}`}),u.push({filterName:"Equals score",filterCondition:`annotations['${t}'].score == ${r}`})),u},[t,i,r]);return s(F,{borderStartWidth:"thin",borderColor:"dark",paddingStart:"size-200",paddingEnd:"size-100",marginStart:"size-200",width:300,children:[e(K,{textSize:"large",weight:"heavy",children:"Filters"}),e("ul",{css:C`
|
|
1960
1960
|
display: flex;
|
|
1961
1961
|
flex-direction: row;
|
|
1962
1962
|
gap: var(--ac-global-dimension-size-100);
|
|
@@ -2541,7 +2541,7 @@ fragment DatasetsTable_datasets_dWkdd on Query {
|
|
|
2541
2541
|
}
|
|
2542
2542
|
}
|
|
2543
2543
|
}
|
|
2544
|
-
`}}}();sr.hash="a1349b92d8b0c745f5e8039c55b048c7";const em=n=>{const a=(l,t)=>({...n,isRefreshingLatestVersion:!1,refreshLatestVersion:async()=>{const i=t();l({isRefreshingLatestVersion:!0});const r=await nm({datasetId:i.datasetId});l({latestVersion:r,isRefreshingLatestVersion:!1})}});return hs()(ks(a))};async function nm({datasetId:n}){var i;const a=await T.fetchQuery(Ke,sr,{datasetId:n}).toPromise(),l=(i=a==null?void 0:a.dataset.latestVersions)==null?void 0:i.edges;return l&&l.length&&l[0].version||null}const or=m.createContext(null);function am({children:n,...a}){const
|
|
2544
|
+
`}}}();sr.hash="a1349b92d8b0c745f5e8039c55b048c7";const em=n=>{const a=(l,t)=>({...n,isRefreshingLatestVersion:!1,refreshLatestVersion:async()=>{const i=t();l({isRefreshingLatestVersion:!0});const r=await nm({datasetId:i.datasetId});l({latestVersion:r,isRefreshingLatestVersion:!1})}});return hs()(ks(a))};async function nm({datasetId:n}){var i;const a=await T.fetchQuery(Ke,sr,{datasetId:n}).toPromise(),l=(i=a==null?void 0:a.dataset.latestVersions)==null?void 0:i.edges;return l&&l.length&&l[0].version||null}const or=m.createContext(null);function am({children:n,...a}){const[l]=m.useState(()=>em(a));return e(or.Provider,{value:l,children:n})}function fn(n,a){const l=m.useContext(or);if(!l)throw new Error("Missing DatasetContext.Provider in the tree");return za(l,n,a)}const dr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"DatasetMutationPayload",kind:"LinkedField",name:"addExamplesToDataset",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"AddDatasetExampleDialogMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"AddDatasetExampleDialogMutation",selections:a},params:{cacheID:"718cf02ccb39b279132822bf503e51e6",id:null,metadata:{},name:"AddDatasetExampleDialogMutation",operationKind:"mutation",text:`mutation AddDatasetExampleDialogMutation(
|
|
2545
2545
|
$input: AddExamplesToDatasetInput!
|
|
2546
2546
|
) {
|
|
2547
2547
|
addExamplesToDataset(input: $input) {
|
|
@@ -3071,7 +3071,7 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
|
|
|
3071
3071
|
margin-left: auto;
|
|
3072
3072
|
margin-right: auto;
|
|
3073
3073
|
}
|
|
3074
|
-
`,children:["No experiments for this dataset. To see how to run experiments on a dataset, check out the documentation.",e(gr,{})]})})})}function Am({dataset:n}){const a=m.useRef(null),[l,t]=m.useState({}),{data:i,loadNext:r,hasNext:o,isLoadingNext:u,refetch:d}=T.usePaginationFragment(Dr,n),p=m.useMemo(()=>i.experiments.edges.map(x=>{const D=x.experiment.annotationSummaries.reduce((R,_)=>(R[_.annotationName]=_,R),{});return{...x.experiment,annotationSummaryMap:D}}),[i]),f=[{id:"select",header:({table:x})=>e(Je,{checked:x.getIsAllRowsSelected(),indeterminate:x.getIsSomeRowsSelected(),onChange:x.getToggleAllRowsSelectedHandler()}),cell:({row:x})=>e(Je,{checked:x.getIsSelected(),disabled:!x.getCanSelect(),indeterminate:x.getIsSomeSelected(),onChange:x.getToggleSelectedHandler()})},{header:"name",accessorKey:"name",minSize:200,cell:({getValue:x,row:D})=>{const R=D.original.id,_=D.original.sequenceNumber;return s(h,{direction:"row",gap:"size-100",children:[e(fa,{sequenceNumber:_}),e(He,{to:`/datasets/${n.id}/compare?experimentId=${R}`,children:x()})]})}},{header:"description",accessorKey:"description",minSize:300,cell:se},{header:"created at",accessorKey:"createdAt",cell:ke}],c=i.experimentAnnotationSummaries.map(x=>{const{annotationName:D,minScore:R,maxScore:_}=x;return{header:()=>s(h,{direction:"row",gap:"size-100",wrap:!0,alignItems:"center",justifyContent:"end",children:[e(K,{children:D}),e(bo,{annotationName:D})]}),id:`annotation-${D}`,meta:{textAlign:"right"},cell:({row:O})=>{const X=O.original.annotationSummaryMap[D];return!X||X.meanScore==null?e("span",{css:C`
|
|
3074
|
+
`,children:["No experiments for this dataset. To see how to run experiments on a dataset, check out the documentation.",e(gr,{})]})})})}function Am({dataset:n}){const a=m.useRef(null),[l,t]=m.useState({}),{data:i,loadNext:r,hasNext:o,isLoadingNext:u,refetch:d}=T.usePaginationFragment(Dr,n),p=m.useMemo(()=>i.experiments.edges.map(x=>{const D=x.experiment.annotationSummaries.reduce((R,_)=>(R[_.annotationName]=_,R),{});return{...x.experiment,annotationSummaryMap:D}}),[i.experiments.edges]),f=[{id:"select",header:({table:x})=>e(Je,{checked:x.getIsAllRowsSelected(),indeterminate:x.getIsSomeRowsSelected(),onChange:x.getToggleAllRowsSelectedHandler()}),cell:({row:x})=>e(Je,{checked:x.getIsSelected(),disabled:!x.getCanSelect(),indeterminate:x.getIsSomeSelected(),onChange:x.getToggleSelectedHandler()})},{header:"name",accessorKey:"name",minSize:200,cell:({getValue:x,row:D})=>{const R=D.original.id,_=D.original.sequenceNumber;return s(h,{direction:"row",gap:"size-100",children:[e(fa,{sequenceNumber:_}),e(He,{to:`/datasets/${n.id}/compare?experimentId=${R}`,children:x()})]})}},{header:"description",accessorKey:"description",minSize:300,cell:se},{header:"created at",accessorKey:"createdAt",cell:ke}],c=i.experimentAnnotationSummaries.map(x=>{const{annotationName:D,minScore:R,maxScore:_}=x;return{header:()=>s(h,{direction:"row",gap:"size-100",wrap:!0,alignItems:"center",justifyContent:"end",children:[e(K,{children:D}),e(bo,{annotationName:D})]}),id:`annotation-${D}`,meta:{textAlign:"right"},cell:({row:O})=>{const X=O.original.annotationSummaryMap[D];return!X||X.meanScore==null?e("span",{css:C`
|
|
3075
3075
|
float: right;
|
|
3076
3076
|
`,children:"--"}):e(Pm,{annotationName:D,value:X.meanScore,min:R,max:_})}}}),g=[{header:"run count",accessorKey:"runCount",meta:{textAlign:"right"},cell:So},{header:"avg latency",accessorKey:"averageRunLatencyMs",meta:{textAlign:"right"},cell:({getValue:x})=>{const D=x();return D===null||typeof D!="number"?"--":e(we,{latencyMs:D})}},{header:"error rate",accessorKey:"errorRate",meta:{textAlign:"right"},cell:Tm},{header:"metadata",accessorKey:"metadata",minSize:200,cell:Tn},{id:"actions",cell:({row:x})=>{const D=x.original.project,R=x.original.metadata;return e(_m,{projectId:(D==null?void 0:D.id)||null,experimentId:x.original.id,metadata:R})}}],y=me({columns:[...f,...c,...g],data:p,getCoreRowModel:ge(),state:{rowSelection:l},onRowSelectionChange:t}),k=y.getRowModel().rows,b=y.getSelectedRowModel().rows,v=b.map(x=>x.original),S=m.useCallback(()=>{t({})},[t]),w=k.length===0,I=m.useCallback(x=>{if(x){const{scrollHeight:D,scrollTop:R,clientHeight:_}=x;D-R-_<300&&!u&&o&&r(Lm)}},[o,u,r]),P=ee();return s("div",{css:C`
|
|
3077
3077
|
flex: 1 1 auto;
|
|
@@ -3671,7 +3671,7 @@ fragment APIKeysTableFragment on User {
|
|
|
3671
3671
|
width: 100%;
|
|
3672
3672
|
margin-left: auto;
|
|
3673
3673
|
margin-right: auto;
|
|
3674
|
-
`;function fp(){const{viewer:n}=Yl();return n?e("main",{css:vg,children:e("div",{css:Cg,children:s(h,{direction:"column",gap:"size-200",children:[e(Sg,{}),e(bg,{viewer:n})]})})}):null}const is=m.createContext(null);function Fg({children:n,...a}){const
|
|
3674
|
+
`;function fp(){const{viewer:n}=Yl();return n?e("main",{css:vg,children:e("div",{css:Cg,children:s(h,{direction:"column",gap:"size-200",children:[e(Sg,{}),e(bg,{viewer:n})]})})}):null}const is=m.createContext(null);function Fg({children:n,...a}){const[l]=m.useState(()=>Do(a));return e(is.Provider,{value:l,children:n})}function Na(n,a){const l=Ce.useContext(is);if(!l)throw new Error("Missing PlaygroundContext.Provider in the tree");return za(l,n,a)}function Kg(){return e(z,{title:"Input",collapsible:!0,variant:"compact",children:"Input goes here"})}function xg(n){return n==="chat"||n==="text_completion"}function Dg(){const n=Na(l=>l.operationType),a=Na(l=>l.setOperationType);return s(Ts,{value:n,variant:"inline-button",onChange:l=>{xg(l)&&a(l)},children:[e(nl,{label:"Chat",value:"chat",children:"Chat"}),e(nl,{label:"Completion",value:"text_completion",children:"Completion"})]})}function Tg(){return e(z,{title:"Output",collapsible:!0,variant:"compact",children:"Output goes here"})}function Ig(){const n=Na(a=>a.operationType);return e(z,{title:"Template",collapsible:!0,variant:"compact",children:n==="chat"?e("div",{children:"Chat Template goes here"}):e("div",{children:"Completion Template goes here"})})}function Lg(){return e(z,{title:"Tools",collapsible:!0,variant:"compact",children:"Tools go here"})}const Cl=C`
|
|
3675
3675
|
padding: var(--ac-global-dimension-size-200);
|
|
3676
3676
|
overflow: auto;
|
|
3677
3677
|
display: flex;
|
phoenix/trace/otel.py
CHANGED
|
@@ -48,6 +48,7 @@ from phoenix.trace.schemas import (
|
|
|
48
48
|
SpanStatusCode,
|
|
49
49
|
TraceID,
|
|
50
50
|
)
|
|
51
|
+
from phoenix.utilities.json import jsonify
|
|
51
52
|
|
|
52
53
|
DOCUMENT_METADATA = DocumentAttributes.DOCUMENT_METADATA
|
|
53
54
|
INPUT_MIME_TYPE = SpanAttributes.INPUT_MIME_TYPE
|
|
@@ -194,7 +195,7 @@ def encode_span_to_otlp(span: Span) -> otlp.Span:
|
|
|
194
195
|
elif isinstance(value, Mapping):
|
|
195
196
|
attributes.pop(key, None)
|
|
196
197
|
if key.endswith(JSON_STRING_ATTRIBUTES):
|
|
197
|
-
attributes[key] = json.dumps(value)
|
|
198
|
+
attributes[key] = json.dumps(jsonify(value))
|
|
198
199
|
else:
|
|
199
200
|
attributes.update(
|
|
200
201
|
flatten(
|
phoenix/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "5.1.
|
|
1
|
+
__version__ = "5.1.4"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|