arize-phoenix 4.32.0__py3-none-any.whl → 4.33.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.32.0.dist-info → arize_phoenix-4.33.0.dist-info}/METADATA +20 -17
- {arize_phoenix-4.32.0.dist-info → arize_phoenix-4.33.0.dist-info}/RECORD +19 -19
- phoenix/config.py +11 -1
- phoenix/db/README.md +28 -2
- phoenix/db/engines.py +13 -1
- phoenix/db/migrate.py +1 -0
- phoenix/db/models.py +3 -2
- phoenix/server/api/mutations/api_key_mutations.py +2 -1
- phoenix/server/app.py +18 -19
- phoenix/server/grpc_server.py +2 -2
- phoenix/server/main.py +14 -8
- phoenix/server/static/.vite/manifest.json +9 -9
- phoenix/server/static/assets/{components-Ddr-5VpM.js → components-CPHugqwr.js} +85 -85
- phoenix/server/static/assets/{index-BvNNAF8n.js → index-U9TnafOn.js} +1 -1
- phoenix/server/static/assets/{pages-CU_QMYRP.js → pages-Ds3nQwKE.js} +220 -196
- phoenix/version.py +1 -1
- {arize_phoenix-4.32.0.dist-info → arize_phoenix-4.33.0.dist-info}/WHEEL +0 -0
- {arize_phoenix-4.32.0.dist-info → arize_phoenix-4.33.0.dist-info}/licenses/IP_NOTICE +0 -0
- {arize_phoenix-4.32.0.dist-info → arize_phoenix-4.33.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,j as e,b as T,a9 as ea,v as s,w as C,aa as
|
|
1
|
+
import{r as u,j as e,b as T,a9 as ea,v as s,w as C,aa as Ke,ab as je,$ as J,ac as na,y as ue,z as me,D as B,F as H,B as Dn,R as Te,o as sl,ad as sn,ae as ce,af as on,ag as _r,E as _a,ah as Bn,a7 as ae,a1 as qe,a2 as G,a3 as Ar,ai as pe,aj as en,ak as Er,al as ya,am as fa,an as ha,ao as Nn,ap as Ce,aq as ol,n as dl,a as wr,ar as Rr,as as Pr,at as cl,au as ul,av as Mr,c as Nr,d as Vr,aw as $r,G as zr,ax as Qr}from"./vendor-Dpio9q2e.js";import{R as Ie,u as Le,a as Ve,T as Aa,P as ml,b as gl,M as qa,c as Ba,d as Hn,D as Or,e as jr,f as Q,g as pl,h as be,i as ia,j as Tn,k as yl,l as In,m as Ln,n as fl,o as $e,p as Re,C as re,q as ra,r as Be,s as Ea,t as He,E as hl,v as qr,w as Br,L as se,x as Hr,y as Gr,F as Ur,z as Wr,A as dn,B as fe,S as Jr,G as Zr,H as kl,I as Xr,J as Yr,K as Ha,N as es,O as ns,Q as as,U as ls,V as ts,W as is,X as bl,Y as _n,Z as rs,_ as ss,$ as os,a0 as ds,a1 as cs,a2 as cn,a3 as wa,a4 as Sl,a5 as Cn,a6 as Ta,a7 as Sn,a8 as _e,a9 as us,aa as ms,ab as ge,ac as vl,ad as sa,ae as xe,af as Ra,ag as pn,ah as X,ai as Ge,aj as gs,ak as Pa,al as Ee,am as we,an as un,ao as Ma,ap as Cl,aq as ps,ar as Fl,as as Se,at as Pe,au as Gn,av as ys,aw as Un,ax as oa,ay as Kl,az as xl,aA as fs,aB as Dl,aC as Tl,aD as Il,aE as An,aF as En,aG as ze,aH as wn,aI as ve,aJ as hs,aK as Ga,aL as Ll,aM as ks,aN as bs,aO as Ss,aP as fn,aQ as vs,aR as Cs,aS as Fs,aT as Ks,aU as xs,aV as Ds,aW as Ts,aX as Is,aY as Ls,aZ as Fn,a_ as an,a$ as Ia,b0 as hn,b1 as ln,b2 as _s,b3 as da,b4 as As,b5 as Na,b6 as Es,b7 as ws,b8 as aa}from"./components-CPHugqwr.js";import{D as Va,B as ke,C as q,H as tn,J as ye,K as Rs,l as $a,M as Wn,P as yn,I as P,e as E,N as Ue,a as _l,c as te,p as Rn,q as Pn,t as ie,h as F,n as Al,O as Me,j as x,i as h,L as Qn,Q as El,f as N,S as j,s as Y,U,V as wl,W as Rl,X as Ps,Y as Ms,Z as ca,_ as Kn,v as Jn,T as Fe,d as le,z as Zn,r as mn,$ as z,a0 as Pl,E as ua,b as On,a1 as za,a2 as Ns,y as ma,u as Vs,a3 as $s}from"./vendor-arizeai-DDzwX9A6.js";import{R as We,C as Xn,X as Je,Y as De,a as Ze,T as Xe,B as xn,A as jn,b as Ml,c as Qa,L as Nl,d as zs,P as Qs,e as Os,f as js}from"./vendor-recharts-DoxlB_Wo.js";import{p as Oa,R as ga,n as pa,j as qs,E as Bs,k as Hs,c as Gs}from"./vendor-codemirror-xRvQKK1G.js";const Vl=u.createContext(null);function $l(){const n=u.useContext(Vl);if(n===null)throw new Error("useFunctionality must be used within a FunctionalityProvider");return n}function vm(n){return e(Vl.Provider,{value:{authenticationEnabled:window.Config.authenticationEnabled},children:n.children})}const zl=function(){var n=[{alias:null,args:null,concreteType:"Functionality",kind:"LinkedField",name:"functionality",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"modelInferences",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"ProjectConnection",kind:"LinkedField",name:"projects",plural:!1,selections:[{alias:null,args:null,concreteType:"ProjectEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"project",args:null,concreteType:"Project",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"homeLoaderQuery",selections:n,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"homeLoaderQuery",selections:n},params:{cacheID:"6926e4e720b443f7b7252b60271944e6",id:null,metadata:{},name:"homeLoaderQuery",operationKind:"query",text:`query homeLoaderQuery {
|
|
2
2
|
functionality {
|
|
3
3
|
modelInferences
|
|
4
4
|
}
|
|
@@ -11,7 +11,7 @@ import{r as u,j as e,b as T,a9 as ea,v as s,w as C,aa as Fe,ab as je,$ as W,ac a
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
`}}}();zl.hash="a4bbc4917b3217b8254d68ec7c76dbdd";async function
|
|
14
|
+
`}}}();zl.hash="a4bbc4917b3217b8254d68ec7c76dbdd";async function Cm(n){var l;const a=await T.fetchQuery(Ie,zl,{}).toPromise();if(a!=null&&a.functionality.modelInferences)return ea("/model");if((l=a==null?void 0:a.projects.edges)!=null&&l.length){let t=0,i=null;for(const{project:o}of a.projects.edges)o.endTime!=null&&(t++,i=o.id);if(t>1)return ea("/projects");if(t===1&&i!=null)return ea(`/projects/${i}`);const r=a==null?void 0:a.projects.edges[0].project.id;return ea(`/projects/${r}`)}else throw new Error("No functionality available")}const Ql=function(){var n={defaultValue:null,kind:"LocalArgument",name:"endTime"},a={defaultValue:null,kind:"LocalArgument",name:"startTime"},l=[{kind:"Variable",name:"endTime",variableName:"endTime"},{kind:"Variable",name:"startTime",variableName:"startTime"}],t=[{kind:"Literal",name:"first",value:50}],i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},o={fields:[{kind:"Variable",name:"end",variableName:"endTime"},{kind:"Variable",name:"start",variableName:"startTime"}],kind:"ObjectValue",name:"timeRange"},c={alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},d=[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],m={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};return{fragment:{argumentDefinitions:[n,a],kind:"Fragment",metadata:null,name:"ModelPageQuery",selections:[{args:l,kind:"FragmentSpread",name:"ModelSchemaTable_dimensions"},{args:l,kind:"FragmentSpread",name:"ModelEmbeddingsTable_embeddingDimensions"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,n],kind:"Operation",name:"ModelPageQuery",selections:[{alias:null,args:null,concreteType:"Model",kind:"LinkedField",name:"model",plural:!1,selections:[{alias:null,args:t,concreteType:"DimensionConnection",kind:"LinkedField",name:"dimensions",plural:!1,selections:[{alias:null,args:null,concreteType:"DimensionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"dimension",args:null,concreteType:"Dimension",kind:"LinkedField",name:"node",plural:!1,selections:[i,r,{alias:null,args:null,kind:"ScalarField",name:"type",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"dataType",storageKey:null},{alias:"cardinality",args:[{kind:"Literal",name:"metric",value:"cardinality"},o],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"percentEmpty",args:[{kind:"Literal",name:"metric",value:"percentEmpty"},o],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"min",args:[{kind:"Literal",name:"metric",value:"min"},o],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"mean",args:[{kind:"Literal",name:"metric",value:"mean"},o],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"max",args:[{kind:"Literal",name:"metric",value:"max"},o],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"psi",args:[{kind:"Literal",name:"metric",value:"psi"},o],kind:"ScalarField",name:"driftMetric",storageKey:null}],storageKey:null},c,{alias:null,args:null,concreteType:"Dimension",kind:"LinkedField",name:"node",plural:!1,selections:d,storageKey:null}],storageKey:null},m],storageKey:"dimensions(first:50)"},{alias:null,args:t,filters:null,handle:"connection",key:"ModelSchemaTable_dimensions",kind:"LinkedHandle",name:"dimensions"},{alias:null,args:t,concreteType:"EmbeddingDimensionConnection",kind:"LinkedField",name:"embeddingDimensions",plural:!1,selections:[{alias:null,args:null,concreteType:"EmbeddingDimensionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"embedding",args:null,concreteType:"EmbeddingDimension",kind:"LinkedField",name:"node",plural:!1,selections:[i,r,{alias:"euclideanDistance",args:[{kind:"Literal",name:"metric",value:"euclideanDistance"},o],kind:"ScalarField",name:"driftMetric",storageKey:null}],storageKey:null},c,{alias:null,args:null,concreteType:"EmbeddingDimension",kind:"LinkedField",name:"node",plural:!1,selections:d,storageKey:null}],storageKey:null},m],storageKey:"embeddingDimensions(first:50)"},{alias:null,args:t,filters:null,handle:"connection",key:"ModelEmbeddingsTable_embeddingDimensions",kind:"LinkedHandle",name:"embeddingDimensions"}],storageKey:null}]},params:{cacheID:"18059ac8df6b3c15d5e4bc04ca2c9877",id:null,metadata:{},name:"ModelPageQuery",operationKind:"query",text:`query ModelPageQuery(
|
|
15
15
|
$startTime: DateTime!
|
|
16
16
|
$endTime: DateTime!
|
|
17
17
|
) {
|
|
@@ -69,9 +69,9 @@ fragment ModelSchemaTable_dimensions_3uKjWt on Query {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
`}}}();Ql.hash="b612239336c7638df42037315b00f635";function
|
|
72
|
+
`}}}();Ql.hash="b612239336c7638df42037315b00f635";function Fm(n){const{referenceInferences:a}=Le(),{timeRange:l}=Ve(),t=T.useLazyLoadQuery(Ql,{startTime:l.start.toISOString(),endTime:l.end.toISOString()});return s("main",{children:[s(Aa,{children:[e(ml,{}),a?e(gl,{inferencesRole:"reference",timeRange:{start:new Date(a.startTime),end:new Date(a.endTime)}}):null]}),e("section",{css:C`
|
|
73
73
|
margin: var(--px-spacing-lg);
|
|
74
|
-
`,children:e(Va,{title:"Model Schema",variant:"compact",bodyStyle:{padding:0},children:s(
|
|
74
|
+
`,children:e(Va,{title:"Model Schema",variant:"compact",bodyStyle:{padding:0},children:s(ke,{children:[e(q,{name:"All",children:s(tn,{children:[e(ye,{title:"Embeddings",id:"embeddings",children:e(qa,{model:t})}),e(ye,{title:"Dimensions",id:"dimensions",children:e(Ba,{model:t})})]})},"all"),e(q,{name:"Embeddings",children:e(qa,{model:t})},"embeddings"),e(q,{name:"Dimensions",children:e(Ba,{model:t})},"dimensions")]})})}),e(Ke,{})]})}const Ol={fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"EmbeddingPageModelQuery",selections:[{alias:null,args:null,concreteType:"Model",kind:"LinkedField",name:"model",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"MetricSelector_dimensions"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"EmbeddingPageModelQuery",selections:[{alias:null,args:null,concreteType:"Model",kind:"LinkedField",name:"model",plural:!1,selections:[{alias:"numericDimensions",args:[{kind:"Literal",name:"include",value:{dataTypes:["numeric"]}}],concreteType:"DimensionConnection",kind:"LinkedField",name:"dimensions",plural:!1,selections:[{alias:null,args:null,concreteType:"DimensionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"Dimension",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"type",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:'dimensions(include:{"dataTypes":["numeric"]})'}],storageKey:null}]},params:{cacheID:"4ccf476dd862525b059197daccd0d4d9",id:null,metadata:{},name:"EmbeddingPageModelQuery",operationKind:"query",text:`query EmbeddingPageModelQuery {
|
|
75
75
|
model {
|
|
76
76
|
...MetricSelector_dimensions
|
|
77
77
|
}
|
|
@@ -88,7 +88,7 @@ fragment MetricSelector_dimensions on Model {
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
`}};Ol.hash="374499f7f8ce6919e4a0a4ecbe380c52";const jl=function(){var n={defaultValue:null,kind:"LocalArgument",name:"clusterMinSamples"},a={defaultValue:null,kind:"LocalArgument",name:"clusterSelectionEpsilon"},l={defaultValue:null,kind:"LocalArgument",name:"dataQualityMetricColumnName"},t={defaultValue:null,kind:"LocalArgument",name:"fetchDataQualityMetric"},i={defaultValue:null,kind:"LocalArgument",name:"fetchPerformanceMetric"},r={defaultValue:null,kind:"LocalArgument",name:"id"},o={defaultValue:null,kind:"LocalArgument",name:"minClusterSize"},c={defaultValue:null,kind:"LocalArgument",name:"minDist"},d={defaultValue:null,kind:"LocalArgument",name:"nNeighbors"},m={defaultValue:null,kind:"LocalArgument",name:"nSamples"},
|
|
91
|
+
`}};Ol.hash="374499f7f8ce6919e4a0a4ecbe380c52";const jl=function(){var n={defaultValue:null,kind:"LocalArgument",name:"clusterMinSamples"},a={defaultValue:null,kind:"LocalArgument",name:"clusterSelectionEpsilon"},l={defaultValue:null,kind:"LocalArgument",name:"dataQualityMetricColumnName"},t={defaultValue:null,kind:"LocalArgument",name:"fetchDataQualityMetric"},i={defaultValue:null,kind:"LocalArgument",name:"fetchPerformanceMetric"},r={defaultValue:null,kind:"LocalArgument",name:"id"},o={defaultValue:null,kind:"LocalArgument",name:"minClusterSize"},c={defaultValue:null,kind:"LocalArgument",name:"minDist"},d={defaultValue:null,kind:"LocalArgument",name:"nNeighbors"},m={defaultValue:null,kind:"LocalArgument",name:"nSamples"},f={defaultValue:null,kind:"LocalArgument",name:"performanceMetric"},g={defaultValue:null,kind:"LocalArgument",name:"timeRange"},p=[{kind:"Variable",name:"id",variableName:"id"}],y={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},k={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},v={alias:null,args:null,kind:"ScalarField",name:"x",storageKey:null},b={alias:null,args:null,kind:"ScalarField",name:"y",storageKey:null},S=[y,{alias:null,args:null,kind:"ScalarField",name:"eventId",storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"coordinates",plural:!1,selections:[k,{kind:"InlineFragment",selections:[v,b,{alias:null,args:null,kind:"ScalarField",name:"z",storageKey:null}],type:"Point3D",abstractKey:null},{kind:"InlineFragment",selections:[v,b],type:"Point2D",abstractKey:null}],storageKey:null},{alias:null,args:null,concreteType:"EmbeddingMetadata",kind:"LinkedField",name:"embeddingMetadata",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"linkToData",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"rawData",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"EventMetadata",kind:"LinkedField",name:"eventMetadata",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"predictionId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"predictionLabel",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"actualLabel",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"predictionScore",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"actualScore",storageKey:null}],storageKey:null}],L=[{alias:null,args:null,kind:"ScalarField",name:"primaryValue",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"referenceValue",storageKey:null}],I={kind:"InlineFragment",selections:[{alias:null,args:[{kind:"Variable",name:"clusterMinSamples",variableName:"clusterMinSamples"},{kind:"Variable",name:"clusterSelectionEpsilon",variableName:"clusterSelectionEpsilon"},{kind:"Variable",name:"minClusterSize",variableName:"minClusterSize"},{kind:"Variable",name:"minDist",variableName:"minDist"},{kind:"Variable",name:"nNeighbors",variableName:"nNeighbors"},{kind:"Variable",name:"nSamples",variableName:"nSamples"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],concreteType:"UMAPPoints",kind:"LinkedField",name:"UMAPPoints",plural:!1,selections:[{alias:null,args:null,concreteType:"UMAPPoint",kind:"LinkedField",name:"data",plural:!0,selections:S,storageKey:null},{alias:null,args:null,concreteType:"UMAPPoint",kind:"LinkedField",name:"referenceData",plural:!0,selections:S,storageKey:null},{alias:null,args:null,concreteType:"UMAPPoint",kind:"LinkedField",name:"corpusData",plural:!0,selections:S,storageKey:null},{alias:null,args:null,concreteType:"Cluster",kind:"LinkedField",name:"clusters",plural:!0,selections:[y,{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},{alias:null,args:null,concreteType:"Retrieval",kind:"LinkedField",name:"contextRetrievals",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"queryId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"documentId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"relevance",storageKey:null}],storageKey:null}],storageKey:null}],type:"EmbeddingDimension",abstractKey:null};return{fragment:{argumentDefinitions:[n,a,l,t,i,r,o,c,d,m,f,g],kind:"Fragment",metadata:null,name:"EmbeddingPageUMAPQuery",selections:[{alias:"embedding",args:p,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[I],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[r,g,c,d,m,o,n,a,t,l,i,f],kind:"Operation",name:"EmbeddingPageUMAPQuery",selections:[{alias:"embedding",args:p,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[k,I,{kind:"TypeDiscriminator",abstractKey:"__isNode"},y],storageKey:null}]},params:{cacheID:"d30210c52f86b9d9a7ac958f866aa93e",id:null,metadata:{},name:"EmbeddingPageUMAPQuery",operationKind:"query",text:`query EmbeddingPageUMAPQuery(
|
|
92
92
|
$id: GlobalID!
|
|
93
93
|
$timeRange: TimeRange!
|
|
94
94
|
$minDist: Float!
|
|
@@ -212,7 +212,7 @@ fragment MetricSelector_dimensions on Model {
|
|
|
212
212
|
id
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
|
-
`}}}();jl.hash="f1ee7ce02317f1c3fe96b77af405095f";function
|
|
215
|
+
`}}}();jl.hash="f1ee7ce02317f1c3fe96b77af405095f";function Us(){const{theme:n}=Hn();return u.useMemo(()=>n==="light"?Or:jr,[n])}function Ws(){const{embeddingDimensionId:n}=je();if(!n)throw new Error("Missing embeddingDimensionId in URL params");return n}const ql={euclideanDistance:{name:"Euclidean Distance",shortName:"Euc. Distance",definition:"Euclidean distance over time captures how much your primary inferences's embeddings are drifting from the reference data. Euclidean distance of the embeddings is calculated by taking the centroid of the embedding vectors for each inferences and calculating the distance between the two centroids."},queryDistance:{name:"Query Distance",shortName:"Query Distance",definition:"The query distance is the euclidean distance of the centroid of queries from the centroid of the corpus."},accuracyScore:{name:"Accuracy Score",shortName:"Accuracy",definition:"Accuracy classification score. In multi-label classification, this function computes subset accuracy: the set of labels predicted for a sample must exactly match the corresponding set of labels in the ground truth."}};function rn(n){const a=ql[n];return a!=null?a.shortName:n}function ka(n){const a=ql[n];return a&&a.definition!=null&&a.definition||null}function kn(n){return`${n.column}:${n.dir}`}function Js(){const{referenceInferences:n}=Le(),a=!!n,l=Q(d=>d.clusterSort),t=Q(d=>d.setClusterSort),[i,r]=u.useState(!1),o=u.useMemo(()=>{const d=[];return a&&d.push({label:"Most drift",value:kn({column:"driftRatio",dir:"desc"})}),[...d,{label:"Largest clusters",value:kn({column:"size",dir:"desc"})},{label:"Smallest clusters",value:kn({column:"size",dir:"asc"})},{label:"Highest metric value",value:kn({column:"primaryMetricValue",dir:"desc"})},{label:"Lowest metric value",value:kn({column:"primaryMetricValue",dir:"asc"})}]},[a]),c=kn(l);return e("div",{css:d=>C`
|
|
216
216
|
.ac-action-button {
|
|
217
217
|
background: none;
|
|
218
218
|
border: none;
|
|
@@ -225,7 +225,7 @@ fragment MetricSelector_dimensions on Model {
|
|
|
225
225
|
color: var(--ac-global-text-color-900);
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
`,children:s(yn,{placement:"bottom right","aria-label":"Sort clusters by",isOpen:i,onOpenChange:d=>r(d),children:[s(
|
|
228
|
+
`,children:s(yn,{placement:"bottom right","aria-label":"Sort clusters by",isOpen:i,onOpenChange:d=>r(d),children:[s(Rs,{children:["Sort",e("span",{"aria-hidden":!0,"data-testid":"dropdown-caret",css:C`
|
|
229
229
|
margin-left: var(--px-spacing-sm);
|
|
230
230
|
border-bottom-color: #0000;
|
|
231
231
|
border-left-color: #0000;
|
|
@@ -237,14 +237,14 @@ fragment MetricSelector_dimensions on Model {
|
|
|
237
237
|
height: 0;
|
|
238
238
|
vertical-align: middle;
|
|
239
239
|
width: 0;
|
|
240
|
-
`})]}),e($a,{children:e(Wn,{style:{width:200},selectedKeys:[c],selectionMode:"single",items:o,onSelectionChange:d=>{if(d instanceof Set&&d.size>0){const[m]=d.values(),[
|
|
240
|
+
`})]}),e($a,{children:e(Wn,{style:{width:200},selectedKeys:[c],selectionMode:"single",items:o,onSelectionChange:d=>{if(d instanceof Set&&d.size>0){const[m]=d.values(),[f,g]=m.split(":");t({column:f,dir:g})}r(!1)},children:d=>e(J,{children:d.label},d.value)})})]})})}const Bl=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"clusters"}],a=[{alias:null,args:[{kind:"Variable",name:"clusters",variableName:"clusters"}],concreteType:"ExportedFile",kind:"LinkedField",name:"exportClusters",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"fileName",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"EmbeddingActionMenuExportClustersMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"EmbeddingActionMenuExportClustersMutation",selections:a},params:{cacheID:"1bef6586fcb3d6eb7034204fbe49633c",id:null,metadata:{},name:"EmbeddingActionMenuExportClustersMutation",operationKind:"mutation",text:`mutation EmbeddingActionMenuExportClustersMutation(
|
|
241
241
|
$clusters: [ClusterInput!]!
|
|
242
242
|
) {
|
|
243
243
|
exportClusters(clusters: $clusters) {
|
|
244
244
|
fileName
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
-
`}}}();Bl.hash="b5ff2517dbb0d19a1b24dea1796a3576";function
|
|
247
|
+
`}}}();Bl.hash="b5ff2517dbb0d19a1b24dea1796a3576";function Zs(){const n=Q(r=>r.clusters),{notifyError:a,notifySuccess:l}=pl(),[t,i]=T.useMutation(Bl);return e(Ue,{align:"end",buttonSize:"compact",icon:i?e(P,{svg:e(E.LoadingOutline,{})}):null,onAction:r=>{switch(r){case"export_cluster":t({variables:{clusters:n.map(o=>({eventIds:o.eventIds,id:o.id}))},onCompleted:o=>{const{fileName:c}=o.exportClusters;l({title:"Clusters Exported",message:"dataframe is available via px.active_session().exports or can be downloaded by clicking below",action:{text:"Download",onClick:()=>{window.open(`/exports?filename=${c}`,"_self")}}})},onError:o=>{a({title:"Failed to export clusters",message:`Failed to export clusters: ${o.message}`})}});break}},children:s(J,{children:[e(P,{svg:e(E.Download,{})}),"Export clusters"]},"export_cluster")})}const Hl={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"MetricSelector_dimensions",selections:[{alias:"numericDimensions",args:[{kind:"Literal",name:"include",value:{dataTypes:["numeric"]}}],concreteType:"DimensionConnection",kind:"LinkedField",name:"dimensions",plural:!1,selections:[{alias:null,args:null,concreteType:"DimensionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"Dimension",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"type",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:'dimensions(include:{"dataTypes":["numeric"]})'}],type:"Model",abstractKey:null};Hl.hash="55d03de16503d7af254c17cef7d18ee0";const vn=":";function Xs(n){return["drift","performance","dataQuality","retrieval"].includes(n)}function Vn(n){const{type:a,metric:l}=n;switch(a){case"drift":return`${a}${vn}${l}`;case"retrieval":return`${a}${vn}${l}`;case"performance":return`${a}${vn}${l}`;case"dataQuality":{const{name:t}=n.dimension;return`${a}${vn}${l}${vn}${t}`}default:be()}}function Ys({metricKey:n,dimensions:a}){const[l,t,i]=n.split(vn);if(!Xs(l))throw new Error(`Invalid metric type: ${l}`);switch(l){case"drift":return{type:l,metric:t};case"retrieval":return{type:l,metric:t};case"performance":return{type:l,metric:t};case"dataQuality":{const r=a.find(o=>o.name===i);if(!r)throw new Error(`Invalid dimension name: ${i}`);return{type:l,metric:t,dimension:r}}default:be()}}const eo=s(Pn,{variant:"info",children:[e(te,{level:4,children:"Analysis Metric"}),s(Rn,{children:[e("p",{children:"Select a metric to drive the analysis of your embeddings."}),e("p",{children:"To analyze the the drift between your two inferencess, select a drift metric and the UI will highlight areas of high drift."}),e("p",{children:"To analyze the quality of your embeddings, select a dimension data quality metric by which to analyze the point cloud. The UI will highlight areas where the data quality is degrading."})]})]});function no({model:n}){const[,a]=u.useTransition(),l=T.useFragment(Hl,n),{referenceInferences:t,corpusInferences:i}=Le(),r=!!t,o=!!i,c=Q(y=>y.metric),d=Q(y=>y.loading),m=Q(y=>y.setMetric),f=l.numericDimensions.edges.map(y=>y.node),g=f.length>0,p=u.useCallback(y=>{const k=Ys({metricKey:y,dimensions:f});a(()=>{m(k)})},[m,f,a]);return s(_l,{label:"metric",labelExtra:eo,selectedKey:c?Vn(c):void 0,onSelectionChange:p,placeholder:"Select a metric...",isDisabled:d,children:[r?e(na,{title:"Drift",children:e(J,{children:"Euclidean Distance"},Vn({type:"drift",metric:"euclideanDistance"}))}):null,o?e(na,{title:"Retrieval",children:e(J,{children:"Query Distance"},Vn({type:"retrieval",metric:"queryDistance"}))}):null,e(na,{title:"Performance",children:e(J,{children:"Accuracy Score"},Vn({type:"performance",metric:"accuracyScore"}))}),g?e(na,{title:"Data Quality",children:f.map(y=>e(J,{children:`${y.name} avg`},Vn({type:"dataQuality",metric:"average",dimension:y})))}):null]})}const Gl=function(){var n={defaultValue:null,kind:"LocalArgument",name:"countGranularity"},a={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},l={defaultValue:null,kind:"LocalArgument",name:"embeddingDimensionId"},t={defaultValue:null,kind:"LocalArgument",name:"fetchDataQuality"},i={defaultValue:null,kind:"LocalArgument",name:"fetchDrift"},r={defaultValue:null,kind:"LocalArgument",name:"fetchPerformance"},o={defaultValue:null,kind:"LocalArgument",name:"fetchQueryDistance"},c={defaultValue:null,kind:"LocalArgument",name:"metricGranularity"},d={defaultValue:null,kind:"LocalArgument",name:"performanceMetric"},m={defaultValue:null,kind:"LocalArgument",name:"timeRange"},f=[{kind:"Variable",name:"id",variableName:"embeddingDimensionId"}],g={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},p={kind:"Variable",name:"granularity",variableName:"metricGranularity"},y={kind:"Variable",name:"timeRange",variableName:"timeRange"},k=[p,{kind:"Literal",name:"metric",value:"euclideanDistance"},y],v=[{alias:null,args:null,concreteType:"TimeSeriesDataPoint",kind:"LinkedField",name:"data",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null}],b={kind:"InlineFragment",selections:[{condition:"fetchDrift",kind:"Condition",passingValue:!0,selections:[{alias:"euclideanDistanceTimeSeries",args:k,concreteType:"DriftTimeSeries",kind:"LinkedField",name:"driftTimeSeries",plural:!1,selections:v,storageKey:null}]},{condition:"fetchQueryDistance",kind:"Condition",passingValue:!0,selections:[{alias:null,args:k,concreteType:"DriftTimeSeries",kind:"LinkedField",name:"retrievalMetricTimeSeries",plural:!1,selections:v,storageKey:null}]},{alias:"trafficTimeSeries",args:[{kind:"Variable",name:"granularity",variableName:"countGranularity"},{kind:"Literal",name:"metric",value:"count"},y],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:v,storageKey:null}],type:"EmbeddingDimension",abstractKey:null},S=[{kind:"Variable",name:"id",variableName:"dimensionId"}],L={kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:[p,{kind:"Literal",name:"metric",value:"mean"},y],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:v,storageKey:null}],type:"Dimension",abstractKey:null},I={alias:null,args:null,concreteType:"Model",kind:"LinkedField",name:"model",plural:!1,selections:[{condition:"fetchPerformance",kind:"Condition",passingValue:!0,selections:[{alias:null,args:[p,{fields:[{kind:"Variable",name:"metric",variableName:"performanceMetric"}],kind:"ObjectValue",name:"metric"},y],concreteType:"PerformanceTimeSeries",kind:"LinkedField",name:"performanceTimeSeries",plural:!1,selections:v,storageKey:null}]}],storageKey:null},A={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null};return{fragment:{argumentDefinitions:[n,a,l,t,i,r,o,c,d,m],kind:"Fragment",metadata:null,name:"MetricTimeSeriesQuery",selections:[{alias:"embedding",args:f,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[g,b],storageKey:null},{condition:"fetchDataQuality",kind:"Condition",passingValue:!0,selections:[{alias:"dimension",args:S,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[L],storageKey:null}]},I],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[l,m,c,n,i,o,t,a,r,d],kind:"Operation",name:"MetricTimeSeriesQuery",selections:[{alias:"embedding",args:f,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[A,g,b],storageKey:null},{condition:"fetchDataQuality",kind:"Condition",passingValue:!0,selections:[{alias:"dimension",args:S,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[A,L,{kind:"TypeDiscriminator",abstractKey:"__isNode"},g],storageKey:null}]},I]},params:{cacheID:"a68a8204bf7fdd13e6915b338d4b5497",id:null,metadata:{},name:"MetricTimeSeriesQuery",operationKind:"query",text:`query MetricTimeSeriesQuery(
|
|
248
248
|
$embeddingDimensionId: GlobalID!
|
|
249
249
|
$timeRange: TimeRange!
|
|
250
250
|
$metricGranularity: Granularity!
|
|
@@ -303,7 +303,7 @@ fragment MetricSelector_dimensions on Model {
|
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
|
-
`}}}();Gl.hash="f31abad2141a5a1c461ef2a598ffa4f3";const Ua=new Intl.NumberFormat([],{maximumFractionDigits:2}),Ul=()=>{const n=$e(),a=n.blue400,l=n.gray500;return{color:a,barColor:l}};function
|
|
306
|
+
`}}}();Gl.hash="f31abad2141a5a1c461ef2a598ffa4f3";const Ua=new Intl.NumberFormat([],{maximumFractionDigits:2}),Ul=()=>{const n=$e(),a=n.blue400,l=n.gray500;return{color:a,barColor:l}};function ao({active:n,payload:a,label:l}){var r,o,c;const{color:t,barColor:i}=Ul();if(n&&a&&a.length){const d=((r=a[1])==null?void 0:r.value)??null,m=((o=a[0])==null?void 0:o.value)??null,f=typeof d=="number"?Ua.format(d):"--",g=typeof m=="number"?Ua.format(m):"--";return s(Be,{children:[e(F,{weight:"heavy",textSize:"medium",children:`${Re(new Date(l))}`}),e(re,{color:t,name:((c=a[1])==null?void 0:c.payload.metricName)??"Metric",value:f}),e(re,{color:i,shape:"square",name:"Count",value:g}),e(ra,{}),s("div",{css:C`
|
|
307
307
|
display: flex;
|
|
308
308
|
flex-direction: row;
|
|
309
309
|
align-items: center;
|
|
@@ -311,7 +311,7 @@ fragment MetricSelector_dimensions on Model {
|
|
|
311
311
|
gap: var(--px-spacing-sm);
|
|
312
312
|
|
|
313
313
|
margin-top: var(--px-spacing-sm);
|
|
314
|
-
`,children:[e(P,{svg:e(Al,{})}),e("span",{children:"Click to view the point cloud at this time"})]})]})}return null}function
|
|
314
|
+
`,children:[e(P,{svg:e(Al,{})}),e("span",{children:"Click to view the point cloud at this time"})]})]})}return null}function lo(n){switch(n.type){case"drift":return"Embedding Drift";case"performance":return"Model Performance";case"dataQuality":return"Data Quality";case"retrieval":return"Query Distance";default:be()}}function to(n){if(n)switch(n.type){case"drift":return rn(n.metric);case"performance":return rn(n.metric);case"dataQuality":return`${n.dimension.name} avg`;case"retrieval":return rn(n.metric);default:be()}else return"Count"}function io(n){switch(n.type){case"drift":return ka(n.metric);case"performance":return ka(n.metric);case"dataQuality":return null;case"retrieval":return ka(n.metric);default:be()}}function ro({embeddingDimensionId:n}){const a=Q(K=>K.metric),l=a.type==="drift",t=a.type==="retrieval",i=a.type==="dataQuality",r=a.type==="performance",{timeRange:o}=Ve(),{selectedTimestamp:c,setSelectedTimestamp:d}=ia(),m=Tn(o),f=T.useLazyLoadQuery(Gl,{embeddingDimensionId:n,timeRange:{start:o.start.toISOString(),end:o.end.toISOString()},metricGranularity:yl(o),countGranularity:m,fetchDrift:l,fetchQueryDistance:t,fetchDataQuality:i,fetchPerformance:r,dimensionId:a.type==="dataQuality"?a.dimension.id:n,performanceMetric:a.type==="performance"?a.metric:"accuracyScore"}),g=In({samplingIntervalMinutes:m.samplingIntervalMinutes}),p=u.useCallback(K=>{const{activePayload:D}=K;if(D!=null&&D.length>0){const R=D[0].payload;d(new Date(R.timestamp))}},[d]),y=so({data:f,metric:a}),v=oo(f).reduce((K,D)=>(K[D.timestamp]=D.value,K),{})??{},b=y.map(K=>{const D=v[K.timestamp];return{...K,traffic:D,timestamp:new Date(K.timestamp).getTime()}}),S=to(a),L=io(a),{color:I,barColor:A}=Ul();return s("section",{css:C`
|
|
315
315
|
width: 100%;
|
|
316
316
|
height: 100%;
|
|
317
317
|
display: flex;
|
|
@@ -331,7 +331,7 @@ fragment MetricSelector_dimensions on Model {
|
|
|
331
331
|
width: 100%;
|
|
332
332
|
overflow: hidden;
|
|
333
333
|
}
|
|
334
|
-
`,children:[s(te,{level:3,children:[
|
|
334
|
+
`,children:[s(te,{level:3,children:[lo(a),L!=null?s(Pn,{children:[e(te,{level:4,children:S}),e(Rn,{children:L})]}):null]}),e("div",{children:e(We,{width:"100%",height:"100%",children:s(Xn,{data:b,margin:{top:25,right:18,left:18,bottom:10},onClick:p,children:[s("defs",{children:[s("linearGradient",{id:"colorUv",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:I,stopOpacity:.8}),e("stop",{offset:"95%",stopColor:I,stopOpacity:0})]}),s("linearGradient",{id:"barColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:A,stopOpacity:.3}),e("stop",{offset:"95%",stopColor:A,stopOpacity:0})]})]}),e(Je,{...Ln,tickFormatter:K=>g(new Date(K)),style:{fill:"var(--ac-global-text-color-700)"}}),e(De,{stroke:ie.colors.gray200,label:{value:S,angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(De,{yAxisId:"right",orientation:"right",label:{value:"Count",angle:90,position:"insideRight",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(Ze,{strokeDasharray:"4 4",stroke:ie.colors.gray200,strokeOpacity:.5}),e(Xe,{content:e(ao,{})}),e(xn,{yAxisId:"right",dataKey:"traffic",fill:"url(#barColor)",spacing:5}),e(jn,{type:"monotone",dataKey:"value",stroke:I,fillOpacity:1,fill:"url(#colorUv)"}),c!=null?e(Ml,{...fl,x:c.getTime()}):null]})})})]})}function so({data:n,metric:a}){var l,t,i,r,o,c;if(((l=n.embedding.euclideanDistanceTimeSeries)==null?void 0:l.data)!=null&&n.embedding.euclideanDistanceTimeSeries.data.length>0)return n.embedding.euclideanDistanceTimeSeries.data.map(d=>({metricName:rn(a.metric),...d}));if(((t=n.embedding.retrievalMetricTimeSeries)==null?void 0:t.data)!=null&&n.embedding.retrievalMetricTimeSeries.data.length>0)return n.embedding.retrievalMetricTimeSeries.data.map(d=>({metricName:rn(a.metric),...d}));if(n.dimension&&((r=(i=n.dimension)==null?void 0:i.dataQualityTimeSeries)==null?void 0:r.data)!=null&&n.dimension.dataQualityTimeSeries.data.length>0){const d=n.dimension.name||"unknown";return n.dimension.dataQualityTimeSeries.data.map(m=>({metricName:`${d} avg`,...m}))}else{if(n.model&&((o=n.model.performanceTimeSeries)==null?void 0:o.data)!=null&&n.model.performanceTimeSeries.data.length>0)return n.model.performanceTimeSeries.data.map(d=>({metricName:rn(a.metric),...d}));if(((c=n.embedding.trafficTimeSeries)==null?void 0:c.data)!=null)return n.embedding.trafficTimeSeries.data.map(d=>({metricName:"Count",...d}))}return[]}function oo(n){var a;return((a=n.embedding.trafficTimeSeries)==null?void 0:a.data)!=null?[...n.embedding.trafficTimeSeries.data]:[]}const Wl=function(){var n={defaultValue:null,kind:"LocalArgument",name:"corpusEventIds"},a={defaultValue:null,kind:"LocalArgument",name:"primaryEventIds"},l={defaultValue:null,kind:"LocalArgument",name:"referenceEventIds"},t=[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,concreteType:"DimensionWithValue",kind:"LinkedField",name:"dimensions",plural:!0,selections:[{alias:null,args:null,concreteType:"Dimension",kind:"LinkedField",name:"dimension",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"type",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"EventMetadata",kind:"LinkedField",name:"eventMetadata",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"predictionId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"predictionLabel",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"predictionScore",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"actualLabel",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"actualScore",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PromptResponse",kind:"LinkedField",name:"promptAndResponse",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"prompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"response",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"documentText",storageKey:null}],i=[{alias:null,args:null,concreteType:"Model",kind:"LinkedField",name:"model",plural:!1,selections:[{alias:null,args:null,concreteType:"Inferences",kind:"LinkedField",name:"primaryInferences",plural:!1,selections:[{alias:null,args:[{kind:"Variable",name:"eventIds",variableName:"primaryEventIds"}],concreteType:"Event",kind:"LinkedField",name:"events",plural:!0,selections:t,storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"Inferences",kind:"LinkedField",name:"referenceInferences",plural:!1,selections:[{alias:null,args:[{kind:"Variable",name:"eventIds",variableName:"referenceEventIds"}],concreteType:"Event",kind:"LinkedField",name:"events",plural:!0,selections:t,storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"Inferences",kind:"LinkedField",name:"corpusInferences",plural:!1,selections:[{alias:null,args:[{kind:"Variable",name:"eventIds",variableName:"corpusEventIds"}],concreteType:"Event",kind:"LinkedField",name:"events",plural:!0,selections:t,storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"PointSelectionPanelContentQuery",selections:i,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,l,n],kind:"Operation",name:"PointSelectionPanelContentQuery",selections:i},params:{cacheID:"8b48064eba35d0d6c8dc834c2f7795c0",id:null,metadata:{},name:"PointSelectionPanelContentQuery",operationKind:"query",text:`query PointSelectionPanelContentQuery(
|
|
335
335
|
$primaryEventIds: [ID!]!
|
|
336
336
|
$referenceEventIds: [ID!]!
|
|
337
337
|
$corpusEventIds: [ID!]!
|
|
@@ -437,32 +437,32 @@ fragment MetricSelector_dimensions on Model {
|
|
|
437
437
|
color: var(--ac-global-text-color-900);
|
|
438
438
|
white-space: normal;
|
|
439
439
|
margin: 0;
|
|
440
|
-
`,children:n.children})})}function
|
|
440
|
+
`,children:n.children})})}function co({event:n}){const a=n.retrievedDocuments&&n.retrievedDocuments.length>0,l=!n.id.includes("CORPUS");return s("section",{css:C`
|
|
441
441
|
height: 100%;
|
|
442
442
|
overflow-y: auto;
|
|
443
|
-
`,children:[e(
|
|
443
|
+
`,children:[e(po,{event:n}),s(tn,{children:[l?e(ye,{id:"prediction",title:"Prediction Details",children:s("dl",{css:Wa,children:[n.predictionId!=null&&s("div",{children:[e("dt",{children:"Prediction ID"}),e("dd",{css:C`
|
|
444
444
|
display: flex;
|
|
445
445
|
align-items: center;
|
|
446
|
-
`,children:n.predictionId})]}),n.predictionLabel!=null&&s("div",{children:[e("dt",{children:"Prediction Label"}),e("dd",{children:n.predictionLabel})]}),n.predictionScore!=null&&s("div",{children:[e("dt",{children:"Prediction Score"}),e("dd",{children:n.predictionScore})]}),n.actualLabel!=null&&s("div",{children:[e("dt",{children:"Actual Label"}),e("dd",{children:n.actualLabel})]}),n.actualScore!=null&&s("div",{children:[e("dt",{children:"Actual Score"}),e("dd",{children:n.actualScore})]})]})}):e(
|
|
446
|
+
`,children:n.predictionId})]}),n.predictionLabel!=null&&s("div",{children:[e("dt",{children:"Prediction Label"}),e("dd",{children:n.predictionLabel})]}),n.predictionScore!=null&&s("div",{children:[e("dt",{children:"Prediction Score"}),e("dd",{children:n.predictionScore})]}),n.actualLabel!=null&&s("div",{children:[e("dt",{children:"Actual Label"}),e("dd",{children:n.actualLabel})]}),n.actualScore!=null&&s("div",{children:[e("dt",{children:"Actual Score"}),e("dd",{children:n.actualScore})]})]})}):e(ye,{id:"document",title:"Document Details",children:e("dl",{css:Wa,children:n.predictionId!=null&&s("div",{children:[e("dt",{children:"Document ID"}),e("dd",{css:C`
|
|
447
447
|
display: flex;
|
|
448
448
|
align-items: center;
|
|
449
|
-
`,children:n.predictionId})]})})}),e(
|
|
449
|
+
`,children:n.predictionId})]})})}),e(ye,{id:"dimensions",title:"Dimensions",children:e(mo,{dimensions:n.dimensions})}),a&&e(ye,{id:"retrievals",title:"Retrieved Documents",titleExtra:e(Me,{variant:"light",children:n.retrievedDocuments.length}),children:e("ul",{css:C`
|
|
450
450
|
padding: var(--px-spacing-med);
|
|
451
451
|
li + li {
|
|
452
452
|
margin-top: var(--px-spacing-med);
|
|
453
453
|
}
|
|
454
|
-
`,children:n.retrievedDocuments.map(t=>e("li",{children:e(
|
|
454
|
+
`,children:n.retrievedDocuments.map(t=>e("li",{children:e(uo,{document:t})},t.id))})})]})]})}function uo({document:n}){return e(x,{borderRadius:"medium",backgroundColor:"light",children:s(h,{direction:"column",children:[e(x,{width:"100%",borderBottomWidth:"thin",borderBottomColor:"dark",children:s(h,{direction:"row",justifyContent:"space-between",margin:"size-100",alignItems:"center",children:[s(h,{direction:"row",gap:"size-50",alignItems:"center",children:[e(P,{svg:e(E.FileOutline,{})}),s(te,{level:4,children:["document ",n.id]})]}),typeof n.relevance=="number"&&e(Qn,{color:"blue",children:`relevance ${Ea(n.relevance)}`})]})}),e("pre",{css:C`
|
|
455
455
|
padding: var(--px-spacing-lg);
|
|
456
456
|
white-space: normal;
|
|
457
457
|
margin: 0;
|
|
458
|
-
`,children:n.text})]})})}function
|
|
458
|
+
`,children:n.text})]})})}function mo({dimensions:n}){const a=u.useMemo(()=>n.map(i=>({name:i.dimension.name,type:i.dimension.type,value:i.value??"--"})),[n]),l=u.useMemo(()=>[{header:()=>"Name",accessorKey:"name"},{header:()=>"Type",accessorKey:"type"},{header:()=>"Value",accessorKey:"value"}],[]),t=ue({columns:l,data:a,getCoreRowModel:me()});return s("table",{css:He,children:[e("thead",{children:t.getHeaderGroups().map(i=>e("tr",{children:i.headers.map(r=>e("th",{colSpan:r.colSpan,children:r.isPlaceholder?null:e("div",{children:B(r.column.columnDef.header,r.getContext())})},r.id))},i.id))}),t.getCoreRowModel().rows.length?e("tbody",{children:t.getRowModel().rows.map(i=>e("tr",{children:i.getVisibleCells().map(r=>e("td",{children:B(r.column.columnDef.cell,r.getContext())},r.id))},i.id))}):e(yo,{})]})}function go({dataUrl:n}){const a=qr(n),l=Br(n);return a?e("video",{src:n,controls:!0,css:C`
|
|
459
459
|
width: 100%;
|
|
460
460
|
height: 500px;
|
|
461
461
|
background-color: black;
|
|
462
462
|
`}):l?e("audio",{src:n,controls:!0,autoPlay:!0}):e("img",{src:n,alt:"event image",width:"100%",height:"200px",css:C`
|
|
463
463
|
object-fit: contain;
|
|
464
464
|
background-color: black;
|
|
465
|
-
`})}function
|
|
465
|
+
`})}function po({event:n}){const a=n.linkToData||void 0,l=n.rawData,t=n.prompt||n.response?{prompt:n.prompt,response:n.response}:null,i=n.documentText;let r=null;return a?r=s(h,{direction:"column",children:[e(go,{dataUrl:a}),l&&e(tn,{children:e(ye,{id:"raw",title:"Raw Data",children:e($n,{children:l})})})]}):i?r=e(tn,{children:e(ye,{id:"document",title:"Document",children:e($n,{children:i})})}):t?r=s(tn,{children:[e(ye,{id:"prompt",title:"Prompt",children:e($n,{children:t.prompt})}),e(ye,{id:"response",title:"Response",children:e($n,{children:t.response})})]}):n.rawData&&n.rawData&&n.rawData,r}function yo(){return e("tbody",{className:"is-empty",children:e("tr",{children:e("td",{colSpan:100,css:n=>C`
|
|
466
466
|
text-align: center;
|
|
467
467
|
padding: ${n.spacing.margin24}px ${n.spacing.margin24}px !important;
|
|
468
468
|
`,children:e(hl,{graphicKey:"documents",message:"This embedding has no associated dimensions"})})})})}const Jl=function(){var n=[{alias:null,args:null,concreteType:"Model",kind:"LinkedField",name:"model",plural:!1,selections:[{alias:null,args:null,concreteType:"ExportedFile",kind:"LinkedField",name:"exportedFiles",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"fileName",storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"ExportSelectionButtonExportsQuery",selections:n,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"ExportSelectionButtonExportsQuery",selections:n},params:{cacheID:"2f7e3554305121746dc799b6a8d120da",id:null,metadata:{},name:"ExportSelectionButtonExportsQuery",operationKind:"query",text:`query ExportSelectionButtonExportsQuery {
|
|
@@ -479,15 +479,15 @@ fragment MetricSelector_dimensions on Model {
|
|
|
479
479
|
fileName
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
`}}}();Zl.hash="8b0d6962e2034d4c148d1b9919111d2f";const
|
|
482
|
+
`}}}();Zl.hash="8b0d6962e2034d4c148d1b9919111d2f";const fo=`import phoenix as px
|
|
483
483
|
|
|
484
484
|
exports = px.active_session().exports
|
|
485
485
|
dataframe = exports[-1]
|
|
486
|
-
dataframe`,
|
|
486
|
+
dataframe`,ho=C`
|
|
487
487
|
.cm-content {
|
|
488
488
|
padding: var(--ac-global-dimension-static-size-100);
|
|
489
489
|
}
|
|
490
|
-
`;function
|
|
490
|
+
`;function ko({value:n}){const{theme:a}=Hn(),l=a==="light"?void 0:pa;return e(ga,{value:n,basicSetup:!1,extensions:[Oa()],editable:!1,theme:l,css:ho})}function bo(){const n=Q(o=>o.selectedEventIds),[a,l]=T.useMutation(Zl),[t,i]=u.useState(null),r=u.useCallback(()=>{a({variables:{eventIds:[...n]},onCompleted:o=>{i(o.exportEvents)}})},[a,n]);return s(H,{children:[e(N,{variant:"default",size:"compact",icon:e(P,{svg:e(El,{})}),"aria-label":"Export selection / cluster",loading:l,onClick:r,children:l?"Exporting":"Export"}),e(U,{type:"slideOver",isDismissable:!0,onDismiss:()=>i(null),children:t!=null&&s(j,{title:"Cluster Exports",size:"M",children:[e(Y,{variant:"success",banner:!0,title:"Export succeeded",extra:e(N,{variant:"success",size:"compact",onClick:()=>{window.open(`/exports?filename=${t.fileName}`,"_self")},children:"Download"})}),s("div",{css:C`
|
|
491
491
|
display: flex;
|
|
492
492
|
flex-direction: column;
|
|
493
493
|
justify-content: space-between;
|
|
@@ -497,12 +497,12 @@ dataframe`,po=C`
|
|
|
497
497
|
`,children:[e("p",{css:C`
|
|
498
498
|
margin: 0;
|
|
499
499
|
flex: 1 1 auto;
|
|
500
|
-
`,children:"You can retrieve your export in your notebook via"}),e(x,{borderColor:"light",borderWidth:"thin",borderRadius:"medium",children:e(
|
|
500
|
+
`,children:"You can retrieve your export in your notebook via"}),e(x,{borderColor:"light",borderWidth:"thin",borderRadius:"medium",children:e(ko,{value:fo})})]}),e(tn,{children:e(ye,{id:"all-exports",title:"Latest Exports",children:e(u.Suspense,{fallback:e(se,{}),children:e(So,{})})})})]})})]})}function So(){const n=T.useLazyLoadQuery(Jl,{},{fetchPolicy:"network-only"});return e(Rl,{children:n.model.exportedFiles.map((a,l)=>e(wl,{children:s("div",{css:C`
|
|
501
501
|
display: flex;
|
|
502
502
|
flex-direction: row;
|
|
503
503
|
justify-content: space-between;
|
|
504
504
|
align-items: center;
|
|
505
|
-
`,children:[a.fileName,e(N,{size:"compact","aria-label":"Download",variant:"default",icon:e(P,{svg:e(El,{})}),onClick:()=>{window.open(`/exports?filename=${a.fileName}`,"_self")}})]})},l))})}function
|
|
505
|
+
`,children:[a.fileName,e(N,{size:"compact","aria-label":"Download",variant:"default",icon:e(P,{svg:e(El,{})}),onClick:()=>{window.open(`/exports?filename=${a.fileName}`,"_self")}})]})},l))})}function vo(n){const{getInferencesNameByRole:a}=Le(),{events:l,onItemSelected:t}=n,i=Q(m=>m.eventIdToDataMap),r=Q(m=>m.eventIdToGroup),o=Q(m=>m.pointGroupColors),c=Q(m=>m.selectionGridSize),d=Q(m=>m.setHoveredEventId);return e("div",{css:C`
|
|
506
506
|
flex: 1 1 auto;
|
|
507
507
|
overflow-y: auto;
|
|
508
508
|
`,"data-testid":"grid-view-scroll-container",children:e("ul",{"data-grid-size":c,css:C`
|
|
@@ -531,7 +531,7 @@ dataframe`,po=C`
|
|
|
531
531
|
min-width: var(--grid-item-min-width);
|
|
532
532
|
height: var(--grid-item-height);
|
|
533
533
|
}
|
|
534
|
-
`,children:l.map((m,
|
|
534
|
+
`,children:l.map((m,f)=>{const g=i.get(m.id),{rawData:p=null,linkToData:y=null}=(g==null?void 0:g.embeddingMetadata)??{},{predictionLabel:k=null,actualLabel:v=null}=(g==null?void 0:g.eventMetadata)??{},b=Hr(m.id),S=a(b),L=r[m.id],I=o[L];return e("li",{children:e(Gr,{rawData:p,linkToData:y,inferencesName:S,group:L,onClick:()=>{t(m.id)},onMouseOver:()=>{d(m.id)},onMouseOut:()=>{d(null)},color:I,size:c,predictionLabel:k,actualLabel:v,promptAndResponse:m.promptAndResponse,documentText:m.documentText,autoPlay:!1})},f)})})})}function Co({data:n,onPointSelected:a}){const{primaryInferences:l,referenceInferences:t}=Le(),i=Q(f=>f.metric),[r,o]=u.useState([]),{columns:c,tableData:d}=u.useMemo(()=>{const f=n.filter(I=>I.id.includes("CORPUS")===!1);let g=!1,p=!1,y=!1,k=!1,v=!1;n.forEach(I=>{I.linkToData&&(g=!0),I.rawData&&(p=!0),(I.prompt||I.response)&&(y=!0),I.predictionLabel&&(k=!0),I.actualLabel&&(v=!0)});const b=[];t&&b.push({header:"Inference Set",accessorKey:"id",size:50,cell:({getValue:I})=>e(Fo,{id:I(),primaryInferencesName:l.name,referenceInferencesName:(t==null?void 0:t.name)??"reference"})}),g&&b.push({header:"Link",accessorKey:"linkToData",cell:({getValue:I})=>{const A=I();if(typeof A=="string"){const K=A.split("/").pop();return e(dn,{href:A,children:K})}return null}}),y?(b.push({header:"Prompt",accessorKey:"prompt",cell:fe,size:200}),b.push({header:"Response",accessorKey:"response",cell:fe,size:200})):p&&b.push({header:"Raw Data",accessorKey:"rawData"}),k&&b.push({header:"Prediction Label",accessorKey:"predictionLabel",size:50}),v&&b.push({header:"Actual Label",accessorKey:"actualLabel",size:50});const S=[];if(i&&i.type==="dataQuality"){const I=i.dimension.name;S.push({header:i.dimension.name,accessorKey:"metric",cell:Ur,sortingFn:"basic"}),f.forEach(A=>{var D;const K=(D=A.dimensions.find(R=>R.dimension.name===I))==null?void 0:D.value;A.metric=K!=null?Number(K):null})}return{columns:[...b,...S,{header:"",id:"view-details",size:50,cell:({row:I})=>e(Wr,{"aria-label":"view point details",onClick:()=>{a(I.original.id)},children:"view details"})}],tableData:f}},[n,a,l,t,i]),m=ue({columns:c,data:d,state:{sorting:r},getCoreRowModel:me(),onSortingChange:o,getSortedRowModel:Dn()});return s("table",{css:He,children:[e("thead",{children:m.getHeaderGroups().map(f=>e("tr",{children:f.headers.map(g=>s("th",{children:[g.isPlaceholder?null:s("div",{className:g.column.getCanSort()?"cursor-pointer":"",onClick:g.column.getToggleSortingHandler(),children:[B(g.column.columnDef.header,g.getContext()),g.column.getIsSorted()?e(P,{className:"sort-icon",svg:g.column.getIsSorted()==="asc"?e(E.ArrowDownFilled,{}):e(E.ArrowUpFilled,{})}):null]}),e("div",{onMouseDown:g.getResizeHandler(),onTouchStart:g.getResizeHandler(),className:`resizer ${g.column.getIsResizing()?"isResizing":""}`,style:{transform:g.column.getIsResizing()?`translateX(${m.getState().columnSizingInfo.deltaOffset}px)`:""}})]},g.id))},f.id))}),e("tbody",{children:m.getRowModel().rows.map(f=>e("tr",{children:f.getVisibleCells().map(g=>e("td",{style:{width:g.column.getSize()},children:B(g.column.columnDef.cell,g.getContext())},g.id))},f.id))})]})}function Fo({id:n,primaryInferencesName:a,referenceInferencesName:l}){const t=n.includes("PRIMARY"),i=Us();return s(h,{direction:"row",gap:"size-100",alignItems:"center",children:[e(Zr,{shape:Jr.circle,color:i[t?0:1]}),t?a:l]})}const Ko=C`
|
|
535
535
|
width: 100%;
|
|
536
536
|
height: 100%;
|
|
537
537
|
position: relative;
|
|
@@ -561,37 +561,37 @@ dataframe`,po=C`
|
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
563
|
}
|
|
564
|
-
`;function
|
|
564
|
+
`;function xo({event:n,relevance:a}){return{id:n.eventMetadata.predictionId||"unknown id",text:n.documentText??"empty document",relevance:a}}function Do(){const n=Q(K=>K.selectedEventIds),a=Q(K=>K.setSelectedEventIds),l=Q(K=>K.setSelectedClusterId),t=Q(K=>K.selectionDisplay),[i,r]=Te.useState(null),{primaryEventIds:o,referenceEventIds:c,corpusEventIds:d}=u.useMemo(()=>{const K=[],D=[],R=[];return n.forEach(w=>{w.includes("PRIMARY")?K.push(w):w.includes("CORPUS")?R.push(w):D.push(w)}),{primaryEventIds:K,referenceEventIds:D,corpusEventIds:R}},[n]),m=T.useLazyLoadQuery(Wl,{primaryEventIds:[...o],referenceEventIds:[...c],corpusEventIds:[...d]}),f=u.useMemo(()=>{var w,O,Z,ne,oe,de;const K=((O=(w=m.model)==null?void 0:w.primaryInferences)==null?void 0:O.events)??[],D=((ne=(Z=m.model)==null?void 0:Z.referenceInferences)==null?void 0:ne.events)??[],R=((de=(oe=m.model)==null?void 0:oe.corpusInferences)==null?void 0:de.events)??[];return[...K,...D,...R]},[m]),g=()=>{a(new Set),l(null)},p=Q(K=>K.eventIdToDataMap),y=Q(K=>K.pointData),k=Q(K=>K.selectionSearchText),v=u.useMemo(()=>f.map(K=>{var w,O,Z,ne,oe,de,M;const D=p.get(K.id),R=[];return y!=null&&(D==null?void 0:D.retrievals)!=null&&D.retrievals.forEach(({documentId:V,relevance:_})=>{const $=y[V];$!=null&&R.push(xo({event:$,relevance:_}))}),{id:K.id,predictionId:((w=K.eventMetadata)==null?void 0:w.predictionId)??null,actualLabel:((O=K.eventMetadata)==null?void 0:O.actualLabel)??null,actualScore:((Z=K.eventMetadata)==null?void 0:Z.actualScore)??null,predictionLabel:((ne=K.eventMetadata)==null?void 0:ne.predictionLabel)??null,predictionScore:((oe=K.eventMetadata)==null?void 0:oe.predictionScore)??null,rawData:(D==null?void 0:D.embeddingMetadata.rawData)??null,linkToData:(D==null?void 0:D.embeddingMetadata.linkToData)??null,dimensions:K.dimensions,prompt:((de=K.promptAndResponse)==null?void 0:de.prompt)??null,response:((M=K.promptAndResponse)==null?void 0:M.response)??null,retrievedDocuments:R,documentText:K.documentText??null}}),[f,p,y]),b=u.useMemo(()=>{if(k){const K=k.toLowerCase();return v.filter(D=>{var R,w,O,Z;return D.id.includes(K)||((R=D.documentText)==null?void 0:R.toLowerCase().includes(K))||((w=D.predictionId)==null?void 0:w.includes(K))||((O=D.prompt)==null?void 0:O.toLowerCase().includes(K))||((Z=D.response)==null?void 0:Z.toLowerCase().includes(K))})}return v},[v,k]),S=u.useMemo(()=>{if(k){const K=k.toLowerCase();return f.filter(D=>{var R,w,O,Z,ne,oe,de;return D.id.includes(K)||((R=D.documentText)==null?void 0:R.toLowerCase().includes(K))||((O=(w=D.eventMetadata)==null?void 0:w.predictionId)==null?void 0:O.includes(K))||((ne=(Z=D.promptAndResponse)==null?void 0:Z.prompt)==null?void 0:ne.toLowerCase().includes(K))||((de=(oe=D.promptAndResponse)==null?void 0:oe.response)==null?void 0:de.toLowerCase().includes(K))})}return f},[f,k]),L=u.useMemo(()=>i?v.find(D=>D.id===i)??null:null,[v,i]),I=f.length,A=S.length;return s("section",{css:Ko,children:[s("div",{role:"toolbar",css:C`
|
|
565
565
|
position: absolute;
|
|
566
566
|
top: var(--px-spacing-med);
|
|
567
567
|
right: var(--px-spacing-lg);
|
|
568
568
|
display: flex;
|
|
569
569
|
flex-direction: row-reverse;
|
|
570
570
|
gap: var(--px-spacing-med);
|
|
571
|
-
`,children:[e(N,{variant:"default",size:"compact",icon:e(P,{svg:e(
|
|
571
|
+
`,children:[e(N,{variant:"default",size:"compact",icon:e(P,{svg:e(Ps,{})}),"aria-label":"Clear selection",onClick:g}),e(bo,{})]}),e(ke,{children:s(q,{name:"Selection",children:[e(To,{numSelectedEvents:I,numMatchingEvents:A,searchText:k}),t===kl.list?e("div",{css:C`
|
|
572
572
|
flex: 1 1 auto;
|
|
573
573
|
overflow-y: auto;
|
|
574
|
-
`,children:e(
|
|
574
|
+
`,children:e(Co,{data:b,onPointSelected:r})}):e(vo,{events:S,onItemSelected:r})]})}),e(U,{type:"slideOver",isDismissable:!0,onDismiss:()=>r(null),children:L&&e(j,{title:"Embedding Details",size:"L",children:e(co,{event:L})})})]})}function To({numSelectedEvents:n,numMatchingEvents:a,searchText:l}){const t=Q(m=>m.selectionDisplay),i=Q(m=>m.setSelectionDisplay),r=Q(m=>m.selectionGridSize),o=Q(m=>m.setSelectionGridSize),c=Q(m=>m.setSelectionSearchText),d=u.useMemo(()=>l?`${a}/${n} match "${l}"`:`${n} selected`,[n,a,l]);return e(Aa,{extra:s("div",{css:C`
|
|
575
575
|
display: flex;
|
|
576
576
|
flex-direction: row;
|
|
577
577
|
gap: var(--px-spacing-med);
|
|
578
|
-
`,children:[e(
|
|
578
|
+
`,children:[e(Ms,{placeholder:"Search by text or ID",onChange:m=>{c(m)}}),t===kl.gallery&&e(Xr,{size:r,onChange:o}),e(Yr,{mode:t,onChange:m=>{i(m)}})]}),children:e(F,{children:d})})}const Xl=jl;function Km(){const{referenceInferences:n,corpusInferences:a}=Le(),{timeRange:l}=Ve(),t=u.useMemo(()=>{let i={};return a!=null?i=as():n!=null?i=ls():i=ts(),i={...i,umapParameters:{...window.Config.UMAP}},i},[a,n]);return e(bl,{initialTimestamp:l.end,children:e(is,{...t,children:e(Io,{})})})}function Io(){const n=Ws(),{primaryInferences:a,referenceInferences:l}=Le(),t=Q(S=>S.umapParameters),i=Q(S=>S.getHDSCANParameters),r=Q(S=>S.getMetric),o=Q(S=>S.reset),c=Q(S=>S.setLoading),[d,m]=u.useState(!0),[f,g,p]=T.useQueryLoader(Xl),{selectedTimestamp:y}=ia(),k=u.useMemo(()=>y??new Date(a.endTime),[y,a.endTime]),v=u.useMemo(()=>({start:sl(k,2).toISOString(),end:k.toISOString()}),[k]),b=T.useLazyLoadQuery(Ol,{});return u.useEffect(()=>{o(),c(!0);const S=r();return g({id:n,timeRange:v,...t,...i(),fetchDataQualityMetric:S.type==="dataQuality",fetchPerformanceMetric:S.type==="performance",dataQualityMetricColumnName:S.type==="dataQuality"?S.dimension.name:null,performanceMetric:S.type==="performance"?S.metric:"accuracyScore"},{fetchPolicy:"network-only"}),()=>{p()}},[c,o,n,g,p,t,i,r,v]),s("main",{css:C`
|
|
579
579
|
flex: 1 1 auto;
|
|
580
580
|
display: flex;
|
|
581
581
|
flex-direction: column;
|
|
582
582
|
overflow: hidden;
|
|
583
|
-
`,children:[e(
|
|
583
|
+
`,children:[e(Mo,{}),s(Aa,{extra:s(h,{direction:"row",justifyContent:"center",alignItems:"center",gap:"size-100",children:[e(ca,{onChange:S=>{m(S)},defaultSelected:!0,labelPlacement:"start",children:"Show Timeseries"}),e(Zs,{})]}),children:[e(ml,{}),l?e(gl,{inferencesRole:"reference",timeRange:{start:new Date(l.startTime),end:new Date(l.endTime)}}):null,e(no,{model:b.model})]}),s(sn,{direction:"vertical",children:[d?s(H,{children:[e(ce,{defaultSize:20,collapsible:!0,order:1,children:e(u.Suspense,{fallback:e(se,{}),children:e(ro,{embeddingDimensionId:n})})}),e(on,{css:_n})]}):null,e(ce,{order:2,children:e("div",{css:C`
|
|
584
584
|
width: 100%;
|
|
585
585
|
height: 100%;
|
|
586
586
|
position: relative;
|
|
587
|
-
`,children:e(u.Suspense,{fallback:e(
|
|
587
|
+
`,children:e(u.Suspense,{fallback:e(rs,{}),children:f?e(_o,{queryReference:f}):null})})})]})]})}function Lo(n){if(n.__typename!=="Point3D")throw new Error(`Expected Point3D but got ${n.__typename} for coordinates`);return[n.x,n.y,n.z]}function _o({queryReference:n}){const a=T.usePreloadedQuery(Xl,n),l=u.useMemo(()=>{var m,f;return((f=(m=a.embedding)==null?void 0:m.UMAPPoints)==null?void 0:f.data)??[]},[a]),t=u.useMemo(()=>{var m,f;return((f=(m=a.embedding)==null?void 0:m.UMAPPoints)==null?void 0:f.referenceData)??[]},[a]),i=u.useMemo(()=>{var m,f;return((f=(m=a.embedding)==null?void 0:m.UMAPPoints)==null?void 0:f.corpusData)??[]},[a]),r=u.useMemo(()=>{var m,f;return((f=(m=a.embedding)==null?void 0:m.UMAPPoints)==null?void 0:f.contextRetrievals)??[]},[a]),o=u.useMemo(()=>[...l,...t,...i].map(f=>({...f,position:Lo(f.coordinates),metaData:{id:f.eventId}})),[t,l,i]),c=Q(m=>m.setInitialData),d=Q(m=>m.setClusters);return _r(()=>{var f,g;const m=((g=(f=a.embedding)==null?void 0:f.UMAPPoints)==null?void 0:g.clusters)||[];c({points:o,clusters:m,retrievals:r})},[o,n,r,c,d]),e("div",{css:C`
|
|
588
588
|
flex: 1 1 auto;
|
|
589
589
|
display: flex;
|
|
590
590
|
flex-direction: row;
|
|
591
591
|
align-items: stretch;
|
|
592
592
|
width: 100%;
|
|
593
593
|
height: 100%;
|
|
594
|
-
`,"data-testid":"point-cloud-display",children:s(
|
|
594
|
+
`,"data-testid":"point-cloud-display",children:s(sn,{direction:"horizontal",children:[e(ce,{id:"embedding-left",defaultSize:15,maxSize:30,minSize:10,collapsible:!0,children:s(sn,{autoSaveId:"embedding-controls-vertical",direction:"vertical",children:[e(ce,{css:C`
|
|
595
595
|
display: flex;
|
|
596
596
|
flex-direction: column;
|
|
597
597
|
.ac-tabs {
|
|
@@ -612,7 +612,7 @@ dataframe`,po=C`
|
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
|
-
`,children:e(
|
|
615
|
+
`,children:e(Ro,{})}),e(on,{css:_n}),e(ce,{css:C`
|
|
616
616
|
.ac-tabs {
|
|
617
617
|
height: 100%;
|
|
618
618
|
overflow: hidden;
|
|
@@ -621,27 +621,27 @@ dataframe`,po=C`
|
|
|
621
621
|
overflow-y: auto;
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
|
-
`,children:s(
|
|
624
|
+
`,children:s(ke,{children:[e(q,{name:"Display",children:e(ss,{})}),e(q,{name:"Hyperparameters",children:e(os,{})})]})})]})}),e(on,{css:ds}),e(ce,{children:s("div",{css:C`
|
|
625
625
|
position: relative;
|
|
626
626
|
width: 100%;
|
|
627
627
|
height: 100%;
|
|
628
|
-
`,children:[e(
|
|
628
|
+
`,children:[e(Ao,{}),e(cs,{})]})})]})})}function Ao(){return Q(a=>a.selectedEventIds).size===0?null:e("div",{css:C`
|
|
629
629
|
position: absolute;
|
|
630
630
|
top: 0;
|
|
631
631
|
left: 0;
|
|
632
632
|
bottom: 0;
|
|
633
633
|
right: 0;
|
|
634
|
-
`,"data-testid":"selection-panel",children:s(
|
|
634
|
+
`,"data-testid":"selection-panel",children:s(sn,{direction:"vertical",children:[e(ce,{}),e(on,{css:_n,style:{zIndex:1}}),e(ce,{id:"embedding-point-selection",defaultSize:40,minSize:20,order:2,style:{zIndex:1},children:e(Eo,{children:e(u.Suspense,{fallback:e(se,{}),children:e(Do,{})})})})]})})}function Eo(n){return e("div",{css:C`
|
|
635
635
|
background-color: var(--ac-global-color-grey-75);
|
|
636
636
|
width: 100%;
|
|
637
637
|
height: 100%;
|
|
638
|
-
`,children:n.children})}const
|
|
638
|
+
`,children:n.children})}const wo=1,Ro=Te.memo(function(){const{referenceInferences:a}=Le(),l=Q(g=>g.clusters),t=Q(g=>g.selectedClusterId),i=Q(g=>g.metric),r=Q(g=>g.setSelectedClusterId),o=Q(g=>g.setSelectedEventIds),c=Q(g=>g.setHighlightedClusterId),d=Q(g=>g.setClusterColorMode),m=a==null||i.type==="drift",f=u.useCallback(g=>{d(g===wo?Ha.highlight:Ha.default)},[d]);return s(ke,{onChange:f,children:[e(q,{name:"Clusters",extra:e(Me,{children:l.length}),children:s(h,{direction:"column",height:"100%",children:[e(x,{borderBottomColor:"dark",borderBottomWidth:"thin",backgroundColor:"dark",flex:"none",padding:"size-50",children:e(h,{direction:"row",justifyContent:"end",children:e(Js,{})})}),e(x,{flex:"1 1 auto",overflow:"auto",children:e("ul",{css:g=>C`
|
|
639
639
|
flex: 1 1 auto;
|
|
640
640
|
display: flex;
|
|
641
641
|
flex-direction: column;
|
|
642
642
|
gap: ${g.spacing.margin8}px;
|
|
643
643
|
margin: ${g.spacing.margin8}px;
|
|
644
|
-
`,children:l.map(g=>e("li",{children:e(
|
|
644
|
+
`,children:l.map(g=>e("li",{children:e(es,{clusterId:g.id,numPoints:g.eventIds.length,isSelected:t===g.id,driftRatio:g.driftRatio,primaryToCorpusRatio:g.primaryToCorpusRatio,primaryMetricValue:g.primaryMetricValue,referenceMetricValue:g.referenceMetricValue,metricName:Po(i),hideReference:m,onClick:()=>{t!==g.id?(r(g.id),o(new Set(g.eventIds))):(r(null),o(new Set))},onMouseEnter:()=>{c(g.id)},onMouseLeave:()=>{c(null)}})},g.id))})})]})}),e(q,{name:"Configuration",children:e(x,{overflow:"auto",height:"100%",children:e(ns,{})})})]})});function Po(n){const{type:a,metric:l}=n;switch(a){case"dataQuality":return`${n.dimension.name} avg`;case"drift":{switch(l){case"euclideanDistance":return"Cluster Drift";default:be()}break}case"performance":return rn(l);case"retrieval":{switch(l){case"queryDistance":return"% Query";default:be()}break}default:be()}}function Mo(){const{notifyError:n}=pl(),a=Q(t=>t.errorMessage),l=Q(t=>t.setErrorMessage);return u.useEffect(()=>{a!==null&&n({title:"An error occurred",message:a,action:{text:"Dismiss",onClick:()=>{l(null)}}})},[a,n,l]),null}const Yl=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"embeddingLoaderQuery",selections:[{alias:"embedding",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[l,t],type:"EmbeddingDimension",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"embeddingLoaderQuery",selections:[{alias:"embedding",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},l,{kind:"InlineFragment",selections:[t],type:"EmbeddingDimension",abstractKey:null}],storageKey:null}]},params:{cacheID:"cff0ac130f1ef79784f7bef4161ac60d",id:null,metadata:{},name:"embeddingLoaderQuery",operationKind:"query",text:`query embeddingLoaderQuery(
|
|
645
645
|
$id: GlobalID!
|
|
646
646
|
) {
|
|
647
647
|
embedding: node(id: $id) {
|
|
@@ -654,7 +654,7 @@ dataframe`,po=C`
|
|
|
654
654
|
id
|
|
655
655
|
}
|
|
656
656
|
}
|
|
657
|
-
`}}}();Yl.hash="c049e57d92943f64b5e751e0daa89dc8";async function
|
|
657
|
+
`}}}();Yl.hash="c049e57d92943f64b5e751e0daa89dc8";async function xm(n){const{embeddingDimensionId:a}=n.params;return T.fetchQuery(Ie,Yl,{id:a}).toPromise()}const et=function(){var n={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},a={defaultValue:null,kind:"LocalArgument",name:"hasReference"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"dimensionId"}],i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={kind:"Variable",name:"timeRange",variableName:"timeRange"},o=[r],c=[{kind:"Variable",name:"hasReference",variableName:"hasReference"},r],d={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},m=[{alias:null,args:null,kind:"ScalarField",name:"primaryValue",storageKey:null}],f={kind:"Literal",name:"metric",value:"cardinality"},g={kind:"Literal",name:"metric",value:"percentEmpty"},p={kind:"Literal",name:"inferencesRole",value:"reference"};return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"DimensionPageQuery",selections:[{alias:"dimension",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[i,{args:o,kind:"FragmentSpread",name:"DimensionSegmentsBarChart_dimension"},{args:o,kind:"FragmentSpread",name:"DimensionCountStats_dimension"},{args:o,kind:"FragmentSpread",name:"DimensionDriftStats_dimension"},{args:c,kind:"FragmentSpread",name:"DimensionCardinalityStats_dimension"},{args:c,kind:"FragmentSpread",name:"DimensionPercentEmptyStats_dimension"},{args:o,kind:"FragmentSpread",name:"DimensionQuantilesStats_dimension"}],type:"Dimension",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,l,a],kind:"Operation",name:"DimensionPageQuery",selections:[{alias:"dimension",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[d,{kind:"TypeDiscriminator",abstractKey:"__isNode"},i,{kind:"InlineFragment",selections:[{alias:null,args:[{kind:"Variable",name:"primaryTimeRange",variableName:"timeRange"}],concreteType:"Segments",kind:"LinkedField",name:"segmentsComparison",plural:!1,selections:[{alias:null,args:null,concreteType:"Segment",kind:"LinkedField",name:"segments",plural:!0,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"bin",plural:!1,selections:[d,{kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],type:"NominalBin",abstractKey:null},{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"NumericRange",kind:"LinkedField",name:"range",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"start",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"end",storageKey:null}],storageKey:null}],type:"IntervalBin",abstractKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"counts",plural:!1,selections:m,storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"totalCounts",plural:!1,selections:m,storageKey:null}],storageKey:null},{alias:"count",args:[{kind:"Literal",name:"metric",value:"count"},r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"psi",args:[{kind:"Literal",name:"metric",value:"psi"},r],kind:"ScalarField",name:"driftMetric",storageKey:null},{alias:"cardinality",args:[f,r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"percentEmpty",args:[g,r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p99",args:[{kind:"Literal",name:"metric",value:"p99"},r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p75",args:[{kind:"Literal",name:"metric",value:"p75"},r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p50",args:[{kind:"Literal",name:"metric",value:"p50"},r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p25",args:[{kind:"Literal",name:"metric",value:"p25"},r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p1",args:[{kind:"Literal",name:"metric",value:"p01"},r],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{condition:"hasReference",kind:"Condition",passingValue:!0,selections:[{alias:"referenceCardinality",args:[p,f],kind:"ScalarField",name:"dataQualityMetric",storageKey:'dataQualityMetric(inferencesRole:"reference",metric:"cardinality")'},{alias:"referencePercentEmpty",args:[p,g],kind:"ScalarField",name:"dataQualityMetric",storageKey:'dataQualityMetric(inferencesRole:"reference",metric:"percentEmpty")'}]}],type:"Dimension",abstractKey:null}],storageKey:null}]},params:{cacheID:"2ad937e56d4647309b9d78ac11f57265",id:null,metadata:{},name:"DimensionPageQuery",operationKind:"query",text:`query DimensionPageQuery(
|
|
658
658
|
$dimensionId: GlobalID!
|
|
659
659
|
$timeRange: TimeRange!
|
|
660
660
|
$hasReference: Boolean!
|
|
@@ -735,7 +735,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
737
|
}
|
|
738
|
-
`}}}();et.hash="d194bfd656408e8ba7cb427ddc80fc85";const nt=function(){var n={kind:"Literal",name:"metric",value:"cardinality"};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"hasReference"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionCardinalityStats_dimension",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:"cardinality",args:[n,{kind:"Variable",name:"timeRange",variableName:"timeRange"}],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{condition:"hasReference",kind:"Condition",passingValue:!0,selections:[{alias:"referenceCardinality",args:[{kind:"Literal",name:"inferencesRole",value:"reference"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:'dataQualityMetric(inferencesRole:"reference",metric:"cardinality")'}]}],type:"Dimension",abstractKey:null}}();nt.hash="8b4edef350e4df49e799afa70ca34918";function
|
|
738
|
+
`}}}();et.hash="d194bfd656408e8ba7cb427ddc80fc85";const nt=function(){var n={kind:"Literal",name:"metric",value:"cardinality"};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"hasReference"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionCardinalityStats_dimension",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:"cardinality",args:[n,{kind:"Variable",name:"timeRange",variableName:"timeRange"}],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{condition:"hasReference",kind:"Condition",passingValue:!0,selections:[{alias:"referenceCardinality",args:[{kind:"Literal",name:"inferencesRole",value:"reference"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:'dataQualityMetric(inferencesRole:"reference",metric:"cardinality")'}]}],type:"Dimension",abstractKey:null}}();nt.hash="8b4edef350e4df49e799afa70ca34918";function No(n){const a=T.useFragment(nt,n.dimension);return s(H,{children:[e(F,{elementType:"h3",textSize:"small",color:"text-700",children:"Cardinality"}),e(F,{textSize:"xlarge",children:cn(a.cardinality)}),a.referenceCardinality!=null&&e(F,{textSize:"medium",color:"designationPurple",children:cn(a.referenceCardinality)})]})}const at=function(){var n={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},a={defaultValue:null,kind:"LocalArgument",name:"granularity"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"dimensionId"}],i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={kind:"InlineFragment",selections:[{alias:"cardinalityTimeSeries",args:[{kind:"Variable",name:"granularity",variableName:"granularity"},{kind:"Literal",name:"metric",value:"cardinality"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:[{alias:null,args:null,concreteType:"TimeSeriesDataPoint",kind:"LinkedField",name:"data",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null}],storageKey:null}],type:"Dimension",abstractKey:null};return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"DimensionCardinalityTimeSeriesQuery",selections:[{alias:"dimension",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[i,r],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,l,a],kind:"Operation",name:"DimensionCardinalityTimeSeriesQuery",selections:[{alias:"dimension",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i,r],storageKey:null}]},params:{cacheID:"f53e5ac5e0bfd6a0a6c50b761223a617",id:null,metadata:{},name:"DimensionCardinalityTimeSeriesQuery",operationKind:"query",text:`query DimensionCardinalityTimeSeriesQuery(
|
|
739
739
|
$dimensionId: GlobalID!
|
|
740
740
|
$timeRange: TimeRange!
|
|
741
741
|
$granularity: Granularity!
|
|
@@ -753,7 +753,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
753
753
|
}
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
|
-
`}}}();at.hash="88ce04bb2022d5e2bc75c663abd7e5de";const Yn={top:25,right:18,left:18,bottom:5},
|
|
756
|
+
`}}}();at.hash="88ce04bb2022d5e2bc75c663abd7e5de";const Yn={top:25,right:18,left:18,bottom:5},Vo=new Intl.NumberFormat([],{maximumFractionDigits:2}),lt=()=>{const{gray300:n}=$e();return{color:n}};function $o({active:n,payload:a,label:l}){var i;const{color:t}=lt();if(n&&a&&a.length){const r=((i=a[0])==null?void 0:i.value)??null,o=typeof r=="number"?Vo.format(r):"--";return s(Be,{children:[e(F,{weight:"heavy",textSize:"medium",children:`${Re(new Date(l))}`}),e(re,{color:t,name:"Cardinality",value:o}),e(ra,{})]})}return null}function zo({dimensionId:n}){var c;const{timeRange:a}=Ve(),l=Tn(a),t=T.useLazyLoadQuery(at,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},granularity:l}),{color:i}=lt(),r=((c=t.dimension.cardinalityTimeSeries)==null?void 0:c.data.map(d=>({timestamp:new Date(d.timestamp).valueOf(),value:d.value})))||[],o=In({samplingIntervalMinutes:l.samplingIntervalMinutes});return e(We,{width:"100%",height:"100%",children:s(Xn,{data:r,margin:Yn,syncId:"dimensionDetails",children:[e("defs",{children:s("linearGradient",{id:"cardinalityColorUv",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:i,stopOpacity:.8}),e("stop",{offset:"95%",stopColor:i,stopOpacity:0})]})}),e(Je,{...Ln,tickFormatter:d=>o(new Date(d))}),e(De,{stroke:ie.colors.gray200,label:{value:"Cardinality",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(Ze,{strokeDasharray:"4 4",stroke:ie.colors.gray200,strokeOpacity:.5}),e(Xe,{content:e($o,{})}),e(jn,{type:"monotone",dataKey:"value",stroke:i,fillOpacity:1,fill:"url(#cardinalityColorUv)"})]})})}const tt={argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionCountStats_dimension",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:"count",args:[{kind:"Literal",name:"metric",value:"count"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],kind:"ScalarField",name:"dataQualityMetric",storageKey:null}],type:"Dimension",abstractKey:null};tt.hash="6dccac51f3fb0853276677c692af5a43";function Qo(n){const l=T.useFragment(tt,n.dimension).count??0;return s(H,{children:[e(F,{elementType:"h3",textSize:"small",color:"text-700",children:"Total Count"}),e(F,{textSize:"xlarge",children:cn(l)})]})}const it=function(){var n={defaultValue:null,kind:"LocalArgument",name:"countGranularity"},a={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"dimensionId"}],i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={kind:"InlineFragment",selections:[{alias:"trafficTimeSeries",args:[{kind:"Variable",name:"granularity",variableName:"countGranularity"},{kind:"Literal",name:"metric",value:"count"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:[{alias:null,args:null,concreteType:"TimeSeriesDataPoint",kind:"LinkedField",name:"data",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null}],storageKey:null}],type:"Dimension",abstractKey:null};return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"DimensionCountTimeSeriesQuery",selections:[{alias:"embedding",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[i,r],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,l,n],kind:"Operation",name:"DimensionCountTimeSeriesQuery",selections:[{alias:"embedding",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i,r],storageKey:null}]},params:{cacheID:"1f9eff6d8d453148844edae32b844df7",id:null,metadata:{},name:"DimensionCountTimeSeriesQuery",operationKind:"query",text:`query DimensionCountTimeSeriesQuery(
|
|
757
757
|
$dimensionId: GlobalID!
|
|
758
758
|
$timeRange: TimeRange!
|
|
759
759
|
$countGranularity: Granularity!
|
|
@@ -771,7 +771,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
771
771
|
}
|
|
772
772
|
}
|
|
773
773
|
}
|
|
774
|
-
`}}}();it.hash="9677ef7c6b298554824fe3fd3904c7aa";const
|
|
774
|
+
`}}}();it.hash="9677ef7c6b298554824fe3fd3904c7aa";const Oo=new Intl.NumberFormat([],{maximumFractionDigits:2}),rt=()=>{const{gray300:n}=$e();return{barColor:n}};function jo({active:n,payload:a,label:l}){var i;const{barColor:t}=rt();if(n&&a&&a.length){const r=((i=a[0])==null?void 0:i.value)??null,o=typeof r=="number"?Oo.format(r):"--";return s(Be,{children:[e(F,{weight:"heavy",textSize:"medium",children:`${Re(new Date(l))}`}),e(re,{color:t,shape:"square",name:"Count",value:o})]})}return null}function qo({dimensionId:n}){var d;const{timeRange:a}=Ve(),l=Tn(a),r=(((d=T.useLazyLoadQuery(it,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},countGranularity:l}).embedding.trafficTimeSeries)==null?void 0:d.data)||[]).map(m=>({...m,timestamp:new Date(m.timestamp).valueOf()})),o=In({samplingIntervalMinutes:l.samplingIntervalMinutes}),{barColor:c}=rt();return e(We,{width:"100%",height:"100%",children:s(Qa,{data:r,margin:Yn,syncId:"dimensionDetails",children:[e("defs",{children:s("linearGradient",{id:"countBarColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:c,stopOpacity:1}),e("stop",{offset:"95%",stopColor:c,stopOpacity:.5})]})}),e(Je,{...Ln,tickFormatter:m=>o(new Date(m))}),e(De,{stroke:ie.colors.gray200,label:{value:"Count",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(Ze,{strokeDasharray:"4 4",stroke:ie.colors.gray200,strokeOpacity:.5}),e(Xe,{...wa,content:e(jo,{})}),e(xn,{dataKey:"value",fill:"url(#countBarColor)",spacing:5})]})})}const st=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"dimensionId"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],a=[{kind:"Variable",name:"id",variableName:"dimensionId"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t=[{kind:"Variable",name:"primaryTimeRange",variableName:"timeRange"}],i={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},o={alias:null,args:null,concreteType:"NumericRange",kind:"LinkedField",name:"range",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"start",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"end",storageKey:null}],storageKey:null},c=[{alias:null,args:null,kind:"ScalarField",name:"primaryValue",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"referenceValue",storageKey:null}],d={alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"counts",plural:!1,selections:c,storageKey:null},m={alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"totalCounts",plural:!1,selections:c,storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"DimensionDriftBreakdownSegmentBarChartQuery",selections:[{alias:"dimension",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"InlineFragment",selections:[{kind:"RequiredField",field:{alias:null,args:t,concreteType:"Segments",kind:"LinkedField",name:"segmentsComparison",plural:!1,selections:[{alias:null,args:null,concreteType:"Segment",kind:"LinkedField",name:"segments",plural:!0,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"bin",plural:!1,selections:[{kind:"InlineFragment",selections:[i,r],type:"NominalBin",abstractKey:null},{kind:"InlineFragment",selections:[i,o],type:"IntervalBin",abstractKey:null},{kind:"InlineFragment",selections:[i],type:"MissingValueBin",abstractKey:null}],storageKey:null},d],storageKey:null},m],storageKey:null},action:"THROW",path:"dimension.segmentsComparison"}],type:"Dimension",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"DimensionDriftBreakdownSegmentBarChartQuery",selections:[{alias:"dimension",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[i,l,{kind:"InlineFragment",selections:[{alias:null,args:t,concreteType:"Segments",kind:"LinkedField",name:"segmentsComparison",plural:!1,selections:[{alias:null,args:null,concreteType:"Segment",kind:"LinkedField",name:"segments",plural:!0,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"bin",plural:!1,selections:[i,{kind:"InlineFragment",selections:[r],type:"NominalBin",abstractKey:null},{kind:"InlineFragment",selections:[o],type:"IntervalBin",abstractKey:null}],storageKey:null},d],storageKey:null},m],storageKey:null}],type:"Dimension",abstractKey:null}],storageKey:null}]},params:{cacheID:"7d11d88f419003f5ee8cd9d11312e427",id:null,metadata:{},name:"DimensionDriftBreakdownSegmentBarChartQuery",operationKind:"query",text:`query DimensionDriftBreakdownSegmentBarChartQuery(
|
|
775
775
|
$dimensionId: GlobalID!
|
|
776
776
|
$timeRange: TimeRange!
|
|
777
777
|
) {
|
|
@@ -811,7 +811,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
811
811
|
}
|
|
812
812
|
}
|
|
813
813
|
}
|
|
814
|
-
`}}}();st.hash="6bb76e3cce4ee28c333e485b3aa2dffd";const Ja=_a(".2f"),ot=()=>{const{primary:n,reference:a}=$e();return{primaryBarColor:n,referenceBarColor:a}};function
|
|
814
|
+
`}}}();st.hash="6bb76e3cce4ee28c333e485b3aa2dffd";const Ja=_a(".2f"),ot=()=>{const{primary:n,reference:a}=$e();return{primaryBarColor:n,referenceBarColor:a}};function Bo({active:n,payload:a,label:l}){var r,o,c,d,m,f;const{primaryBarColor:t,referenceBarColor:i}=ot();if(n&&a&&a.length){const g=(o=(r=a[0])==null?void 0:r.payload)==null?void 0:o.primaryName,p=(c=a[0])==null?void 0:c.value,y=(m=(d=a[0])==null?void 0:d.payload)==null?void 0:m.referenceName,k=(f=a[1])==null?void 0:f.value;return s(Be,{children:[e(F,{elementType:"h3",textSize:"medium",weight:"heavy",children:l}),e(re,{color:t,shape:"square",name:g,value:p!=null?`${Ja(p)}%`:"--"}),e(re,{color:i,shape:"square",name:y,value:k!=null?`${Ja(k)}%`:"--"})]})}return null}function Ho(n){var p,y,k,v,b;const{primaryInferences:a,referenceInferences:l}=Le(),t=a.name,i=(l==null?void 0:l.name)||"reference",{selectedTimestamp:r}=ia(),o=u.useMemo(()=>r??new Date(a.endTime),[r,a.endTime]),c=u.useMemo(()=>({start:sl(o,2).toISOString(),end:o.toISOString()}),[o]),d=T.useLazyLoadQuery(st,{dimensionId:n.dimensionId,timeRange:c}),m=u.useMemo(()=>{var A,K,D,R,w;const S=((A=d.dimension.segmentsComparison)==null?void 0:A.segments)??[],L=((D=(K=d.dimension.segmentsComparison)==null?void 0:K.totalCounts)==null?void 0:D.primaryValue)??0,I=((w=(R=d.dimension.segmentsComparison)==null?void 0:R.totalCounts)==null?void 0:w.referenceValue)??0;return S.map(O=>{var V,_;const Z=((V=O.counts)==null?void 0:V.primaryValue)??0,ne=((_=O.counts)==null?void 0:_.referenceValue)??0,oe=Sl(O.bin),de=Z/L*100,M=ne/I*100;return{name:oe,primaryName:t,referenceName:i,primaryPercent:de,referencePercent:M}})},[(p=d.dimension.segmentsComparison)==null?void 0:p.segments,(k=(y=d.dimension.segmentsComparison)==null?void 0:y.totalCounts)==null?void 0:k.primaryValue,(b=(v=d.dimension.segmentsComparison)==null?void 0:v.totalCounts)==null?void 0:b.referenceValue,t,i]),{primaryBarColor:f,referenceBarColor:g}=ot();return s(h,{direction:"column",height:"100%",children:[e(x,{flex:"none",paddingTop:"size-100",paddingStart:"size-200",children:e(F,{elementType:"h3",textSize:"medium",color:"text-700",children:`Distribution comparison at ${Re(new Date(c.end))}`})}),e(x,{flex:!0,children:e(We,{children:s(Qa,{data:m,margin:{top:15,right:18,left:18,bottom:5},children:[s("defs",{children:[s("linearGradient",{id:"dimensionPrimarySegmentsBarColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:f,stopOpacity:1}),e("stop",{offset:"95%",stopColor:f,stopOpacity:.5})]}),s("linearGradient",{id:"dimensionReferenceSegmentsBarColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:g,stopOpacity:1}),e("stop",{offset:"95%",stopColor:g,stopOpacity:.5})]})]}),e(Je,{dataKey:"name",style:{fill:"var(--ac-global-text-color-700)"}}),e(De,{stroke:ie.colors.gray200,label:{value:"Percent",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(Ze,{strokeDasharray:"4 4",stroke:ie.colors.gray200,strokeOpacity:.5}),e(Xe,{...wa,content:e(Bo,{})}),e(xn,{dataKey:"primaryPercent",fill:"url(#dimensionPrimarySegmentsBarColor)"}),e(xn,{dataKey:"referencePercent",fill:"url(#dimensionReferenceSegmentsBarColor)"})]})})})]})}const dt={argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionDriftStats_dimension",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:"psi",args:[{kind:"Literal",name:"metric",value:"psi"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],kind:"ScalarField",name:"driftMetric",storageKey:null}],type:"Dimension",abstractKey:null};dt.hash="f8a9fb08a14f63906e38bc247d50b189";const Go=s(Pn,{variant:"info",placement:"top end",children:[e(te,{weight:"heavy",level:4,children:"Population Stability Index"}),e(Rn,{children:e(F,{children:"PSI is a symmetric metric that measures the relative entropy, or difference in information represented by two distributions. It can be thought of as measuring the distance between two data distributions showing how different the two distributions are from each other."})}),e("footer",{children:e(dn,{href:"https://arize.com/blog-course/population-stability-index-psi/#:~:text=Population%20Stability%20Index%20(PSI)%20Overview,distributions%20are%20from%20each%20other.",children:"Learn more"})})]});function Uo(n){const a=T.useFragment(dt,n.dimension);return s(H,{children:[s(h,{direction:"row",alignItems:"center",gap:"size-25",children:[e(F,{elementType:"h3",textSize:"small",color:"text-700",children:"PSI"}),Go]}),e(F,{textSize:"xlarge",children:Cn(a.psi)})]})}const ct=function(){var n={defaultValue:null,kind:"LocalArgument",name:"countGranularity"},a={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},l={defaultValue:null,kind:"LocalArgument",name:"driftGranularity"},t={defaultValue:null,kind:"LocalArgument",name:"timeRange"},i=[{kind:"Variable",name:"id",variableName:"dimensionId"}],r={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},o={kind:"Variable",name:"timeRange",variableName:"timeRange"},c=[{alias:null,args:null,concreteType:"TimeSeriesDataPoint",kind:"LinkedField",name:"data",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null}],d={kind:"InlineFragment",selections:[{alias:null,args:[{kind:"Variable",name:"granularity",variableName:"driftGranularity"},{kind:"Literal",name:"metric",value:"psi"},o],concreteType:"DriftTimeSeries",kind:"LinkedField",name:"driftTimeSeries",plural:!1,selections:c,storageKey:null},{alias:"trafficTimeSeries",args:[{kind:"Variable",name:"granularity",variableName:"countGranularity"},{kind:"Literal",name:"metric",value:"count"},o],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:c,storageKey:null}],type:"Dimension",abstractKey:null};return{fragment:{argumentDefinitions:[n,a,l,t],kind:"Fragment",metadata:null,name:"DimensionDriftTimeSeriesQuery",selections:[{alias:"embedding",args:i,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[r,d],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,t,l,n],kind:"Operation",name:"DimensionDriftTimeSeriesQuery",selections:[{alias:"embedding",args:i,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},r,d],storageKey:null}]},params:{cacheID:"af2d25e28675891b3c8a6bc75027f731",id:null,metadata:{},name:"DimensionDriftTimeSeriesQuery",operationKind:"query",text:`query DimensionDriftTimeSeriesQuery(
|
|
815
815
|
$dimensionId: GlobalID!
|
|
816
816
|
$timeRange: TimeRange!
|
|
817
817
|
$driftGranularity: Granularity!
|
|
@@ -836,7 +836,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
836
836
|
}
|
|
837
837
|
}
|
|
838
838
|
}
|
|
839
|
-
`}}}();ct.hash="6312b58dbb252b17efdf08d44dd58630";const ut=()=>{const{orange300:n,gray300:a}=$e();return{color:n,barColor:a}};function
|
|
839
|
+
`}}}();ct.hash="6312b58dbb252b17efdf08d44dd58630";const ut=()=>{const{orange300:n,gray300:a}=$e();return{color:n,barColor:a}};function Wo({active:n,payload:a,label:l}){var i;const{color:t}=ut();if(n&&a&&a.length){const r=((i=a[1])==null?void 0:i.value)??null;return s(Be,{children:[e(F,{weight:"heavy",textSize:"medium",children:`${Re(new Date(l))}`}),e(re,{color:t,name:"PSI",value:Cn(r)}),e(ra,{}),s("div",{css:C`
|
|
840
840
|
display: flex;
|
|
841
841
|
flex-direction: row;
|
|
842
842
|
align-items: center;
|
|
@@ -844,7 +844,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
844
844
|
gap: var(--px-spacing-sm);
|
|
845
845
|
|
|
846
846
|
margin-top: var(--px-spacing-sm);
|
|
847
|
-
`,children:[e(P,{svg:e(Al,{})}),e("span",{children:"Click to view details"})]})]})}return null}function
|
|
847
|
+
`,children:[e(P,{svg:e(Al,{})}),e("span",{children:"Click to view details"})]})]})}return null}function Jo({dimensionId:n}){var y,k;const{timeRange:a}=Ve(),{selectedTimestamp:l,setSelectedTimestamp:t}=ia(),i=Tn(a),r=T.useLazyLoadQuery(ct,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},driftGranularity:yl(a),countGranularity:i}),o=((y=r.embedding.driftTimeSeries)==null?void 0:y.data)||[],c=((k=r.embedding.trafficTimeSeries)==null?void 0:k.data.reduce((v,b)=>(v[b.timestamp]=b.value,v),{}))??{},d=o.map(v=>{const b=c[v.timestamp];return{...v,traffic:b,timestamp:new Date(v.timestamp).valueOf()}}),m=In({samplingIntervalMinutes:i.samplingIntervalMinutes}),f=u.useCallback(v=>{const{activePayload:b}=v;if(b!=null&&b.length>0){const S=b[0].payload;t(new Date(S.timestamp))}},[t]),{color:g,barColor:p}=ut();return e(We,{width:"100%",height:"100%",children:s(Xn,{data:d,margin:Yn,onClick:f,syncId:"dimensionDetails",children:[s("defs",{children:[s("linearGradient",{id:"dimensionDriftColorUv",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:g,stopOpacity:.8}),e("stop",{offset:"95%",stopColor:g,stopOpacity:0})]}),s("linearGradient",{id:"barColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:p,stopOpacity:.8}),e("stop",{offset:"95%",stopColor:p,stopOpacity:0})]})]}),e(Je,{...Ln,tickFormatter:v=>m(new Date(v))}),e(De,{stroke:ie.colors.gray200,label:{value:"PSI",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(De,{yAxisId:"right",orientation:"right",tick:!1,tickLine:!1,width:0}),e(Ze,{strokeDasharray:"4 4",stroke:ie.colors.gray200,strokeOpacity:.5}),e(Xe,{content:e(Wo,{})}),e(xn,{yAxisId:"right",dataKey:"traffic",fill:"url(#barColor)",spacing:5}),e(jn,{type:"monotone",dataKey:"value",stroke:g,fillOpacity:1,fill:"url(#dimensionDriftColorUv)"}),l!=null?e(Ml,{...fl,x:l.getTime()}):null]})})}const mt=function(){var n={kind:"Literal",name:"metric",value:"percentEmpty"};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"hasReference"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionPercentEmptyStats_dimension",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:"percentEmpty",args:[n,{kind:"Variable",name:"timeRange",variableName:"timeRange"}],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{condition:"hasReference",kind:"Condition",passingValue:!0,selections:[{alias:"referencePercentEmpty",args:[{kind:"Literal",name:"inferencesRole",value:"reference"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:'dataQualityMetric(inferencesRole:"reference",metric:"percentEmpty")'}]}],type:"Dimension",abstractKey:null}}();mt.hash="1e10d0449d6607d9292f355548c41c78";function Zo(n){const a=T.useFragment(mt,n.dimension);return s(H,{children:[e(F,{elementType:"h3",textSize:"small",color:"text-700",children:"% Empty"}),e(F,{textSize:"xlarge",children:Ta(a.percentEmpty)}),a.referencePercentEmpty!=null&&e(F,{textSize:"medium",color:"designationPurple",children:Ta(a.referencePercentEmpty)})]})}const gt=function(){var n={defaultValue:null,kind:"LocalArgument",name:"dimensionId"},a={defaultValue:null,kind:"LocalArgument",name:"granularity"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"dimensionId"}],i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={kind:"InlineFragment",selections:[{alias:"percentEmptyTimeSeries",args:[{kind:"Variable",name:"granularity",variableName:"granularity"},{kind:"Literal",name:"metric",value:"percentEmpty"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],concreteType:"DataQualityTimeSeries",kind:"LinkedField",name:"dataQualityTimeSeries",plural:!1,selections:[{alias:null,args:null,concreteType:"TimeSeriesDataPoint",kind:"LinkedField",name:"data",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],storageKey:null}],storageKey:null}],type:"Dimension",abstractKey:null};return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"DimensionPercentEmptyTimeSeriesQuery",selections:[{alias:"embedding",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[i,r],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,l,a],kind:"Operation",name:"DimensionPercentEmptyTimeSeriesQuery",selections:[{alias:"embedding",args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i,r],storageKey:null}]},params:{cacheID:"9be05c72f19755036f4829777a96f97d",id:null,metadata:{},name:"DimensionPercentEmptyTimeSeriesQuery",operationKind:"query",text:`query DimensionPercentEmptyTimeSeriesQuery(
|
|
848
848
|
$dimensionId: GlobalID!
|
|
849
849
|
$timeRange: TimeRange!
|
|
850
850
|
$granularity: Granularity!
|
|
@@ -862,7 +862,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
862
862
|
}
|
|
863
863
|
}
|
|
864
864
|
}
|
|
865
|
-
`}}}();gt.hash="1e843d6c8dbe05b389b24188c6bdb394";const
|
|
865
|
+
`}}}();gt.hash="1e843d6c8dbe05b389b24188c6bdb394";const Xo=new Intl.NumberFormat([],{maximumFractionDigits:2}),pt=()=>{const{gray100:n}=$e();return{color:n}};function Yo({active:n,payload:a,label:l}){var i;const{color:t}=pt();if(n&&a&&a.length){const r=((i=a[0])==null?void 0:i.value)??null,o=typeof r=="number"?Xo.format(r):"--";return s(Be,{children:[e(F,{weight:"heavy",textSize:"medium",children:`${Re(new Date(l))}`}),e(re,{color:t,name:"% Empty",value:o})]})}return null}function ed({dimensionId:n}){var c;const{timeRange:a}=Ve(),l=Tn(a),i=((c=T.useLazyLoadQuery(gt,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},granularity:l}).embedding.percentEmptyTimeSeries)==null?void 0:c.data.map(d=>({timestamp:new Date(d.timestamp).valueOf(),value:d.value})))||[],r=In({samplingIntervalMinutes:l.samplingIntervalMinutes}),{color:o}=pt();return e(We,{width:"100%",height:"100%",children:s(Xn,{data:i,margin:Yn,syncId:"dimensionDetails",children:[e("defs",{children:s("linearGradient",{id:"percentEmptyColorUv",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:o,stopOpacity:.8}),e("stop",{offset:"95%",stopColor:o,stopOpacity:0})]})}),e(Je,{...Ln,tickFormatter:d=>r(new Date(d))}),e(De,{stroke:ie.colors.gray200,label:{value:"% Empty",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(Ze,{strokeDasharray:"4 4",stroke:ie.colors.gray200,strokeOpacity:.5}),e(Xe,{content:e(Yo,{})}),e(Nl,{type:"monotone",dataKey:"value",stroke:o,fillOpacity:1,fill:"url(#percentEmptyColorUv)"})]})})}const yt=function(){var n={kind:"Variable",name:"timeRange",variableName:"timeRange"};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionQuantilesStats_dimension",selections:[{alias:"p99",args:[{kind:"Literal",name:"metric",value:"p99"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p75",args:[{kind:"Literal",name:"metric",value:"p75"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p50",args:[{kind:"Literal",name:"metric",value:"p50"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p25",args:[{kind:"Literal",name:"metric",value:"p25"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:null},{alias:"p1",args:[{kind:"Literal",name:"metric",value:"p01"},n],kind:"ScalarField",name:"dataQualityMetric",storageKey:null}],type:"Dimension",abstractKey:null}}();yt.hash="c306c8eafb1d34be464d3a658d5f94a7";function nd(n){const a=T.useFragment(yt,n.dimension);return e("ul",{css:C`
|
|
866
866
|
display: flex;
|
|
867
867
|
flex-direction: column;
|
|
868
868
|
gap: var(--px-spacing-sm);
|
|
@@ -912,14 +912,14 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
912
912
|
}
|
|
913
913
|
}
|
|
914
914
|
}
|
|
915
|
-
`}}}();ft.hash="134f0dad0e0ecc7863dfbb0f437d829b";const
|
|
915
|
+
`}}}();ft.hash="134f0dad0e0ecc7863dfbb0f437d829b";const ad=_a("~s");var ht=(n=>(n.p99_p01="p99_p01",n.p75_p25="p75_p25",n.p50="p50",n))(ht||{});const ld=new Intl.NumberFormat([],{maximumFractionDigits:2});function zn(n){return typeof n=="number"?ld.format(n):"--"}const kt=()=>{const n=$e();return{outerColor:n.gray500,innerColor:n.gray300,lineColor:n.default}};function td({active:n,payload:a,label:l}){const{outerColor:t,innerColor:i,lineColor:r}=kt();if(n&&a&&a.length){const o=a[0].payload;return s(Be,{children:[e(F,{weight:"heavy",textSize:"medium",children:`${Re(new Date(l))}`}),e(re,{color:t,name:"p99",value:zn(o.p99_p01[0])}),e(re,{color:i,name:"p75",value:zn(o.p75_p25[0])}),e(re,{color:r,name:"p50",value:zn(o.p50)}),e(re,{color:i,name:"p25",value:zn(o.p75_p25[1])}),e(re,{color:t,name:"p01",value:zn(o.p99_p01[1])})]})}return null}function id({dimensionId:n}){var I,A,K,D,R;const{timeRange:a}=Ve(),l=Tn(a),t=T.useLazyLoadQuery(ft,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},granularity:l}),i=((I=t.dimension.p99TimeSeries)==null?void 0:I.data.map(w=>w))||[],r=((A=t.dimension.p01TimeSeries)==null?void 0:A.data.map(w=>w))||[],o=((K=t.dimension.p75TimeSeries)==null?void 0:K.data.map(w=>w))||[],c=((D=t.dimension.p25TimeSeries)==null?void 0:D.data.map(w=>w))||[],d=((R=t.dimension.p50TimeSeries)==null?void 0:R.data.map(w=>w))||[],m=i.map((w,O)=>({timestamp:new Date(w.timestamp).valueOf(),p99_p01:[w.value,r[O].value],p75_p25:[o[O].value,c[O].value],p50:d[O].value})),f=In({samplingIntervalMinutes:l.samplingIntervalMinutes}),[g,p]=u.useState(Object.keys(ht).reduce((w,O)=>(w[O]=!1,w),{})),y=w=>{g[w.dataKey]||p({...g})},k=()=>{p({...g})},v=w=>{p({...g,[String(w.dataKey)]:!g[w.dataKey]})},{outerColor:b,innerColor:S,lineColor:L}=kt();return e(We,{width:"100%",height:"100%",children:s(Xn,{data:m,margin:Yn,syncId:"dimensionDetails",children:[s("defs",{children:[s("linearGradient",{id:"p99_p01ColorUV",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"10%",stopColor:b,stopOpacity:.7}),e("stop",{offset:"50%",stopColor:b,stopOpacity:.3}),e("stop",{offset:"90%",stopColor:b,stopOpacity:.7})]}),s("linearGradient",{id:"p75_p25ColorUV",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"10%",stopColor:S,stopOpacity:.7}),e("stop",{offset:"50%",stopColor:S,stopOpacity:.3}),e("stop",{offset:"90%",stopColor:S,stopOpacity:.7})]})]}),e(Je,{...Ln,tickFormatter:w=>f(new Date(w))}),e(De,{stroke:ie.colors.gray200,label:{value:"Value",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},tickFormatter:w=>ad(w),style:{fill:"var(--ac-global-text-color-700)"}}),e(Ze,{strokeDasharray:"4 4",stroke:ie.colors.gray200,strokeOpacity:.5}),e(Xe,{content:e(td,{})}),e(zs,{onClick:v,onMouseOver:y,onMouseOut:k}),e(jn,{type:"monotone",dataKey:"p99_p01",name:"p99 - p01",fillOpacity:1,fill:"url(#p99_p01ColorUV)",stroke:b,hide:g.p99_p01===!0}),e(jn,{type:"monotone",dataKey:"p75_p25",name:"p75 - p25",fillOpacity:1,stroke:S,fill:"url(#p75_p25ColorUV)",hide:g.p75_p25===!0}),e(Nl,{type:"monotone",dataKey:"p50",stroke:L,hide:g.p50===!0})]})})}const bt=function(){var n={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},a=[{alias:null,args:null,kind:"ScalarField",name:"primaryValue",storageKey:null}];return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],kind:"Fragment",metadata:null,name:"DimensionSegmentsBarChart_dimension",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:[{kind:"Variable",name:"primaryTimeRange",variableName:"timeRange"}],concreteType:"Segments",kind:"LinkedField",name:"segmentsComparison",plural:!1,selections:[{alias:null,args:null,concreteType:"Segment",kind:"LinkedField",name:"segments",plural:!0,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"bin",plural:!1,selections:[{kind:"InlineFragment",selections:[n,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],type:"NominalBin",abstractKey:null},{kind:"InlineFragment",selections:[n,{alias:null,args:null,concreteType:"NumericRange",kind:"LinkedField",name:"range",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"start",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"end",storageKey:null}],storageKey:null}],type:"IntervalBin",abstractKey:null},{kind:"InlineFragment",selections:[n],type:"MissingValueBin",abstractKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"counts",plural:!1,selections:a,storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DatasetValues",kind:"LinkedField",name:"totalCounts",plural:!1,selections:a,storageKey:null}],storageKey:null}],type:"Dimension",abstractKey:null}}();bt.hash="8cef9841e9a5bd7d0d50acb5db9028b0";const rd=_a(".2f"),St=()=>{const{primary:n}=$e();return{color:n}};function sd({active:n,payload:a,label:l}){var i;const{color:t}=St();if(n&&a&&a.length){const r=(i=a[0])==null?void 0:i.value;return e(Be,{children:e(re,{color:t,shape:"square",name:l,value:r!=null?`${rd(r)}%`:"--"})})}return null}function od(n){const a=T.useFragment(bt,n.dimension),l=u.useMemo(()=>{var o,c,d;const i=((o=a.segmentsComparison)==null?void 0:o.segments)??[],r=((d=(c=a.segmentsComparison)==null?void 0:c.totalCounts)==null?void 0:d.primaryValue)??0;return i.map(m=>{var y;const f=((y=m.counts)==null?void 0:y.primaryValue)??0,g=Sl(m.bin),p=f/r*100;return{name:g,percent:p}})},[a]),{color:t}=St();return e(We,{children:s(Qa,{data:l,margin:{top:25,right:18,left:18,bottom:5},children:[e("defs",{children:s("linearGradient",{id:"dimensionSegmentsBarColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:t,stopOpacity:1}),e("stop",{offset:"95%",stopColor:t,stopOpacity:.5})]})}),e(Je,{dataKey:"name",style:{fill:"var(--ac-global-text-color-700)"}}),e(De,{stroke:ie.colors.gray200,label:{value:"% Volume",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"var(--ac-global-text-color-900)"}},style:{fill:"var(--ac-global-text-color-700)"}}),e(Ze,{strokeDasharray:"4 4",stroke:ie.colors.gray200,strokeOpacity:.5}),e(Xe,{...wa,content:e(sd,{})}),e(xn,{dataKey:"percent",fill:"url(#dimensionSegmentsBarColor)",spacing:15})]})})}function Dm(){const{dimensionId:n}=je(),{timeRange:a}=Ve(),l=Bn(),{referenceInferences:t}=Le(),i=t!==null,r=i,o=l.dimension.shape!=="continuous",c=l.dimension.dataType==="numeric",d=ae(),m=T.useLazyLoadQuery(et,{dimensionId:n,timeRange:{start:a.start.toISOString(),end:a.end.toISOString()},hasReference:i});if(!n)throw new Error("Dimension ID is required to display a dimension");return e(bl,{initialTimestamp:new Date(a.end),children:e(U,{type:"slideOver",isDismissable:!0,onDismiss:()=>d(-1),children:e(j,{size:"L",title:l.dimension.name,children:e("main",{css:C`
|
|
916
916
|
padding: var(--px-spacing-med);
|
|
917
917
|
display: flex;
|
|
918
918
|
flex-direction: column;
|
|
919
919
|
min-height: 400px;
|
|
920
920
|
overflow-y: auto;
|
|
921
921
|
height: 100%;
|
|
922
|
-
`,children:e(u.Suspense,{fallback:e(se,{}),children:s(h,{direction:"column",gap:"size-100",children:[e(x,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-1600",children:e(
|
|
922
|
+
`,children:e(u.Suspense,{fallback:e(se,{}),children:s(h,{direction:"column",gap:"size-100",children:[e(x,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-1600",children:e(od,{dimension:m.dimension})}),e(x,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-1600","data-testid":"dimension-count-time-series-view",children:s(h,{direction:"row",alignItems:"stretch",height:"100%",children:[e(qo,{dimensionId:n}),e(Sn,{children:e(Qo,{dimension:m.dimension})})]})}),r?e(x,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",children:s(h,{direction:"column",alignItems:"stretch",children:[e(x,{width:"100%",height:"size-1600",children:s(h,{direction:"row",alignItems:"stretch",height:"100%",children:[e(x,{flex:!0,children:e(Jo,{dimensionId:n})}),e(Sn,{children:e(Uo,{dimension:m.dimension})})]})}),e(x,{height:"size-1600",width:"100%",borderTopColor:"dark",borderTopWidth:"thin",children:e(u.Suspense,{fallback:e(se,{}),children:e(Ho,{dimensionId:n})})})]})}):null,c?e(x,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-3000",children:s(h,{direction:"row",alignItems:"stretch",height:"100%",children:[e(x,{flex:!0,children:e(id,{dimensionId:n})}),e(Sn,{children:e(nd,{dimension:m.dimension})})]})}):null,o?e(x,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-1600",children:s(h,{direction:"row",alignItems:"stretch",height:"100%",children:[e(x,{flex:!0,children:e(zo,{dimensionId:n})}),e(Sn,{children:e(No,{dimension:m.dimension})})]})}):null,e(x,{borderColor:"dark",borderRadius:"medium",borderWidth:"thin",height:"size-1600",children:s(h,{direction:"row",alignItems:"stretch",height:"100%",children:[e(ed,{dimensionId:n}),e(Sn,{children:e(Zo,{dimension:m.dimension})})]})})]})})})})})})}const vt=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"dataType",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"shape",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"dimensionLoaderQuery",selections:[{alias:"dimension",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[l,t,i,r],type:"Dimension",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"dimensionLoaderQuery",selections:[{alias:"dimension",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},l,{kind:"InlineFragment",selections:[t,i,r],type:"Dimension",abstractKey:null}],storageKey:null}]},params:{cacheID:"03a9aafe3f08a9d093b029ff4a9e3253",id:null,metadata:{},name:"dimensionLoaderQuery",operationKind:"query",text:`query dimensionLoaderQuery(
|
|
923
923
|
$id: GlobalID!
|
|
924
924
|
) {
|
|
925
925
|
dimension: node(id: $id) {
|
|
@@ -934,7 +934,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
934
934
|
id
|
|
935
935
|
}
|
|
936
936
|
}
|
|
937
|
-
`}}}();vt.hash="5a662d77e69d2e9bb4eb2af4cad6b722";async function
|
|
937
|
+
`}}}();vt.hash="5a662d77e69d2e9bb4eb2af4cad6b722";async function Tm(n){const{dimensionId:a}=n.params;return T.fetchQuery(Ie,vt,{id:a}).toPromise()}const Ct=function(){var n={defaultValue:null,kind:"LocalArgument",name:"id"},a={defaultValue:null,kind:"LocalArgument",name:"traceId"},l=[{kind:"Variable",name:"id",variableName:"id"}],t={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},r={kind:"InlineFragment",selections:[{alias:null,args:[{kind:"Variable",name:"traceId",variableName:"traceId"}],concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[{alias:null,args:[{kind:"Literal",name:"first",value:1e3}],concreteType:"SpanConnection",kind:"LinkedField",name:"spans",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:[t,{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},i,{alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},{alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"parentId",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:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[i,{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}],storageKey:null}],storageKey:null}],storageKey:"spans(first:1000)"}],storageKey:null}],type:"Project",abstractKey:null};return{fragment:{argumentDefinitions:[n,a],kind:"Fragment",metadata:null,name:"TraceDetailsQuery",selections:[{alias:"project",args:l,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[r],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,n],kind:"Operation",name:"TraceDetailsQuery",selections:[{alias:"project",args:l,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},r,{kind:"TypeDiscriminator",abstractKey:"__isNode"},t],storageKey:null}]},params:{cacheID:"22103e9bb1f983529081ca93d60e76ef",id:null,metadata:{},name:"TraceDetailsQuery",operationKind:"query",text:`query TraceDetailsQuery(
|
|
938
938
|
$traceId: ID!
|
|
939
939
|
$id: GlobalID!
|
|
940
940
|
) {
|
|
@@ -974,7 +974,7 @@ fragment DimensionSegmentsBarChart_dimension_3E0ZE6 on Dimension {
|
|
|
974
974
|
id
|
|
975
975
|
}
|
|
976
976
|
}
|
|
977
|
-
`}}}();Ct.hash="8b568616f23f7d349cac5a31807463fb";const Ft=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"spanId"}],a=[{kind:"Variable",name:"id",variableName:"spanId"}],l={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},i={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},r={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},o={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},c={alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},d={alias:null,args:null,kind:"ScalarField",name:"statusMessage",storageKey:null},m={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},
|
|
977
|
+
`}}}();Ct.hash="8b568616f23f7d349cac5a31807463fb";const Ft=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"spanId"}],a=[{kind:"Variable",name:"id",variableName:"spanId"}],l={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},i={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},r={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},o={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},c={alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},d={alias:null,args:null,kind:"ScalarField",name:"statusMessage",storageKey:null},m={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},f={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},g={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},p={alias:null,args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},y={alias:null,args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},k={alias:null,args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},v=[{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"mimeType",storageKey:null}],b={alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:v,storageKey:null},S={alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:v,storageKey:null},L={alias:null,args:null,kind:"ScalarField",name:"attributes",storageKey:null},I={alias:null,args:null,concreteType:"SpanEvent",kind:"LinkedField",name:"events",plural:!0,selections:[r,{alias:null,args:null,kind:"ScalarField",name:"message",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"timestamp",storageKey:null}],storageKey:null},A={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},K={alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},D={alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},R={alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null},w={alias:null,args:null,concreteType:"DocumentEvaluation",kind:"LinkedField",name:"documentEvaluations",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"documentPosition",storageKey:null},r,K,D,R],storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SpanDetailsQuery",selections:[{alias:"span",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"InlineFragment",selections:[t,i,r,o,c,d,m,f,g,p,y,k,b,S,L,{kind:"RequiredField",field:I,action:"THROW",path:"span.events"},A,w,{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[r],storageKey:null},{args:null,kind:"FragmentSpread",name:"SpanFeedback_annotations"},{args:null,kind:"FragmentSpread",name:"SpanAside_span"}],type:"Span",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SpanDetailsQuery",selections:[{alias:"span",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"TypeDiscriminator",abstractKey:"__isNode"},t,{kind:"InlineFragment",selections:[i,r,o,c,d,m,f,g,p,y,k,b,S,L,I,A,w,{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[r,K,D,R,{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},t],storageKey:null},{alias:"code",args:null,kind:"ScalarField",name:"statusCode",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null}],type:"Span",abstractKey:null}],storageKey:null}]},params:{cacheID:"b1a80a0108c40baebf6e64b811ca0202",id:null,metadata:{},name:"SpanDetailsQuery",operationKind:"query",text:`query SpanDetailsQuery(
|
|
978
978
|
$spanId: GlobalID!
|
|
979
979
|
) {
|
|
980
980
|
span: node(id: $spanId) {
|
|
@@ -1069,7 +1069,7 @@ fragment SpanFeedback_annotations on Span {
|
|
|
1069
1069
|
overflow: hidden;
|
|
1070
1070
|
text-overflow: ellipsis;
|
|
1071
1071
|
}
|
|
1072
|
-
`;function
|
|
1072
|
+
`;function he(n){const{name:a,metric:l,k:t,score:i}=n,r=typeof t=="number"?`${l}@${t}`:l,o=u.useMemo(()=>l==="hit"?i?"true":"false":typeof i=="number"&&_e(i)||"--",[i,l]);return s(Fe,{delay:500,offset:3,children:[e(Kn,{children:e("div",{css:us,children:s(h,{direction:"row",gap:"size-100",alignItems:"center",children:[e(ms,{color:"var(--ac-global-color-seafoam-1000)"}),a?e("div",{css:ba,children:e(F,{weight:"heavy",textSize:"small",color:"inherit",children:a})}):null,e("div",{css:ba,children:e(F,{textSize:"small",color:"inherit",children:r})}),e("div",{css:ba,children:e(F,{textSize:"small",children:o})})]})})}),e(Jn,{children:s(h,{direction:"row",gap:"size-100",children:[s(F,{weight:"heavy",color:"inherit",children:[a," ",r]}),e(F,{color:"inherit",children:o})]})})]})}const Kt=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"projectId"},{defaultValue:null,kind:"LocalArgument",name:"spanId"}],a=[{kind:"Variable",name:"id",variableName:"projectId"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null}],type:"Project",abstractKey:null},i=[{kind:"Variable",name:"id",variableName:"spanId"}],r={kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null},o={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"EditSpanAnnotationsDialogNewAnnotationQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,t],storageKey:null},{alias:"span",args:i,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,r],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"EditSpanAnnotationsDialogNewAnnotationQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[o,l,t],storageKey:null},{alias:"span",args:i,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[o,l,r],storageKey:null}]},params:{cacheID:"4aa13fbe70360943615a8ff4d4b2a06f",id:null,metadata:{},name:"EditSpanAnnotationsDialogNewAnnotationQuery",operationKind:"query",text:`query EditSpanAnnotationsDialogNewAnnotationQuery(
|
|
1073
1073
|
$projectId: GlobalID!
|
|
1074
1074
|
$spanId: GlobalID!
|
|
1075
1075
|
) {
|
|
@@ -1199,10 +1199,10 @@ fragment EditSpanAnnotationsDialog_spanAnnotations on Span {
|
|
|
1199
1199
|
explanation
|
|
1200
1200
|
}
|
|
1201
1201
|
}
|
|
1202
|
-
`}}}();Lt.hash="ded0a7a64a2706f6ec472a63c1c57eca";const
|
|
1202
|
+
`}}}();Lt.hash="ded0a7a64a2706f6ec472a63c1c57eca";const dd=C`
|
|
1203
1203
|
color: var(--ac-global-text-color-900);
|
|
1204
1204
|
font-size: 12px;
|
|
1205
|
-
`;function _t(n){const{initialData:a,isReadOnly:l,onSubmit:t,isSubmitting:i=!1}=n,{control:r,handleSubmit:o,formState:{isDirty:c,isValid:d},setError:m,reset:
|
|
1205
|
+
`;function _t(n){const{initialData:a,isReadOnly:l,onSubmit:t,isSubmitting:i=!1}=n,{control:r,handleSubmit:o,formState:{isDirty:c,isValid:d},setError:m,reset:f}=qe({defaultValues:a,disabled:l}),g=u.useCallback(y=>{const k=!y.label,v=y.score===""||y.score==null;if(k&&v){m("label",{type:"manual",message:"Label or score is required"}),m("score",{type:"manual",message:"Label or score is required"});return}const b={...y,score:y.score!=null?parseFloat(y.score.toString()):null};t&&t(b),f(b)},[t,m,f]),p=l;return s(mn,{onSubmit:o(g),children:[e(x,{padding:"size-200",children:s(h,{direction:"column",gap:"size-100",children:[s("div",{css:C`
|
|
1206
1206
|
display: flex;
|
|
1207
1207
|
flex-direction: row;
|
|
1208
1208
|
width: 100%;
|
|
@@ -1214,7 +1214,7 @@ fragment EditSpanAnnotationsDialog_spanAnnotations on Span {
|
|
|
1214
1214
|
.ac-textfield {
|
|
1215
1215
|
min-width: 0;
|
|
1216
1216
|
}
|
|
1217
|
-
`,children:[e(
|
|
1217
|
+
`,children:[e(G,{name:"label",control:r,render:({field:{onChange:y,onBlur:k,value:v},fieldState:{invalid:b,error:S}})=>e(le,{label:"Label",placeholder:"e.x. good, bad",description:"A categorical label like 'good' or 'bad'",isReadOnly:l,errorMessage:S==null?void 0:S.message,validationState:b?"invalid":"valid",onChange:y,onBlur:k,value:(v==null?void 0:v.toString())||""})}),e(G,{name:"score",control:r,render:({field:{onChange:y,onBlur:k,value:v},fieldState:{invalid:b,error:S}})=>e(le,{label:"Score",type:"number",placeholder:"e.x. 0.8",description:"A numeric grade",errorMessage:S==null?void 0:S.message,isReadOnly:l,validationState:b?"invalid":"valid",onChange:y,onBlur:k,value:(v==null?void 0:v.toString())||""})})]}),s("details",{open:!p,css:dd,children:[e("summary",{children:"Annotation Details"}),e(x,{paddingTop:"size-50",children:e(G,{name:"explanation",control:r,render:({field:{onChange:y,onBlur:k,value:v},fieldState:{invalid:b,error:S}})=>e(Zn,{label:"Explanation",height:70,isReadOnly:l,description:"Why this score or label was given",errorMessage:S==null?void 0:S.message,validationState:b?"invalid":"valid",onChange:y,onBlur:k,value:(v==null?void 0:v.toString())||""})})})]})]})}),e(H,{children:l?null:e(x,{paddingTop:"size-100",paddingBottom:"size-100",paddingEnd:"size-200",paddingStart:"size-200",borderTopWidth:"thin",borderColor:"dark",children:e(h,{direction:"row",justifyContent:"end",children:e(N,{variant:c?"primary":"default",type:"submit",size:"compact",disabled:!d||!c||i,children:i?"Saving...":"Save"})})})})]})}function cd(n){const{annotationName:a,spanNodeId:l,onCreated:t}=n,[i,r]=T.useMutation(Lt);return e(_t,{initialData:{name:a},isSubmitting:r,onSubmit:c=>{i({variables:{input:{spanId:l,annotatorKind:"HUMAN",...c},spanId:l},onCompleted:()=>{t()}})}})}const At=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"annotationId"},{defaultValue:null,kind:"LocalArgument",name:"spanId"}],a=[{fields:[{items:[{kind:"Variable",name:"annotationIds.0",variableName:"annotationId"}],kind:"ListValue",name:"annotationIds"}],kind:"ObjectValue",name:"input"}],l=[{kind:"Variable",name:"id",variableName:"spanId"}],t={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SpanAnnotationActionMenuDeleteMutation",selections:[{alias:null,args:a,concreteType:"SpanAnnotationMutationPayload",kind:"LinkedField",name:"deleteSpanAnnotations",plural:!1,selections:[{alias:null,args:null,concreteType:"Query",kind:"LinkedField",name:"query",plural:!1,selections:[{alias:null,args:l,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[{args:null,kind:"FragmentSpread",name:"EditSpanAnnotationsDialog_spanAnnotations"}],type:"Span",abstractKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SpanAnnotationActionMenuDeleteMutation",selections:[{alias:null,args:a,concreteType:"SpanAnnotationMutationPayload",kind:"LinkedField",name:"deleteSpanAnnotations",plural:!1,selections:[{alias:null,args:null,concreteType:"Query",kind:"LinkedField",name:"query",plural:!1,selections:[{alias:null,args:l,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},t,{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[t,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null}],storageKey:null}],storageKey:null}],storageKey:null}]},params:{cacheID:"422687a283120080277d2649c1b9f6ee",id:null,metadata:{},name:"SpanAnnotationActionMenuDeleteMutation",operationKind:"mutation",text:`mutation SpanAnnotationActionMenuDeleteMutation(
|
|
1218
1218
|
$annotationId: GlobalID!
|
|
1219
1219
|
$spanId: GlobalID!
|
|
1220
1220
|
) {
|
|
@@ -1243,15 +1243,15 @@ fragment EditSpanAnnotationsDialog_spanAnnotations on Span {
|
|
|
1243
1243
|
explanation
|
|
1244
1244
|
}
|
|
1245
1245
|
}
|
|
1246
|
-
`}}}();At.hash="a898fcb037b08cb626daaf3d385588ce";function
|
|
1246
|
+
`}}}();At.hash="a898fcb037b08cb626daaf3d385588ce";function ud(n){const{onDelete:a,isDisabled:l=!1}=n;return e("div",{onClick:t=>{t.preventDefault(),t.stopPropagation()},children:e(Ue,{align:"end",buttonSize:"compact",isDisabled:l,onAction:t=>{switch(t){case"deleteAnnotation":a();break}},children:e(J,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(P,{svg:e(E.TrashOutline,{})}),e(F,{children:"Delete"})]})},"deleteAnnotation")})})}function md(n){const{annotationId:a,spanNodeId:l,annotationName:t,onSpanAnnotationActionSuccess:i,onSpanAnnotationActionError:r}=n,[o,c]=u.useState(null),[d,m]=T.useMutation(At),f=u.useCallback(()=>{u.startTransition(()=>{d({variables:{annotationId:a,spanId:l},onCompleted:()=>{i({title:"Annotation Deleted",message:`Annotation ${t} has been deleted.`})},onError:p=>{r(p)}})})},[d,a,l,i,t,r]),g=u.useCallback(()=>{c(s(j,{size:"S",title:"Delete Annotation",children:[e(x,{padding:"size-200",children:e(F,{color:"danger",children:`Are you sure you want to delete annotation ${t}? This cannot be undone.`})}),e(x,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(h,{direction:"row",justifyContent:"end",children:e(N,{variant:"danger",onClick:()=>{f(),c(null)},children:"Delete Annotation"})})})]}))},[f,t]);return s("div",{children:[e(ud,{onDelete:g,isDisabled:m}),e(U,{type:"modal",isDismissable:!0,onDismiss:()=>c(null),children:o})]})}function gd(n){const{projectId:a,spanNodeId:l}=n,[t,i]=u.useState(null),r=ge();return e(j,{title:"Annotate",size:"M",isDismissable:!0,extra:e(pd,{projectId:a,spanNodeId:l,disabled:t!==null,onAnnotationNameSelect:i}),children:s("div",{css:C`
|
|
1247
1247
|
height: 100%;
|
|
1248
1248
|
overflow-y: auto;
|
|
1249
1249
|
padding: var(--ac-global-dimension-size-200);
|
|
1250
|
-
`,children:[t&&e(x,{paddingBottom:"size-200",children:e(
|
|
1250
|
+
`,children:[t&&e(x,{paddingBottom:"size-200",children:e(kd,{spanNodeId:l,name:t,onDelete:()=>{i(null)},onCreated:()=>{i(null),r({title:"New Span Annotation",message:`Annotation ${t} has been created.`})}})}),e(u.Suspense,{children:e(fd,{...n})})]})})}function pd(n){const{projectId:a,disabled:l=!1,spanNodeId:t,onAnnotationNameSelect:i}=n,[r,o]=u.useState(!1);return s(yn,{placement:"bottom end",crossOffset:300,isOpen:r,onOpenChange:c=>{o(c)},children:[e(N,{variant:"default",disabled:l,size:"compact",icon:e(P,{svg:e(E.PlusCircleOutline,{})}),onClick:()=>{o(!0)},children:"New"}),e(yd,{projectId:a,spanNodeId:t,onAnnotationNameSelect:c=>{i(c),o(!1)}})]})}function yd(n){const{projectId:a,spanNodeId:l,onAnnotationNameSelect:t}=n;return e(z,{title:"New Annotation",backgroundColor:"light",borderColor:"light",variant:"compact",bodyStyle:{padding:0},children:e(u.Suspense,{children:e(Sd,{projectId:a,spanId:l,onAnnotationNameSelect:t})})})}function fd(n){const a=T.useLazyLoadQuery(It,{spanId:n.spanNodeId},{fetchPolicy:"store-and-network"});return e(hd,{span:a.span})}function hd(n){const{span:a}=n,[l]=T.useRefetchableFragment(Tt,a),t=l.spanAnnotations||[],i=t.length>0;return s("div",{children:[!i&&e(hl,{graphicKey:"documents",message:"No annotations for this span"}),e("ul",{css:C`
|
|
1251
1251
|
display: flex;
|
|
1252
1252
|
flex-direction: column;
|
|
1253
1253
|
gap: var(--ac-global-dimension-size-200);
|
|
1254
|
-
`,children:t.map((r,o)=>e("li",{children:e(
|
|
1254
|
+
`,children:t.map((r,o)=>e("li",{children:e(bd,{annotation:r,spanNodeId:l.id})},`${o}_${r.name}`))})]})}function kd(n){const{spanNodeId:a,name:l,onDelete:t,onCreated:i}=n;return s(z,{variant:"compact",title:l,borderColor:"orange-900",extra:s(h,{direction:"row",alignItems:"center",gap:"size-100",children:[e(Et,{kind:"HUMAN"}),e(N,{variant:"default",size:"compact",isDisabled:!0,"aria-label":"delete annotation",icon:e(P,{svg:e(E.CloseOutline,{})}),onClick:t})]}),bodyStyle:{padding:0},children:[e(Y,{variant:"info",banner:!0,children:"Fill out the fields below and click save to create a new annotation."}),e(cd,{annotationName:l,spanNodeId:a,onCreated:i})]})}function bd(n){const{annotation:a,spanNodeId:l}=n,[t,i]=u.useState(null),r=ge(),[o,c]=T.useMutation(xt),d=u.useCallback(m=>{u.startTransition(()=>{o({variables:{annotationId:a.id,spanId:l,...m},onCompleted:()=>{r({title:"Annotation Updated",message:`Annotation ${a.name} has been updated.`})},onError:f=>{i(f)}})})},[a.id,a.name,o,r,l]);return s(z,{variant:"compact",title:a.name,titleExtra:a.label||typeof a.score=="number"&&_e(a.score)||null,collapsible:!0,bodyStyle:{padding:0},extra:s(h,{gap:"size-100",alignItems:"center",children:[e(Et,{kind:a.annotatorKind}),e(md,{annotationId:a.id,spanNodeId:l,annotationName:a.name,onSpanAnnotationActionSuccess:m=>{r(m)},onSpanAnnotationActionError:m=>{i(m)}})]}),children:[t&&e(Y,{variant:"danger",banner:!0,children:t.message}),e(_t,{initialData:a,isReadOnly:a.annotatorKind==="LLM",isSubmitting:c,onSubmit:m=>{d(m)}})]})}function Et(n){const{kind:a}=n;return e(Qn,{color:a==="HUMAN"?"blue-900":"orange-900",children:a})}function Sd(n){const{projectId:a,spanId:l,onAnnotationNameSelect:t}=n,i=T.useLazyLoadQuery(Kt,{projectId:a,spanId:l}),[r,o]=u.useState(""),c=u.useMemo(()=>{var f,g;return((g=(f=i==null?void 0:i.span)==null?void 0:f.spanAnnotations)==null?void 0:g.map(p=>p.name))||[]},[i.span.spanAnnotations]),d=u.useMemo(()=>(i.project.spanAnnotationNames||[]).filter(g=>!c.includes(g)),[i.project.spanAnnotationNames,c]),m=d.length>0;return s(H,{children:[e(x,{padding:"size-200",children:s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(le,{label:"Annotation Name",value:r,placeholder:"e.x. correctness",onChange:f=>{o(f)}}),e(N,{variant:"primary",onClick:()=>{t(r)},children:"Create"})]})}),m&&s(H,{children:[e(x,{borderTopWidth:"thin",borderBottomWidth:"thin",borderColor:"light",paddingStart:"size-200",paddingTop:"size-100",paddingBottom:"size-100",backgroundColor:"grey-300",children:e("label",{children:"select from existing"})}),e(Wn,{selectionMode:"single",onSelectionChange:f=>{if(f==="all"||f.size===0)return;const p=f.values().next().value;o(p||"")},disabledKeys:c,children:d.map(f=>e(J,{children:f},f))})]})]})}function vd(n){const{spanNodeId:a,projectId:l}=n,[t,i]=u.useState(null);return s(H,{children:[e(N,{variant:"default",icon:e(P,{svg:e(E.EditOutline,{})}),onClick:()=>i(e(gd,{spanNodeId:a,projectId:l})),children:"Annotate"}),e(U,{type:"slideOver",isDismissable:!0,onDismiss:()=>i(null),children:t})]})}const wt=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SpanAsideSpanQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"SpanAside_span"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SpanAsideSpanQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},l,{kind:"InlineFragment",selections:[{alias:"code",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:"endTime",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:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null}],storageKey:null}]},params:{cacheID:"878027b90513af8f947e6aa408450057",id:null,metadata:{},name:"SpanAsideSpanQuery",operationKind:"query",text:`query SpanAsideSpanQuery(
|
|
1255
1255
|
$id: GlobalID!
|
|
1256
1256
|
) {
|
|
1257
1257
|
node(id: $id) {
|
|
@@ -1278,22 +1278,22 @@ fragment SpanAside_span on Span {
|
|
|
1278
1278
|
score
|
|
1279
1279
|
}
|
|
1280
1280
|
}
|
|
1281
|
-
`}}}();wt.hash="cb5cab60889623d77ad0c96c98b3f8ac";const Rt=function(){var n={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:wt,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"SpanAside_span",selections:[n,{alias:"code",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:"endTime",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:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[n,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null}}();Rt.hash="cb5cab60889623d77ad0c96c98b3f8ac";const
|
|
1281
|
+
`}}}();wt.hash="cb5cab60889623d77ad0c96c98b3f8ac";const Rt=function(){var n={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:wt,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"SpanAside_span",selections:[n,{alias:"code",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:"endTime",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:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[n,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null}}();Rt.hash="cb5cab60889623d77ad0c96c98b3f8ac";const Cd=C`
|
|
1282
1282
|
display: flex;
|
|
1283
1283
|
padding-top: var(--ac-global-dimension-size-50);
|
|
1284
1284
|
flex-direction: column;
|
|
1285
1285
|
gap: var(--ac-global-dimension-size-100);
|
|
1286
1286
|
align-items: flex-start;
|
|
1287
|
-
`;function
|
|
1287
|
+
`;function Fd(n){const[a]=T.useRefetchableFragment(Rt,n.span),{startTime:l,endTime:t,code:i,tokenCountCompletion:r,tokenCountPrompt:o,tokenCountTotal:c}=a,d=u.useMemo(()=>new Date(l),[l]),m=u.useMemo(()=>t?new Date(t):null,[t]),f=u.useMemo(()=>m?m.getTime()-d.getTime():null,[m,d]),g=vl(i),p=a.spanAnnotations,y=p.length>0;return e(x,{padding:"size-200",borderColor:"dark",backgroundColor:"dark",borderLeftWidth:"thin",width:"230px",flex:"none",minHeight:"100%",children:s(h,{direction:"column",gap:"size-200",children:[e(bn,{label:"Status",children:s(h,{direction:"row",gap:"size-50",alignItems:"center",children:[e(sa,{statusCode:i}),e(F,{textSize:"xlarge",color:g,children:i})]})}),e(bn,{label:"Start Time",children:e(F,{textSize:"xlarge",children:Re(d)})}),m&&e(bn,{label:"End Time",children:e(F,{textSize:"xlarge",children:Re(m)})}),e(bn,{label:"Latency",children:e(F,{textSize:"xlarge",children:typeof f=="number"?e(xe,{latencyMs:f,textSize:"xlarge"}):"--"})}),c?e(bn,{label:"Total Tokens",children:e(Ra,{tokenCountTotal:c,tokenCountPrompt:o??0,tokenCountCompletion:r??0,textSize:"xlarge"})},"tokens"):null,y&&e(bn,{label:"Feedback",children:e("ul",{css:Cd,children:p.map(k=>e("li",{children:e(pn,{annotation:k,annotationDisplayPreference:"label"})},k.id))})})]})})}function bn({label:n,children:a}){return s(h,{direction:"column",children:[e(F,{elementType:"h3",textSize:"medium",color:"text-700",children:n}),a]})}function Kd(n){const{spanId:a,traceId:l}=n;return e("div",{css:C`
|
|
1288
1288
|
button.ac-dropdown-button {
|
|
1289
1289
|
min-width: 50px;
|
|
1290
1290
|
.ac-dropdown-button__text {
|
|
1291
1291
|
padding-right: 10px;
|
|
1292
1292
|
}
|
|
1293
1293
|
}
|
|
1294
|
-
`,children:s(yn,{placement:"bottom right",children:[e(Pl,{addonBefore:e(P,{svg:e(
|
|
1294
|
+
`,children:s(yn,{placement:"bottom right",children:[e(Pl,{addonBefore:e(P,{svg:e(E.Code,{})}),children:"Code"}),e($a,{children:e(x,{padding:"size-200",children:s(mn,{children:[s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(le,{label:"Span ID",isReadOnly:!0,value:a}),e(X,{text:a,size:"normal"})]}),s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(le,{label:"Trace ID",isReadOnly:!0,value:l}),e(X,{text:l,size:"normal"})]})]})})})]})})}const Pt={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"SpanFeedback_annotations",selections:[{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{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:"explanation",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null}],storageKey:null}],type:"Span",abstractKey:null};Pt.hash="6199ecd4f0143cffbaa2fe5e19a8739c";function xd(){const[n,a]=u.useState(null);return s(x,{padding:"size-200",children:[s(h,{direction:"column",gap:"size-100",alignItems:"center",children:[e(ua,{graphicKey:"documents"}),e(F,{children:"No annotations for this span"}),e(N,{variant:"default",size:"compact",onClick:()=>{a(e(j,{title:"Span Annotations",isDismissable:!0,children:s(x,{padding:"size-200",children:[e("p",{css:C`
|
|
1295
1295
|
margin: 0 0 var(--ac-global-dimension-size-100) 0;
|
|
1296
|
-
`,children:"Annotations are pivotal for tracking and improving the performance of your application. Phoenix allows for both LLM and HUMAN annotations."}),e(
|
|
1296
|
+
`,children:"Annotations are pivotal for tracking and improving the performance of your application. Phoenix allows for both LLM and HUMAN annotations."}),e(dn,{href:"https://docs.arize.com/phoenix/tracing/concepts-tracing/how-to-evaluate-traces",children:"View annotation documentation"})]})}))},icon:e(P,{svg:e(E.Edit2Outline,{})}),children:"How to Annotate"})]}),e(U,{onDismiss:()=>a(null),isDismissable:!0,children:n})]})}const Dd=[{header:"name",accessorKey:"name",size:100},{header:"label",accessorKey:"label",size:100},{header:"score",accessorKey:"score",size:100},{header:"explanation",accessorKey:"explanation",cell:gs,size:400}];function Za({annotations:n}){const a=u.useMemo(()=>[...n],[n]),l=ue({columns:Dd,data:a,getCoreRowModel:me()}),i=l.getRowModel().rows.length===0;return s("table",{css:He,children:[e("thead",{children:l.getHeaderGroups().map(r=>e("tr",{children:r.headers.map(o=>e("th",{colSpan:o.colSpan,children:o.isPlaceholder?null:e(H,{children:B(o.column.columnDef.header,o.getContext())})},o.id))},r.id))}),i?e(Ge,{}):e("tbody",{children:l.getRowModel().rows.map(r=>e("tr",{children:r.getVisibleCells().map(o=>e("td",{style:{width:o.column.getSize()},children:B(o.column.columnDef.cell,o.getContext())},o.id))},r.id))})]})}function Td({span:n}){const a=T.useFragment(Pt,n),l=u.useMemo(()=>a.spanAnnotations.filter(r=>r.annotatorKind==="HUMAN"),[a.spanAnnotations]),t=u.useMemo(()=>a.spanAnnotations.filter(r=>r.annotatorKind==="LLM"),[a.spanAnnotations]);return a.spanAnnotations.length>0?s(tn,{children:[e(ye,{id:"evaluations",title:"Evaluations",children:e(Za,{annotations:t})}),e(ye,{id:"human",title:"Human Annotations",children:e(Za,{annotations:l})})]}):e(xd,{})}function Id(n){return n==="__REDACTED__"}const Ld=C`
|
|
1297
1297
|
position: relative;
|
|
1298
1298
|
overflow: hidden;
|
|
1299
1299
|
width: 200px;
|
|
@@ -1332,7 +1332,7 @@ fragment SpanAside_span on Span {
|
|
|
1332
1332
|
object-fit: cover;
|
|
1333
1333
|
}
|
|
1334
1334
|
}
|
|
1335
|
-
`;function
|
|
1335
|
+
`;function _d(n){const[a,l]=u.useState(!1);let t;const i=Id(n.url);return i?t=e(Ad,{}):t=e("img",{src:n.url}),s("div",{className:Ar({"is-expanded":a}),css:Ld,children:[!i&&e(N,{variant:"default",size:"compact",onClick:()=>l(!a),icon:e(P,{svg:a?e(E.CollapseOutline,{}):e(E.ExpandOutline,{})}),"aria-label":"Expand / Collapse Image"}),t]})}const Ad=()=>s("svg",{width:"130",height:"130",viewBox:"0 0 130 130",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("rect",{x:"1.5",y:"1.5",width:"127",height:"127",rx:"6.5",strokeOpacity:"0.8",strokeWidth:"3"}),e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M40 27.5H90C96.8917 27.5 102.5 33.1083 102.5 40V90C102.5 96.8917 96.8917 102.5 90 102.5H40C33.1083 102.5 27.5 96.8917 27.5 90V40C27.5 33.1083 33.1083 27.5 40 27.5ZM40 35.8333H90C92.3 35.8333 94.1667 37.7 94.1667 40V74.85L80.8208 63.4667C76.6958 59.9583 70.2417 59.9583 66.1542 63.4417L35.8333 88.7417V40C35.8333 37.7 37.7 35.8333 40 35.8333ZM54.5833 50.4167C54.5833 53.8667 51.7833 56.6667 48.3333 56.6667C44.8833 56.6667 42.0833 53.8667 42.0833 50.4167C42.0833 46.9667 44.8833 44.1667 48.3333 44.1667C51.7833 44.1667 54.5833 46.9667 54.5833 50.4167ZM42.3375 94.1667H90C92.3 94.1667 94.1667 92.3 94.1667 90V85.8083L75.4125 69.8083C74.4083 68.9458 72.55 68.9417 71.525 69.8125L42.3375 94.1667Z",fill:"var(--ac-global-color-grey-300)"})]}),Mt=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,concreteType:"Dataset",kind:"LinkedField",name:"dataset",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SpanToDatasetExampleDialogAddExampleToDatasetMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SpanToDatasetExampleDialogAddExampleToDatasetMutation",selections:a},params:{cacheID:"d93c9d47668fc266ba09ecb14c2b72ae",id:null,metadata:{},name:"SpanToDatasetExampleDialogAddExampleToDatasetMutation",operationKind:"mutation",text:`mutation SpanToDatasetExampleDialogAddExampleToDatasetMutation(
|
|
1336
1336
|
$input: AddExamplesToDatasetInput!
|
|
1337
1337
|
) {
|
|
1338
1338
|
addExamplesToDataset(input: $input) {
|
|
@@ -1383,7 +1383,7 @@ fragment DatasetPicker__datasets on Query {
|
|
|
1383
1383
|
}
|
|
1384
1384
|
}
|
|
1385
1385
|
}
|
|
1386
|
-
`}};Vt.hash="03d88d1706089bb63edcd44d04563cbc";const $t={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:[],operation:Vt}},name:"DatasetPicker__datasets",selections:[{alias:null,args:null,concreteType:"DatasetConnection",kind:"LinkedField",name:"datasets",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"dataset",args:null,concreteType:"Dataset",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Query",abstractKey:null};$t.hash="03d88d1706089bb63edcd44d04563cbc";function
|
|
1386
|
+
`}};Vt.hash="03d88d1706089bb63edcd44d04563cbc";const $t={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:[],operation:Vt}},name:"DatasetPicker__datasets",selections:[{alias:null,args:null,concreteType:"DatasetConnection",kind:"LinkedField",name:"datasets",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"dataset",args:null,concreteType:"Dataset",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Query",abstractKey:null};$t.hash="03d88d1706089bb63edcd44d04563cbc";function Ed(n){const[a,l]=T.useRefetchableFragment($t,n.query);return s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(_l,{label:"dataset","data-testid":"dataset-picker",className:"dataset-picker",width:"100%","aria-label":"The dataset to add the example to",onSelectionChange:n.onSelectionChange,placeholder:"Select a dataset",onBlur:n.onBlur,isRequired:!0,validationState:n.validationState,errorMessage:n.errorMessage,children:a.datasets.edges.map(({dataset:t})=>e(J,{children:t.name},t.id))}),e(wd,{onDatasetCreated:()=>{u.startTransition(()=>{l({},{fetchPolicy:"store-and-network"})})}})]})}function wd({onDatasetCreated:n}){const[a,l]=u.useState(null),[t,i]=u.useState(!1),r=ge();return s(yn,{placement:"bottom right",isOpen:t,onOpenChange:o=>{l(null),i(o)},children:[e(N,{variant:"default",icon:e(P,{svg:e(E.PlusCircleOutline,{})}),"aria-label":"Create a new dataset"}),e(z,{title:"Create New Dataset",bodyStyle:{padding:0},variant:"compact",borderColor:"light",backgroundColor:"light",children:s(x,{width:"500px",children:[a?e(Y,{variant:"danger",children:a}):null,e(Pa,{onDatasetCreateError:o=>l(o.message),onDatasetCreated:({id:o,name:c})=>{l(null),i(!1),r({title:"Dataset Created",message:`Dataset "${c}" created successfully`}),n(o)}})]})})]})}const Sa={backgroundColor:"light",borderColor:"light",collapsible:!0,bodyStyle:{padding:0}};function Rd({spanId:n,onCompleted:a}){const[l,t]=u.useState(null),i=T.useLazyLoadQuery(Nt,{spanId:n},{fetchPolicy:"store-and-network"}),{span:{revision:r}}=i,[o,c]=T.useMutation(Mt),{control:d,setError:m,handleSubmit:f,formState:{isValid:g}}=qe({defaultValues:{input:JSON.stringify(r==null?void 0:r.input,null,2),output:JSON.stringify(r==null?void 0:r.output,null,2),metadata:JSON.stringify(r==null?void 0:r.metadata,null,2),datasetId:""}}),p=u.useCallback(y=>{if(t(null),!Ee(y==null?void 0:y.input))return m("input",{message:"Input must be a valid JSON object"});if(!Ee(y==null?void 0:y.output))return m("output",{message:"Output must be a valid JSON object"});if(!Ee(y==null?void 0:y.metadata))return m("metadata",{message:"Metadata must be a valid JSON object"});if(!(y!=null&&y.datasetId))return m("datasetId",{message:"Dataset is required"});o({variables:{input:{datasetId:y.datasetId,examples:[{input:JSON.parse(y.input),output:JSON.parse(y.output),metadata:JSON.parse(y.metadata),spanId:n}]}},onCompleted:()=>{a(y.datasetId)},onError:k=>{t(k.message)}})},[o,m,n,a]);return e(j,{size:"fullscreen",title:"Add Example to Dataset",extra:e(N,{variant:"primary",size:"compact",disabled:!g||c,loading:c,onClick:f(p),icon:e(P,{svg:e(E.PlusCircleOutline,{})}),children:"Add Example"}),children:e("div",{css:C`
|
|
1387
1387
|
overflow-y: auto;
|
|
1388
1388
|
padding: var(--ac-global-dimension-size-400);
|
|
1389
1389
|
/* Make widths configurable */
|
|
@@ -1394,7 +1394,7 @@ fragment DatasetPicker__datasets on Query {
|
|
|
1394
1394
|
width: 100%;
|
|
1395
1395
|
}
|
|
1396
1396
|
}
|
|
1397
|
-
`,children:e(h,{direction:"row",justifyContent:"center",children:e(x,{width:"900px",paddingStart:"auto",paddingEnd:"auto",children:s(h,{direction:"column",gap:"size-200",children:[l?e(Y,{variant:"danger",children:l}):null,e(
|
|
1397
|
+
`,children:e(h,{direction:"row",justifyContent:"center",children:e(x,{width:"900px",paddingStart:"auto",paddingEnd:"auto",children:s(h,{direction:"column",gap:"size-200",children:[l?e(Y,{variant:"danger",children:l}):null,e(G,{control:d,name:"datasetId",render:({field:{onChange:y,onBlur:k},fieldState:{invalid:v,error:b}})=>e(Ed,{onSelectionChange:y,onBlur:k,validationState:v?"invalid":"valid",errorMessage:b==null?void 0:b.message,query:i})}),e(G,{control:d,name:"input",render:({field:{onChange:y,onBlur:k,value:v},fieldState:{invalid:b,error:S}})=>s(z,{title:"Input",subTitle:"The input to the LLM, retriever, program, etc.",...Sa,children:[b?e(Y,{variant:"danger",banner:!0,children:S==null?void 0:S.message}):null,e(we,{value:v,onChange:y,onBlur:k})]})}),e(G,{control:d,name:"output",render:({field:{onChange:y,onBlur:k,value:v},fieldState:{invalid:b,error:S}})=>s(z,{title:"Output",subTitle:"The output of the LLM or program to be used as an expected output",...Sa,backgroundColor:"green-100",borderColor:"green-700",children:[b?e(Y,{variant:"danger",banner:!0,children:S==null?void 0:S.message}):null,e(we,{value:v,onChange:y,onBlur:k})]})}),e(G,{control:d,name:"metadata",render:({field:{onChange:y,onBlur:k,value:v},fieldState:{invalid:b,error:S}})=>s(z,{title:"Metadata",subTitle:"All data from the span to use during experimentation or evaluation",...Sa,children:[b?e(Y,{variant:"danger",banner:!0,children:S==null?void 0:S.message}):null,e(we,{value:v,onChange:y,onBlur:k})]})})]})})})})})}const Pd=n=>u.useMemo(()=>{try{return{json:JSON.parse(n)}}catch(a){return{json:null,parseError:a}}},[n]),Md=n=>n.events.some(a=>a.name==="exception"),ee={backgroundColor:"light",borderColor:"light",variant:"compact",collapsible:!0};function Nd({spanNodeId:n,projectId:a}){const{span:l}=T.useLazyLoadQuery(Ft,{spanId:n});if(l.__typename!=="Span")throw new Error("Expected a span, but got a different type"+l.__typename);const t=u.useMemo(()=>Md(l),[l]),i=un(o=>o.showSpanAside),r=un(o=>o.setShowSpanAside);return s(h,{direction:"column",flex:"1 1 auto",height:"100%",children:[e(x,{paddingTop:"size-100",paddingBottom:"size-100",paddingStart:"size-150",paddingEnd:"size-200",flex:"none",children:s(h,{direction:"row",gap:"size-200",alignItems:"center",children:[s(h,{direction:"row",gap:"size-100",width:"100%",height:"100%",alignItems:"center",children:[e(Ma,{spanKind:l.spanKind}),e(F,{children:l.name})]}),s(h,{flex:"none",direction:"row",alignItems:"center",gap:"size-100",children:[e(Kd,{traceId:l.context.traceId,spanId:l.context.spanId}),e(zd,{span:l}),e(vd,{spanNodeId:l.id,projectId:a}),s(Fe,{placement:"top",offset:5,children:[e(N,{variant:"default","aria-label":"Toggle showing span details",onClick:()=>{r(!i)},icon:e(P,{svg:i?e(E.SlideIn,{}):e(E.SlideOut,{})})}),e(On,{children:i?"Hide Span Details":"Show Span Details"})]})]})]})}),s(ke,{children:[e(q,{name:"Info",children:s(h,{direction:"row",height:"100%",children:[e($d,{children:e(Cl,{children:e(Qd,{span:l})})}),i?e(Fd,{span:l}):null]})}),e(q,{name:"Feedback",extra:e(Me,{variant:"light",children:l.spanAnnotations.length}),children:o=>o?e(Td,{span:l}):null}),e(q,{name:"Attributes",title:"Attributes",children:e(x,{padding:"size-200",children:e(z,{title:"All Attributes",...ee,titleExtra:Ot,extra:e(X,{text:l.attributes}),bodyStyle:{padding:0},children:e(Qe,{children:l.attributes})})})}),e(q,{name:"Events",extra:e(Me,{variant:t?"danger":"light",children:l.events.length}),children:e(tc,{events:l.events})})]})]})}const Vd=C`
|
|
1398
1398
|
flex: 1 1 auto;
|
|
1399
1399
|
overflow-y: auto;
|
|
1400
1400
|
// Overflow fails to take into account padding
|
|
@@ -1403,11 +1403,11 @@ fragment DatasetPicker__datasets on Query {
|
|
|
1403
1403
|
display: block;
|
|
1404
1404
|
height: var(--ac-global-dimension-static-size-400);
|
|
1405
1405
|
}
|
|
1406
|
-
`;function
|
|
1406
|
+
`;function $d({children:n}){return e("div",{css:Vd,"data-testid":"span-info-wrap",children:n})}function zd({span:n}){const[a,l]=u.useState(null),t=ge(),i=ae(),r=u.useCallback(()=>{l(e(Rd,{spanId:n.id,onCompleted:o=>{l(null),t({title:"Span Added to Dataset",message:"Successfully added span to dataset",action:{text:"View Dataset",onClick:()=>{i(`/datasets/${o}/examples`)}}})}}))},[n.id,t,i]);return s(H,{children:[e(N,{variant:"default",icon:e(P,{svg:e(E.DatabaseOutline,{})}),onClick:r,children:"Add to Dataset"}),e(u.Suspense,{children:e(U,{type:"slideOver",isDismissable:!0,onDismiss:()=>l(null),children:a})})]})}function Qd({span:n}){const{spanKind:a,attributes:l}=n,{json:t,parseError:i}=Pd(l),r=u.useMemo(()=>n.statusMessage?e(Y,{variant:"danger",title:"Status Description",children:n.statusMessage}):null,[n]);if(i||!t)return e(x,{padding:"size-200",children:s(h,{direction:"column",gap:"size-200",children:[r,e(Y,{variant:"warning",title:"Un-parsable attributes",children:`Failed to parse span attributes. ${i instanceof Error?i.message:""}`}),e(z,{...ee,title:"Attributes",children:e(x,{padding:"size-100",children:l})})]})});let o;switch(a){case"llm":{o=e(Od,{span:n,spanAttributes:t});break}case"retriever":{o=e(jd,{span:n,spanAttributes:t});break}case"reranker":{o=e(qd,{span:n,spanAttributes:t});break}case"embedding":{o=e(Bd,{span:n,spanAttributes:t});break}case"tool":{o=e(Hd,{span:n,spanAttributes:t});break}default:o=e(zt,{span:n})}return e(x,{padding:"size-200",children:s(h,{direction:"column",gap:"size-200",children:[r,o,t!=null&&t.metadata?e(z,{...ee,title:"Metadata",children:e(Qe,{children:JSON.stringify(t.metadata)})}):null]})})}function Od(n){const{spanAttributes:a,span:l}=n,{input:t,output:i}=l,r=u.useMemo(()=>a[pe.llm]||null,[a]),o=u.useMemo(()=>{if(r==null)return null;const R=r[en.model_name];return typeof R=="string"?R:null},[r]),c=u.useMemo(()=>{var R;return r==null?[]:((R=r[en.input_messages])==null?void 0:R.map(w=>w[pe.message]).filter(Boolean))||[]},[r]),d=u.useMemo(()=>{if(r==null)return[];const R=r[en.tools];return Array.isArray(R)?R==null?void 0:R.map(O=>O[pe.tool]).filter(Boolean):[]},[r]),m=u.useMemo(()=>d.reduce((R,w)=>(w!=null&&w.json_schema&&R.push(w.json_schema),R),[]),[d]),f=u.useMemo(()=>{var R;return r==null?[]:((R=r[en.output_messages])==null?void 0:R.map(w=>w[pe.message]).filter(Boolean))||[]},[r]),g=u.useMemo(()=>{if(r==null)return[];const R=r[en.prompts];return ps(R)?R:[]},[r]),p=u.useMemo(()=>{if(r==null)return null;const R=r[en.prompt_template];return R??null},[r]),y=u.useMemo(()=>r==null?"{}":r[en.invocation_parameters]||"{}",[r]),k=u.useMemo(()=>o==null?null:s(h,{direction:"row",gap:"size-100",alignItems:"center",children:[e(Fl,{spanKind:"llm"}),e(F,{textSize:"large",weight:"heavy",children:o})]}),[o]),v=t!=null&&t.value!=null,b=c.length>0,S=m.length>0,L=i!=null&&i.value!=null,I=f.length>0,A=g.length>0,K=Object.keys(JSON.parse(y)).length>0,D=p!=null;return s(h,{direction:"column",gap:"size-200",children:[e(z,{collapsible:!0,backgroundColor:"light",borderColor:"light",bodyStyle:{padding:0},titleSeparator:!1,variant:"compact",title:k,children:s(ke,{children:[b?e(q,{name:"Input Messages",hidden:!b,children:e(Xa,{messages:c})}):null,S?e(q,{name:"Tools",hidden:!S,children:e(Jd,{toolSchemas:m})}):null,v?e(q,{name:"Input",hidden:!v,children:e(x,{padding:"size-200",children:e(Se,{children:e(z,{...ee,title:"LLM Input",extra:s(h,{direction:"row",gap:"size-100",children:[e(Pe,{}),e(X,{text:t.value})]}),children:e(Ne,{...t})})})})}):null,D?e(q,{name:"Prompt Template",hidden:!D,children:e(x,{padding:"size-200",children:s(h,{direction:"column",gap:"size-100",children:[e(x,{borderRadius:"medium",borderColor:"light",backgroundColor:"light",borderWidth:"thin",padding:"size-200",children:s(la,{text:p.template,children:[e(F,{color:"text-700",fontStyle:"italic",children:"prompt template"}),e(Qt,{children:p.template})]})}),e(x,{borderRadius:"medium",borderColor:"light",backgroundColor:"light",borderWidth:"thin",padding:"size-200",children:s(la,{text:JSON.stringify(p.variables),children:[e(F,{color:"text-700",fontStyle:"italic",children:"template variables"}),e(Qe,{children:JSON.stringify(p.variables)})]})})]})})}):null,e(q,{name:"Prompts",hidden:!A,children:e(Zd,{prompts:g})}),e(q,{name:"Invocation Params",hidden:!K,children:e(la,{text:y,padding:"size-100",children:e(Qe,{children:y})})})]})}),L||I?e(Va,{...ee,children:s(ke,{children:[I?e(q,{name:"Output Messages",hidden:!I,children:e(Xa,{messages:f})}):null,L?e(q,{name:"Output",hidden:!L,children:e(x,{padding:"size-200",children:e(Se,{children:e(z,{...ee,title:"LLM Output",extra:s(h,{direction:"row",gap:"size-100",children:[e(Pe,{}),e(X,{text:i.value})]}),children:e(Ne,{...i})})})})}):null]})}):null]})}function jd(n){const{spanAttributes:a,span:l}=n,{input:t}=l,i=u.useMemo(()=>a[pe.retrieval]||null,[a]),r=u.useMemo(()=>{var f;return i==null?[]:((f=i[Er.documents])==null?void 0:f.map(g=>g[pe.document]).filter(Boolean))||[]},[i]),o=u.useMemo(()=>l.documentEvaluations.reduce((g,p)=>{const y=p.documentPosition,k=g[y]||[];return{...g,[y]:[...k,p]}},{}),[l.documentEvaluations]),c=t!=null&&t.value!=null,d=r.length>0,m=l.documentRetrievalMetrics.length>0;return s(h,{direction:"column",gap:"size-200",children:[c?e(Se,{children:e(z,{title:"Input",...ee,extra:s(h,{direction:"row",gap:"size-100",children:[e(Pe,{}),e(X,{text:t.value})]}),children:e(Ne,{...t})})}):null,d?e(Se,{children:e(z,{title:"Documents",...ee,titleExtra:m&&e(h,{direction:"row",alignItems:"center",gap:"size-100",children:l.documentRetrievalMetrics.map(f=>s(H,{children:[e(he,{name:f.evaluationName,metric:"ndcg",score:f.ndcg},"ndcg"),e(he,{name:f.evaluationName,metric:"precision",score:f.precision},"precision"),e(he,{name:f.evaluationName,metric:"hit",score:f.hit},"hit")]}))}),extra:e(Pe,{}),children:e("ul",{css:C`
|
|
1407
1407
|
display: flex;
|
|
1408
1408
|
flex-direction: column;
|
|
1409
1409
|
gap: var(--ac-global-dimension-static-size-200);
|
|
1410
|
-
`,children:r.map((
|
|
1410
|
+
`,children:r.map((f,g)=>e("li",{children:e(La,{document:f,documentEvaluations:o[g],borderColor:"seafoam-700",backgroundColor:"seafoam-100",labelColor:"seafoam-1000"})},g))})})}):null]})}function qd(n){const{spanAttributes:a}=n,l=u.useMemo(()=>a[pe.reranker]||null,[a]),t=u.useMemo(()=>l==null?null:l[ya.query]||null,[l]),i=u.useMemo(()=>{var d;return l==null?[]:((d=l[ya.input_documents])==null?void 0:d.map(m=>m[pe.document]).filter(Boolean))||[]},[l]),r=u.useMemo(()=>{var d;return l==null?[]:((d=l[ya.output_documents])==null?void 0:d.map(m=>m[pe.document]).filter(Boolean))||[]},[l]),o=i.length,c=r.length;return s(h,{direction:"column",gap:"size-200",children:[e(Se,{children:t&&e(z,{title:"Query",...ee,children:e(Gn,{children:t})})}),e(z,{title:"Input Documents",titleExtra:e(Me,{variant:"light",children:o}),...ee,defaultOpen:!1,bodyStyle:{padding:0},children:e("ul",{css:C`
|
|
1411
1411
|
padding: var(--ac-global-dimension-static-size-200);
|
|
1412
1412
|
display: flex;
|
|
1413
1413
|
flex-direction: column;
|
|
@@ -1417,48 +1417,48 @@ fragment DatasetPicker__datasets on Query {
|
|
|
1417
1417
|
display: flex;
|
|
1418
1418
|
flex-direction: column;
|
|
1419
1419
|
gap: var(--ac-global-dimension-static-size-200);
|
|
1420
|
-
`,children:r.map((d,m)=>e("li",{children:e(La,{document:d,borderColor:"celery-700",backgroundColor:"celery-100",labelColor:"celery-1000"})},m))})})]})}function
|
|
1420
|
+
`,children:r.map((d,m)=>e("li",{children:e(La,{document:d,borderColor:"celery-700",backgroundColor:"celery-100",labelColor:"celery-1000"})},m))})})]})}function Bd(n){const{spanAttributes:a}=n,l=u.useMemo(()=>a[pe.embedding]||null,[a]),t=u.useMemo(()=>{var o;return l==null?[]:((o=l[fa.embeddings])==null?void 0:o.map(c=>c[pe.embedding]).filter(Boolean))||[]},[l]),i=t.length>0,r=l==null?void 0:l[fa.model_name];return e(h,{direction:"column",gap:"size-200",children:i?e(z,{title:"Embeddings"+(typeof r=="string"?`: ${r}`:""),...ee,children:e("ul",{css:C`
|
|
1421
1421
|
display: flex;
|
|
1422
1422
|
flex-direction: column;
|
|
1423
1423
|
gap: var(--ac-global-dimension-static-size-200);
|
|
1424
|
-
`,children:t.map((o,c)=>e("li",{children:e(Se,{children:e(z,{...ee,backgroundColor:"purple-100",borderColor:"purple-700",title:"Embedded Text",children:e(Gn,{children:o[fa.text]||""})})})},c))})}):e(zt,{span:n.span})})}function
|
|
1424
|
+
`,children:t.map((o,c)=>e("li",{children:e(Se,{children:e(z,{...ee,backgroundColor:"purple-100",borderColor:"purple-700",title:"Embedded Text",children:e(Gn,{children:o[fa.text]||""})})})},c))})}):e(zt,{span:n.span})})}function Hd(n){const{span:a,spanAttributes:l}=n,{input:t,output:i}=a,r=typeof(t==null?void 0:t.value)=="string",o=typeof(i==null?void 0:i.value)=="string",c=(t==null?void 0:t.mimeType)==="text",d=(i==null?void 0:i.mimeType)==="text",m=u.useMemo(()=>l[pe.tool]||{},[l]),f=Object.keys(m).length>0,g=m[ha.name],p=m[ha.description],y=m[ha.parameters];return!r&&!o&&!f?null:s(h,{direction:"column",gap:"size-200",children:[r?e(Se,{children:e(z,{title:"Input",...ee,extra:s(h,{direction:"row",gap:"size-100",children:[c?e(Pe,{}):null,e(X,{text:t.value})]}),children:e(Ne,{...t})})}):null,o?e(Se,{children:e(z,{title:"Output",...ee,backgroundColor:"green-100",borderColor:"green-700",extra:s(h,{direction:"row",gap:"size-100",children:[d?e(Pe,{}):null,e(X,{text:i.value})]}),children:e(Ne,{...i})})}):null,f?e(z,{title:"Tool"+(typeof g=="string"?`: ${g}`:""),...ee,children:s(h,{direction:"column",children:[p!=null?e(x,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderBottomColor:"dark",borderBottomWidth:"thin",backgroundColor:"light",children:s(h,{direction:"column",alignItems:"start",gap:"size-50",children:[e(F,{color:"text-700",fontStyle:"italic",children:"Description"}),e(F,{children:p})]})}):null,y!=null?e(x,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderBottomColor:"dark",borderBottomWidth:"thin",children:s(h,{direction:"column",alignItems:"start",width:"100%",children:[e(F,{color:"text-700",fontStyle:"italic",children:"Parameters"}),e(Qe,{children:JSON.stringify(y)})]})}):null]})}):null]})}const Gd=["irrelevant","unrelated"];function La({document:n,documentEvaluations:a,backgroundColor:l,borderColor:t,labelColor:i}){const r=n[Nn.metadata],o=a&&a.length,c=n[Nn.content];return e(z,{...ee,backgroundColor:l,borderColor:t,bodyStyle:{padding:0},title:s(h,{direction:"row",gap:"size-50",alignItems:"center",children:[e(P,{svg:e(E.FileOutline,{})}),s(te,{level:4,children:["document ",n[Nn.id]]})]}),extra:typeof n[Nn.score]=="number"&&e(Qn,{color:i,children:`score ${Ea(n[Nn.score])}`}),children:s(h,{direction:"column",children:[c&&e(x,{padding:"size-200",children:e(Gn,{children:c})}),r&&e(H,{children:e(x,{borderColor:t,borderTopWidth:"thin",children:e(Qe,{children:JSON.stringify(r)})})}),o&&e(x,{borderColor:t,borderTopWidth:"thin",padding:"size-200",children:s(h,{direction:"column",gap:"size-100",children:[e(te,{level:3,weight:"heavy",children:"Evaluations"}),e("ul",{children:a.map((d,m)=>{const f=d.label&&Gd.includes(d.label)?"danger":i;return e("li",{children:e(x,{padding:"size-200",borderWidth:"thin",borderColor:t,borderRadius:"medium",children:s(h,{direction:"column",gap:"size-50",children:[s(h,{direction:"row",gap:"size-100",children:[e(F,{weight:"heavy",elementType:"h5",children:d.name}),d.label&&e(Qn,{color:f,shape:"badge",children:d.label}),typeof d.score=="number"&&e(Qn,{color:f,shape:"badge",children:s(h,{direction:"row",gap:"size-50",children:[e(F,{textSize:"xsmall",weight:"heavy",color:"inherit",children:"score"}),e(F,{textSize:"xsmall",children:_e(d.score)})]})})]}),typeof d.explanation&&e("p",{css:C`
|
|
1425
1425
|
margin-top: var(
|
|
1426
1426
|
--ac-global-dimension-static-size-100
|
|
1427
1427
|
);
|
|
1428
1428
|
margin-bottom: 0;
|
|
1429
|
-
`,children:d.explanation})]})})},m)})})]})})]})})}function
|
|
1429
|
+
`,children:d.explanation})]})})},m)})})]})})]})})}function Ud({message:n}){var c;const a=n[Ce.content],l=n[Ce.contents],t=((c=n[Ce.tool_calls])==null?void 0:c.map(d=>d[pe.tool_call]).filter(Boolean))||[],i=n[Ce.function_call_arguments_json]&&n[Ce.function_call_name],r=n[Ce.role]||"unknown",o=u.useMemo(()=>r==="user"?{backgroundColor:"grey-100",borderColor:"grey-500"}:r==="assistant"?{backgroundColor:"blue-100",borderColor:"blue-700"}:r==="system"?{backgroundColor:"indigo-100",borderColor:"indigo-700"}:["function","tool"].includes(r)?{backgroundColor:"yellow-100",borderColor:"yellow-700"}:{backgroundColor:"grey-100",borderColor:"grey-700"},[r]);return e(Se,{children:s(z,{...ee,...o,title:r+(n[Ce.name]?`: ${n[Ce.name]}`:""),extra:s(h,{direction:"row",gap:"size-100",children:[e(Pe,{}),e(X,{text:a||JSON.stringify(n)})]}),children:[e(Cl,{children:l?e(Yd,{messageContents:l}):null}),s(h,{direction:"column",alignItems:"start",children:[a?e(Gn,{children:a}):null,t.length>0?t.map((d,m)=>{var f,g;return s("pre",{css:C`
|
|
1430
1430
|
text-wrap: wrap;
|
|
1431
1431
|
margin: var(--ac-global-dimension-static-size-100) 0;
|
|
1432
|
-
`,children:[(
|
|
1432
|
+
`,children:[(f=d==null?void 0:d.function)==null?void 0:f.name,"(",JSON.stringify(JSON.parse((g=d==null?void 0:d.function)==null?void 0:g.arguments),null,2),")"]},m)}):null,i?s("pre",{css:C`
|
|
1433
1433
|
text-wrap: wrap;
|
|
1434
1434
|
margin: var(--ac-global-dimension-static-size-100) 0;
|
|
1435
|
-
`,children:[n[
|
|
1435
|
+
`,children:[n[Ce.function_call_name],"(",JSON.stringify(JSON.parse(n[Ce.function_call_arguments_json]),null,2),")"]}):null]})]})})}function Wd({toolSchema:n,index:a}){return e(z,{title:s(h,{direction:"row",gap:"size-100",alignItems:"center",children:[e(Fl,{spanKind:"tool"}),e(F,{textSize:"large",weight:"heavy",children:"Tool"})]}),titleExtra:s(Me,{variant:"light",children:["#",a+1]}),...ee,backgroundColor:"yellow-100",borderColor:"yellow-700",bodyStyle:{padding:0},extra:e(X,{text:n}),children:e(Ne,{value:n,mimeType:"json"})})}function Xa({messages:n}){return e("ul",{css:C`
|
|
1436
1436
|
display: flex;
|
|
1437
1437
|
flex-direction: column;
|
|
1438
1438
|
gap: var(--ac-global-dimension-static-size-100);
|
|
1439
1439
|
padding: var(--ac-global-dimension-static-size-200);
|
|
1440
|
-
`,children:n.map((a,l)=>e("li",{children:e(
|
|
1440
|
+
`,children:n.map((a,l)=>e("li",{children:e(Ud,{message:a})},l))})}function Jd({toolSchemas:n}){return e("ul",{css:C`
|
|
1441
1441
|
display: flex;
|
|
1442
1442
|
flex-direction: column;
|
|
1443
1443
|
gap: var(--ac-global-dimension-static-size-100);
|
|
1444
1444
|
padding: var(--ac-global-dimension-static-size-200);
|
|
1445
|
-
`,children:n.map((a,l)=>e("li",{children:e(
|
|
1445
|
+
`,children:n.map((a,l)=>e("li",{children:e(Wd,{toolSchema:a,index:l})},l))})}function Zd({prompts:n}){return e("ul",{"data-testid":"llm-prompts-list",css:C`
|
|
1446
1446
|
padding: var(--ac-global-dimension-size-200);
|
|
1447
1447
|
display: flex;
|
|
1448
1448
|
flex-direction: column;
|
|
1449
1449
|
gap: var(--ac-global-dimension-size-100);
|
|
1450
|
-
`,children:n.map((a,l)=>e("li",{children:e(x,{backgroundColor:"gray-600",borderColor:"gray-400",borderWidth:"thin",borderRadius:"medium",padding:"size-100",children:e(la,{text:a,children:e(Ne,{value:a,mimeType:"text"})})})},l))})}const
|
|
1450
|
+
`,children:n.map((a,l)=>e("li",{children:e(x,{backgroundColor:"gray-600",borderColor:"gray-400",borderWidth:"thin",borderRadius:"medium",padding:"size-100",children:e(la,{text:a,children:e(Ne,{value:a,mimeType:"text"})})})},l))})}const Xd=C`
|
|
1451
1451
|
display: flex;
|
|
1452
1452
|
flex-direction: row;
|
|
1453
1453
|
gap: var(--ac-global-dimension-size-200);
|
|
1454
1454
|
flex-wrap: wrap;
|
|
1455
|
-
`;function
|
|
1455
|
+
`;function Yd({messageContents:n}){return e("ul",{css:Xd,"data-testid":"message-content-list",children:n.map((a,l)=>e(nc,{messageContentAttribute:a},l))})}const ec=C`
|
|
1456
1456
|
flex: 1 1 100%;
|
|
1457
|
-
`;function
|
|
1457
|
+
`;function nc({messageContentAttribute:n}){var r;const{message_content:a}=n,l=a==null?void 0:a.text,t=a==null?void 0:a.image,i=(r=t==null?void 0:t.image)==null?void 0:r.url;return s("li",{css:l?ec:null,children:[l?e("pre",{css:C`
|
|
1458
1458
|
white-space: pre-wrap;
|
|
1459
1459
|
padding: 0;
|
|
1460
1460
|
margin: 0;
|
|
1461
|
-
`,children:l}):null,i?e(
|
|
1461
|
+
`,children:l}):null,i?e(_d,{url:i}):null]})}function zt({span:n}){const{input:a,output:l}=n,t=a==null&&l==null,i=(a==null?void 0:a.mimeType)==="text",r=(l==null?void 0:l.mimeType)==="text";return s(h,{direction:"column",gap:"size-200",children:[a&&a.value!=null?e(Se,{children:e(z,{title:"Input",...ee,extra:s(h,{direction:"row",gap:"size-100",children:[i?e(Pe,{}):null,e(X,{text:a.value})]}),children:e(Ne,{...a})})}):null,l&&l.value!=null?e(Se,{children:e(z,{title:"Output",...ee,backgroundColor:"green-100",borderColor:"green-700",extra:s(h,{direction:"row",gap:"size-100",children:[r?e(Pe,{}):null,e(X,{text:l.value})]}),children:e(Ne,{...l})})}):null,t?e(z,{title:"All Attributes",titleExtra:Ot,...ee,bodyStyle:{padding:0},extra:e(X,{text:n.attributes}),children:e(Qe,{children:n.attributes})}):null]})}const ac=C`
|
|
1462
1462
|
.cm-content {
|
|
1463
1463
|
padding: var(--ac-global-dimension-static-size-200) 0;
|
|
1464
1464
|
}
|
|
@@ -1479,10 +1479,10 @@ fragment DatasetPicker__datasets on Query {
|
|
|
1479
1479
|
&:hover .copy-to-clipboard-button {
|
|
1480
1480
|
opacity: 1;
|
|
1481
1481
|
}
|
|
1482
|
-
`,children:[e(X,{text:n}),a]})}function Qe({children:n}){const{theme:a}=Hn(),l=a==="light"?void 0:pa,{value:t,mimeType:i}=u.useMemo(()=>{try{return{value:JSON.stringify(JSON.parse(n),null,2),mimeType:"json"}}catch{return{value:n,mimeType:"text"}}},[n]);return i==="json"?e(ga,{value:t,basicSetup:{lineNumbers:!0,foldGutter:!0,bracketMatching:!0,syntaxHighlighting:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1},extensions:[
|
|
1482
|
+
`,children:[e(X,{text:n}),a]})}function Qe({children:n}){const{theme:a}=Hn(),l=a==="light"?void 0:pa,{value:t,mimeType:i}=u.useMemo(()=>{try{return{value:JSON.stringify(JSON.parse(n),null,2),mimeType:"json"}}catch{return{value:n,mimeType:"text"}}},[n]);return i==="json"?e(ga,{value:t,basicSetup:{lineNumbers:!0,foldGutter:!0,bracketMatching:!0,syntaxHighlighting:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1},extensions:[qs(),Bs.lineWrapping],editable:!1,theme:l,css:ac}):e(Qt,{children:t})}function Qt({children:n}){return e("pre",{css:C`
|
|
1483
1483
|
white-space: pre-wrap;
|
|
1484
1484
|
padding: 0;
|
|
1485
|
-
`,children:n})}function Ne({value:n,mimeType:a}){let l;switch(a){case"json":l=e(Qe,{children:n});break;case"text":l=e(Gn,{children:n});break;default:
|
|
1485
|
+
`,children:n})}function Ne({value:n,mimeType:a}){let l;switch(a){case"json":l=e(Qe,{children:n});break;case"text":l=e(Gn,{children:n});break;default:be()}return l}function lc({text:n}){return s(h,{direction:"column",alignItems:"center",flex:"1 1 auto",height:"size-2400",justifyContent:"center",gap:"size-100",children:[e(ua,{graphicKey:"documents"}),e(F,{children:n})]})}function tc({events:n}){return n.length===0?e(lc,{text:"No events"}):e(Rl,{children:n.map((a,l)=>{const t=a.name==="exception";return e(wl,{children:s(h,{direction:"row",alignItems:"center",gap:"size-100",children:[e(x,{flex:"none",children:e("div",{"data-event-type":t?"exception":"info",css:i=>C`
|
|
1486
1486
|
&[data-event-type="exception"] {
|
|
1487
1487
|
--px-event-icon-color: ${i.colors.statusDanger};
|
|
1488
1488
|
}
|
|
@@ -1492,15 +1492,15 @@ fragment DatasetPicker__datasets on Query {
|
|
|
1492
1492
|
.ac-icon-wrap {
|
|
1493
1493
|
color: var(--px-event-icon-color);
|
|
1494
1494
|
}
|
|
1495
|
-
`,children:e(P,{svg:t?e(
|
|
1495
|
+
`,children:e(P,{svg:t?e(E.AlertTriangleOutline,{}):e(E.InfoOutline,{})})})}),s(h,{direction:"column",gap:"size-25",flex:"1 1 auto",children:[e(F,{weight:"heavy",children:a.name}),e(F,{color:"text-700",children:a.message})]}),e(x,{children:e(F,{color:"text-700",children:new Date(a.timestamp).toLocaleString()})})]})},l)})})}const Ot=e(h,{alignItems:"center",justifyContent:"center",children:e(x,{marginStart:"size-100",children:s(Pn,{children:[e(te,{weight:"heavy",level:4,children:"Span Attributes"}),e(Rn,{children:e(F,{children:"Attributes are key-value pairs that represent metadata associated with a span. For detailed descriptions of specific attributes, consult the semantic conventions section of the OpenInference tracing specification."})}),e("footer",{children:e(dn,{href:"https://github.com/Arize-ai/openinference/blob/main/spec/semantic_conventions.md",children:"Semantic Conventions"})})]})})}),Ya="selectedSpanNodeId";function ic(n){const a=n.find(i=>i.parentId==null);if(a)return a;const l=new Set(n.map(i=>i.context.spanId)),t=n.filter(i=>i.parentId!=null&&!l.has(i.parentId));return t.length===1?t[0]:null}function jt(n){const{traceId:a,projectId:l}=n,[t,i]=ol(),r=T.useLazyLoadQuery(Ct,{traceId:a,id:l},{fetchPolicy:"store-and-network"}),o=u.useMemo(()=>{var g;return(((g=r.project.trace)==null?void 0:g.spans.edges)||[]).map(p=>p.span)},[r]),d=t.get(Ya)??o[0].id,m=u.useMemo(()=>ic(o),[o]);return u.useEffect(()=>()=>{i(f=>(f.delete("spanNodeId"),f),{replace:!0})},[]),s("main",{css:C`
|
|
1496
1496
|
flex: 1 1 auto;
|
|
1497
1497
|
overflow: hidden;
|
|
1498
1498
|
display: flex;
|
|
1499
1499
|
flex-direction: column;
|
|
1500
|
-
`,children:[e(
|
|
1500
|
+
`,children:[e(rc,{rootSpan:m}),s(sn,{direction:"horizontal",autoSaveId:"trace-panel-group",css:C`
|
|
1501
1501
|
flex: 1 1 auto;
|
|
1502
1502
|
overflow: hidden;
|
|
1503
|
-
`,children:[e(ce,{defaultSize:30,minSize:10,maxSize:70,children:e(
|
|
1503
|
+
`,children:[e(ce,{defaultSize:30,minSize:10,maxSize:70,children:e(oc,{children:e(ys,{spans:o,selectedSpanNodeId:d,onSpanClick:f=>{i(g=>(g.set(Ya,f.id),g),{replace:!0})}})})}),e(on,{css:_n}),e(ce,{children:e(sc,{children:d?e(u.Suspense,{fallback:e(se,{}),children:e(Nd,{spanNodeId:d,projectId:l})}):null})})]})]})}function rc({rootSpan:n}){const{latencyMs:a,statusCode:l,spanAnnotations:t}=n??{latencyMs:null,statusCode:"UNSET",spanAnnotations:[]},i=t.length>0,r=vl(l);return e(x,{padding:"size-200",borderBottomWidth:"thin",borderBottomColor:"dark",children:s(h,{direction:"row",gap:"size-400",children:[s(h,{direction:"column",children:[e(F,{elementType:"h3",textSize:"medium",color:"text-700",children:"Trace Status"}),e(F,{textSize:"xlarge",children:s(h,{direction:"row",gap:"size-50",alignItems:"center",children:[e(sa,{statusCode:l}),e(F,{textSize:"xlarge",color:r,children:l})]})})]}),s(h,{direction:"column",children:[e(F,{elementType:"h3",textSize:"medium",color:"text-700",children:"Latency"}),e(F,{textSize:"xlarge",children:typeof a=="number"?e(xe,{latencyMs:a,textSize:"xlarge"}):"--"})]}),i?s(h,{direction:"column",gap:"size-50",children:[e(F,{elementType:"h3",textSize:"medium",color:"text-700",children:"Feedback"}),e(h,{direction:"row",gap:"size-50",children:t.map(o=>e(Un,{annotation:o,children:e(pn,{annotation:o,annotationDisplayPreference:"label"})},o.name))})]}):null]})})}function sc({children:n}){return e("div",{"data-testid":"scrolling-tabs-wrapper",css:C`
|
|
1504
1504
|
height: 100%;
|
|
1505
1505
|
overflow: hidden;
|
|
1506
1506
|
.ac-tabs {
|
|
@@ -1520,10 +1520,10 @@ fragment DatasetPicker__datasets on Query {
|
|
|
1520
1520
|
}
|
|
1521
1521
|
}
|
|
1522
1522
|
}
|
|
1523
|
-
`,children:n})}function
|
|
1523
|
+
`,children:n})}function oc({children:n}){return e("div",{"data-testid":"scrolling-panel-content",css:C`
|
|
1524
1524
|
height: 100%;
|
|
1525
1525
|
overflow-y: auto;
|
|
1526
|
-
`,children:n})}function
|
|
1526
|
+
`,children:n})}function Im(){const{traceId:n,projectId:a}=je(),l=ae();return e(U,{type:"slideOver",isDismissable:!0,onDismiss:()=>l(`/projects/${a}`),children:e(j,{size:"fullscreen",title:"Trace Details",children:e(jt,{traceId:n,projectId:a})})})}const qt=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},r={kind:"Variable",name:"timeRange",variableName:"timeRange"},o=[{kind:"Literal",name:"first",value:50},{kind:"Literal",name:"rootSpansOnly",value:!0},{kind:"Literal",name:"sort",value:{col:"startTime",dir:"desc"}},r],c={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},d={alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},m={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},f={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},g={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},p=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}],y={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},k={alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[i,{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},v={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},b=[{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}],S=[r];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ProjectPageQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"TracesTable_spans"},{args:null,kind:"FragmentSpread",name:"ProjectPageHeader_stats"},{args:null,kind:"FragmentSpread",name:"StreamToggle_data"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ProjectPageQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"TypeDiscriminator",abstractKey:"__isNode"},t,{kind:"InlineFragment",selections:[i,{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null},{alias:"rootSpans",args:o,concreteType:"SpanConnection",kind:"LinkedField",name:"spans",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"rootSpan",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[t,c,i,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},d,m,f,{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountCompletion",storageKey:null},g,{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:p,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:p,storageKey:null},y,k,v,{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"descendants",plural:!0,selections:[t,c,i,d,m,f,g,{alias:"cumulativeTokenCountTotal",args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:"cumulativeTokenCountPrompt",args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:"cumulativeTokenCountCompletion",args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:b,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:b,storageKey:null},y,k,v],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:[l],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},{alias:"rootSpans",args:o,filters:["sort","rootSpansOnly","filterCondition","timeRange"],handle:"connection",key:"TracesTable_rootSpans",kind:"LinkedHandle",name:"spans"},{alias:null,args:S,kind:"ScalarField",name:"traceCount",storageKey:null},{alias:null,args:S,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:"latencyMsP50",args:[{kind:"Literal",name:"probability",value:.5},r],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:"latencyMsP99",args:[{kind:"Literal",name:"probability",value:.99},r],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"documentEvaluationNames",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"streamingLastUpdatedAt",storageKey:null}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"43fee2b22bc4798639d2e1fbef09ce21",id:null,metadata:{},name:"ProjectPageQuery",operationKind:"query",text:`query ProjectPageQuery(
|
|
1527
1527
|
$id: GlobalID!
|
|
1528
1528
|
$timeRange: TimeRange!
|
|
1529
1529
|
) {
|
|
@@ -1730,7 +1730,7 @@ fragment ProjectPageHeader_stats on Project {
|
|
|
1730
1730
|
documentEvaluationNames
|
|
1731
1731
|
id
|
|
1732
1732
|
}
|
|
1733
|
-
`}}}();Ht.hash="dcce9d160db90e2b5c51eef9971101a4";const Gt=function(){var n={kind:"Variable",name:"timeRange",variableName:"timeRange"},a=[n];return{argumentDefinitions:[{kind:"RootArgument",name:"timeRange"}],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:Ht,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"ProjectPageHeader_stats",selections:[{alias:null,args:a,kind:"ScalarField",name:"traceCount",storageKey:null},{alias:null,args:a,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:"latencyMsP50",args:[{kind:"Literal",name:"probability",value:.5},n],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:"latencyMsP99",args:[{kind:"Literal",name:"probability",value:.99},n],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"documentEvaluationNames",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],type:"Project",abstractKey:null}}();Gt.hash="dcce9d160db90e2b5c51eef9971101a4";const Ut=u.createContext(null);function Mn(){const n=
|
|
1733
|
+
`}}}();Ht.hash="dcce9d160db90e2b5c51eef9971101a4";const Gt=function(){var n={kind:"Variable",name:"timeRange",variableName:"timeRange"},a=[n];return{argumentDefinitions:[{kind:"RootArgument",name:"timeRange"}],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:Ht,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"ProjectPageHeader_stats",selections:[{alias:null,args:a,kind:"ScalarField",name:"traceCount",storageKey:null},{alias:null,args:a,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:"latencyMsP50",args:[{kind:"Literal",name:"probability",value:.5},n],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:"latencyMsP99",args:[{kind:"Literal",name:"probability",value:.99},n],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"documentEvaluationNames",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],type:"Project",abstractKey:null}}();Gt.hash="dcce9d160db90e2b5c51eef9971101a4";const Ut=u.createContext(null);function Mn(){const n=Te.useContext(Ut);if(n===null)throw new Error("useStreamState must be used within a StreamStateProvider");return n}function dc({initialFetchKey:n="initial",children:a}){const l=un(c=>c.traceStreamingEnabled),t=un(c=>c.setTraceStreamingEnabled),[i,r]=u.useState(n),o=u.useCallback(c=>{u.startTransition(()=>{r(c)})},[r]);return e(Ut.Provider,{value:{isStreaming:l,setIsStreaming:t,fetchKey:i,setFetchKey:o},children:a})}const Wt=function(){var n={defaultValue:null,kind:"LocalArgument",name:"annotationName"},a={defaultValue:null,kind:"LocalArgument",name:"id"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"id"}],i=[{kind:"Variable",name:"annotationName",variableName:"annotationName"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}];return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"AnnotationSummaryValueQuery",selections:[{alias:null,args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:i,kind:"FragmentSpread",name:"AnnotationSummaryValueFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,l,a],kind:"Operation",name:"AnnotationSummaryValueQuery",selections:[{alias:null,args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{kind:"InlineFragment",selections:[{alias:null,args:i,concreteType:"AnnotationSummary",kind:"LinkedField",name:"spanAnnotationSummary",plural:!1,selections:[{alias:null,args:null,concreteType:"LabelFraction",kind:"LinkedField",name:"labelFractions",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"fraction",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null}],storageKey:null}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"bae90b7000aa37d37050070d8504b41c",id:null,metadata:{},name:"AnnotationSummaryValueQuery",operationKind:"query",text:`query AnnotationSummaryValueQuery(
|
|
1734
1734
|
$annotationName: String!
|
|
1735
1735
|
$timeRange: TimeRange!
|
|
1736
1736
|
$id: GlobalID!
|
|
@@ -1776,7 +1776,7 @@ fragment AnnotationSummaryValueFragment_4BTVrq on Project {
|
|
|
1776
1776
|
}
|
|
1777
1777
|
id
|
|
1778
1778
|
}
|
|
1779
|
-
`}}}();Zt.hash="6a15ba35fe9e1e35aa4c517ab6309a2b";function
|
|
1779
|
+
`}}}();Zt.hash="6a15ba35fe9e1e35aa4c517ab6309a2b";function cc({annotationName:n}){const{projectId:a}=je(),{timeRange:l}=oa(),t=T.useLazyLoadQuery(Zt,{annotationName:n,id:a,timeRange:{start:l.start.toISOString(),end:l.end.toISOString()}});return s(h,{direction:"column",flex:"none",children:[e(F,{elementType:"h3",textSize:"medium",color:"text-700",children:n}),e(u.Suspense,{fallback:e(F,{textSize:"xlarge",children:"--"}),children:e(uc,{annotationName:n,project:t.project})})]})}function uc(n){var y,k;const{project:a,annotationName:l}=n,{fetchKey:t}=Mn(),[i,r]=T.useRefetchableFragment(Jt,a);u.useEffect(()=>{u.startTransition(()=>{r({},{fetchPolicy:"store-and-network"})})},[t,r]);const o=$e(),d=[Kl(l),o.default,o.gray600,o.gray400,o.gray200],m=(y=i==null?void 0:i.spanAnnotationSummary)==null?void 0:y.meanScore,f=(k=i==null?void 0:i.spanAnnotationSummary)==null?void 0:k.labelFractions,g=typeof m=="number",p=Array.isArray(f)&&f.length>0;return!g&&!p?e(F,{textSize:"xlarge",children:"--"}):s(Fe,{delay:0,placement:"bottom",children:[e(Kn,{children:s(h,{direction:"row",alignItems:"center",gap:"size-50",children:[p?e(Qs,{width:24,height:24,children:e(Os,{data:f,dataKey:"fraction",nameKey:"label",cx:"50%",cy:"50%",innerRadius:8,outerRadius:11,strokeWidth:0,stroke:"transparent",children:f.map((v,b)=>e(js,{fill:d[b%d.length]},`cell-${b}`))})}):null,e(F,{textSize:"xlarge",children:g?_e(m):"--"})]})}),e(Jn,{children:e(x,{width:"size-2400",children:s(h,{direction:"column",gap:"size-50",children:[p&&e("ul",{children:f.map((v,b)=>e("li",{children:e(re,{color:d[b%d.length],name:v.label,shape:"square",value:xl(v.fraction*100)})},v.label))}),p&&g?e(ra,{}):null,g?s(h,{direction:"row",justifyContent:"space-between",children:[e(F,{children:"mean"}),e(F,{children:_e(m)})]}):null]})})})]})}const Xt=function(){var n={defaultValue:null,kind:"LocalArgument",name:"evaluationName"},a={defaultValue:null,kind:"LocalArgument",name:"id"},l={defaultValue:null,kind:"LocalArgument",name:"timeRange"},t=[{kind:"Variable",name:"id",variableName:"id"}],i=[{kind:"Variable",name:"evaluationName",variableName:"evaluationName"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}];return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"DocumentEvaluationSummaryValueQuery",selections:[{alias:null,args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:i,kind:"FragmentSpread",name:"DocumentEvaluationSummaryValueFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,l,a],kind:"Operation",name:"DocumentEvaluationSummaryValueQuery",selections:[{alias:null,args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{kind:"InlineFragment",selections:[{alias:null,args:i,concreteType:"DocumentEvaluationSummary",kind:"LinkedField",name:"documentEvaluationSummary",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"averageNdcg",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"averagePrecision",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"meanReciprocalRank",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hitRate",storageKey:null}],storageKey:null}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"60d7798d88e1408e6b6b0bebdc1716f5",id:null,metadata:{},name:"DocumentEvaluationSummaryValueQuery",operationKind:"query",text:`query DocumentEvaluationSummaryValueQuery(
|
|
1780
1780
|
$evaluationName: String!
|
|
1781
1781
|
$timeRange: TimeRange!
|
|
1782
1782
|
$id: GlobalID!
|
|
@@ -1820,7 +1820,7 @@ fragment DocumentEvaluationSummaryValueFragment_1dJL9N on Project {
|
|
|
1820
1820
|
}
|
|
1821
1821
|
id
|
|
1822
1822
|
}
|
|
1823
|
-
`}}}();ei.hash="4d50474ffa9b9e4a68d07f6e0777c144";function
|
|
1823
|
+
`}}}();ei.hash="4d50474ffa9b9e4a68d07f6e0777c144";function mc({evaluationName:n}){const{projectId:a}=je(),{timeRange:l}=oa(),t=T.useLazyLoadQuery(ei,{id:a,evaluationName:n,timeRange:{start:l.start.toISOString(),end:l.end.toISOString()}});return s(h,{direction:"column",flex:"none",children:[e(F,{elementType:"h3",textSize:"medium",color:"text-700",children:n}),e(u.Suspense,{fallback:e(F,{textSize:"xlarge",children:"--"}),children:e(gc,{evaluationName:n,project:t==null?void 0:t.project})})]})}function gc(n){var m,f,g,p;const{project:a}=n,{fetchKey:l}=Mn(),[t,i]=T.useRefetchableFragment(Yt,a);u.useEffect(()=>{u.startTransition(()=>{i({},{fetchPolicy:"store-and-network"})})},[l,i]);const r=(m=t==null?void 0:t.documentEvaluationSummary)==null?void 0:m.averageNdcg,o=(f=t==null?void 0:t.documentEvaluationSummary)==null?void 0:f.averagePrecision,c=(g=t==null?void 0:t.documentEvaluationSummary)==null?void 0:g.hitRate,d=(p=t==null?void 0:t.documentEvaluationSummary)==null?void 0:p.meanReciprocalRank;return s(Fe,{delay:0,placement:"bottom",children:[e(Kn,{children:e(h,{direction:"row",alignItems:"center",gap:"size-50",height:"28px",children:s(H,{children:[e(he,{metric:"ndcg",score:r},"ndcg"),e(he,{metric:"precision",score:o},"precision"),e(he,{metric:"hit rate",score:c},"hit")]})})}),e(Jn,{children:e(x,{width:"size-2400",children:s(h,{direction:"column",children:[s(h,{justifyContent:"space-between",children:[e(F,{children:"average ndcg"}),e(F,{children:typeof r=="number"?_e(r):"--"})]}),s(h,{justifyContent:"space-between",children:[e(F,{children:"average precision"}),e(F,{children:typeof o=="number"?_e(o):"--"})]}),s(h,{justifyContent:"space-between",children:[e(F,{children:"mean reciprocal rank"}),e(F,{children:typeof d=="number"?_e(d):"--"})]}),s(h,{justifyContent:"space-between",children:[e(F,{children:"hit rate"}),e(F,{children:typeof c=="number"?_e(c):"--"})]})]})})})]})}function pc(n){const{extra:a}=n,{fetchKey:l}=Mn(),[t,i]=T.useRefetchableFragment(Gt,n.project);u.useEffect(()=>{u.startTransition(()=>{i({},{fetchPolicy:"store-and-network"})})},[l,i]);const r=t==null?void 0:t.latencyMsP50,o=t==null?void 0:t.latencyMsP99,c=t==null?void 0:t.tokenCountTotal,d=t==null?void 0:t.spanAnnotationNames,m=t==null?void 0:t.documentEvaluationNames;return e(x,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-200",paddingBottom:"size-50",flex:"none",children:s(h,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[e("div",{css:C`
|
|
1824
1824
|
overflow-x: auto;
|
|
1825
1825
|
overflow-y: hidden;
|
|
1826
1826
|
flex: 1 1 auto;
|
|
@@ -1856,7 +1856,7 @@ fragment DocumentEvaluationSummaryValueFragment_1dJL9N on Project {
|
|
|
1856
1856
|
left center,
|
|
1857
1857
|
right center;
|
|
1858
1858
|
background-attachment: local, local, scroll, scroll;
|
|
1859
|
-
`,children:s(h,{direction:"row",gap:"size-400",alignItems:"center",children:[s(h,{direction:"column",flex:"none",children:[e(F,{elementType:"h3",textSize:"medium",color:"text-700",children:"Total Traces"}),e(F,{textSize:"xlarge",children:
|
|
1859
|
+
`,children:s(h,{direction:"row",gap:"size-400",alignItems:"center",children:[s(h,{direction:"column",flex:"none",children:[e(F,{elementType:"h3",textSize:"medium",color:"text-700",children:"Total Traces"}),e(F,{textSize:"xlarge",children:cn(t==null?void 0:t.traceCount)})]}),s(h,{direction:"column",flex:"none",children:[e(F,{elementType:"h3",textSize:"medium",color:"text-700",children:"Total Tokens"}),e(F,{textSize:"xlarge",children:cn(c)})]}),s(h,{direction:"column",flex:"none",children:[e(F,{elementType:"h3",textSize:"medium",color:"text-700",children:"Latency P50"}),r!=null?e(xe,{latencyMs:r,textSize:"xlarge"}):e(F,{textSize:"xlarge",children:"--"})]}),s(h,{direction:"column",flex:"none",children:[e(F,{elementType:"h3",textSize:"medium",color:"text-700",children:"Latency P99"}),o!=null?e(xe,{latencyMs:o,textSize:"xlarge"}):e(F,{textSize:"xlarge",children:"--"})]}),d.map(f=>e(cc,{annotationName:f},f)),m.map(f=>e(mc,{evaluationName:f},`document-${f}`))]})}),e(x,{flex:"none",paddingStart:"size-100",children:a})]})})}const ni=u.createContext(null);function ai(){const n=u.useContext(ni);if(n===null)throw new Error("useSpanFilterCondition must be used within a SpanFilterConditionProvider");return n}function el(n){const[a,l]=u.useState(""),t=u.useCallback(r=>{u.startTransition(()=>{l(r)})},[]),i=u.useCallback(r=>{u.startTransition(()=>{a.length>0?l(a+" and "+r):l(r)})},[a]);return e(ni.Provider,{value:{filterCondition:a,setFilterCondition:t,appendFilterCondition:i},children:n.children})}const li=function(){var n={defaultValue:null,kind:"LocalArgument",name:"after"},a={defaultValue:null,kind:"LocalArgument",name:"filterCondition"},l={defaultValue:50,kind:"LocalArgument",name:"first"},t={defaultValue:null,kind:"LocalArgument",name:"id"},i={defaultValue:{col:"startTime",dir:"desc"},kind:"LocalArgument",name:"sort"},r={defaultValue:null,kind:"LocalArgument",name:"timeRange"},o=[{kind:"Variable",name:"id",variableName:"id"}],c={kind:"Variable",name:"after",variableName:"after"},d={kind:"Variable",name:"filterCondition",variableName:"filterCondition"},m={kind:"Variable",name:"first",variableName:"first"},f={kind:"Variable",name:"sort",variableName:"sort"},g={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},p={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},y={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},k=[c,d,m,f,{kind:"Variable",name:"timeRange",variableName:"timeRange"}],v=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}];return{fragment:{argumentDefinitions:[n,a,l,t,i,r],kind:"Fragment",metadata:null,name:"SpansTableSpansQuery",selections:[{alias:null,args:o,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:[c,d,m,f],kind:"FragmentSpread",name:"SpansTable_spans"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,a,l,i,r,t],kind:"Operation",name:"SpansTableSpansQuery",selections:[{alias:null,args:o,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[g,{kind:"TypeDiscriminator",abstractKey:"__isNode"},p,{kind:"InlineFragment",selections:[y,{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null},{alias:null,args:k,concreteType:"SpanConnection",kind:"LinkedField",name:"spans",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:[p,{alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},y,{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:v,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:v,storageKey:null},{alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[y,{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:[g],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},{alias:null,args:k,filters:["sort","filterCondition","timeRange"],handle:"connection",key:"SpansTable_spans",kind:"LinkedHandle",name:"spans"}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"21dc6f490cf749c02bc20bcdb43c199c",id:null,metadata:{},name:"SpansTableSpansQuery",operationKind:"query",text:`query SpansTableSpansQuery(
|
|
1860
1860
|
$after: String = null
|
|
1861
1861
|
$filterCondition: String = null
|
|
1862
1862
|
$first: Int = 50
|
|
@@ -1927,14 +1927,14 @@ fragment SpansTable_spans_1XEuU on Project {
|
|
|
1927
1927
|
}
|
|
1928
1928
|
id
|
|
1929
1929
|
}
|
|
1930
|
-
`}}}();li.hash="4827989f55b1c0bd269253b6bc977439";const ti=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:li,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}}();ti.hash="4827989f55b1c0bd269253b6bc977439";const ii=u.createContext(null);function
|
|
1930
|
+
`}}}();li.hash="4827989f55b1c0bd269253b6bc977439";const ti=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:li,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}}();ti.hash="4827989f55b1c0bd269253b6bc977439";const ii=u.createContext(null);function yc({children:n,...a}){const l=u.useRef();return l.current||(l.current=fs(a)),e(ii.Provider,{value:l.current,children:n})}function Oe(n,a){const l=Te.useContext(ii);if(!l)throw new Error("Missing TracingContext.Provider in the tree");return dl(l,n,a)}function ri(n){const{appendFilterCondition:a}=ai(),{annotation:l}=n,{name:t,label:i,score:r}=l,o=u.useMemo(()=>{const c=[];return i!=null&&(c.push({filterName:"Match label",filterCondition:`annotations['${t}'].label == "${i}"`}),c.push({filterName:"Exclude label",filterCondition:`annotations['${t}'].label != "${i}"`})),typeof r=="number"&&(c.push({filterName:"Greater than score",filterCondition:`annotations['${t}'].score > ${r}`}),c.push({filterName:"Less than score",filterCondition:`annotations['${t}'].score < ${r}`}),c.push({filterName:"Equals score",filterCondition:`annotations['${t}'].score == ${r}`})),c},[t,i,r]);return s(x,{borderStartWidth:"thin",borderColor:"dark",paddingStart:"size-200",paddingEnd:"size-100",marginStart:"size-200",width:300,children:[e(F,{textSize:"large",weight:"heavy",children:"Filters"}),e("ul",{css:C`
|
|
1931
1931
|
display: flex;
|
|
1932
1932
|
flex-direction: row;
|
|
1933
1933
|
gap: var(--ac-global-dimension-size-100);
|
|
1934
1934
|
color: var(--ac-global-color-primary);
|
|
1935
1935
|
padding: var(--ac-global-dimension-size-100) 0;
|
|
1936
1936
|
flex-wrap: wrap;
|
|
1937
|
-
`,children:o.map(c=>e("li",{children:e(
|
|
1937
|
+
`,children:o.map(c=>e("li",{children:e(fc,{onClick:()=>{a(c.filterCondition)},children:c.filterName})},c.filterName))})]})}function fc({onClick:n,children:a}){return e("button",{onClick:l=>{l.preventDefault(),l.stopPropagation(),n()},className:"button--reset",css:C`
|
|
1938
1938
|
color: var(--ac-global-text-color-900);
|
|
1939
1939
|
border: 1px solid var(--ac-global-color-gray-200);
|
|
1940
1940
|
border-radius: 4px;
|
|
@@ -1945,10 +1945,10 @@ fragment SpansTable_spans_1XEuU on Project {
|
|
|
1945
1945
|
&:hover {
|
|
1946
1946
|
background-color: var(--ac-global-color-gray-300);
|
|
1947
1947
|
}
|
|
1948
|
-
`,children:a})}function
|
|
1948
|
+
`,children:a})}function hc({projectName:n}){const[a,l]=u.useState("Python");return e(j,{title:"Send Traces to this Project",size:"L",children:s(x,{padding:"size-400",overflow:"auto",children:[e(x,{paddingBottom:"size-100",children:e(Dl,{language:a,onChange:l})}),a==="Python"?e(Tl,{projectName:n}):e(Il,{projectName:n})]})})}function si({projectName:n}){const[a,l]=u.useState(null),t=()=>{l(e(hc,{projectName:n}))};return s("tbody",{className:"is-empty",children:[e("tr",{children:e("td",{colSpan:100,css:i=>C`
|
|
1949
1949
|
text-align: center;
|
|
1950
1950
|
padding: ${i.spacing.margin24}px ${i.spacing.margin24}px !important;
|
|
1951
|
-
`,children:s(h,{direction:"column",gap:"size-200",alignItems:"center",children:["No traces found for this project",e(N,{variant:"default",icon:e(P,{svg:e(
|
|
1951
|
+
`,children:s(h,{direction:"column",gap:"size-200",alignItems:"center",children:["No traces found for this project",e(N,{variant:"default",icon:e(P,{svg:e(E.PlayCircleOutline,{})}),onClick:t,children:"Get Started"})]})})}),e(U,{onDismiss:()=>l(null),isDismissable:!0,type:"slideOver",children:a})]})}const oi={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"SpanColumnSelector_annotations",selections:[{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null}],type:"Project",abstractKey:null};oi.hash="ad01e6897ad1ea779eb346d85783b8b4";const kc=["spanKind","name"];function di(n){return e(za,{menu:e(bc,{...n}),triggerProps:{placement:"bottom end"},children:s(h,{direction:"row",alignItems:"center",gap:"size-100",children:[e(P,{svg:e(E.Column,{})}),"Columns"]})})}const ta=C`
|
|
1952
1952
|
padding: var(--ac-global-dimension-static-size-50)
|
|
1953
1953
|
var(--ac-global-dimension-static-size-100);
|
|
1954
1954
|
label {
|
|
@@ -1956,10 +1956,10 @@ fragment SpansTable_spans_1XEuU on Project {
|
|
|
1956
1956
|
align-items: center;
|
|
1957
1957
|
gap: var(--ac-global-dimension-static-size-100);
|
|
1958
1958
|
}
|
|
1959
|
-
`;function
|
|
1959
|
+
`;function bc(n){const{columns:a}=n,l=Oe(d=>d.columnVisibility),t=Oe(d=>d.setColumnVisibility),i=u.useMemo(()=>a.filter(d=>!kc.includes(d.id)),[a]),r=u.useMemo(()=>i.every(d=>{const m=l[d.id];return m??!0}),[i,l]),o=u.useCallback(d=>{const{name:m,checked:f}=d.target;t({...l,[m]:f})},[l,t]),c=u.useCallback(d=>{const{checked:m}=d.target,f=i.reduce((g,p)=>({...g,[p.id]:m}),{});t(f)},[i,t]);return e("div",{css:C`
|
|
1960
1960
|
overflow-y: auto;
|
|
1961
1961
|
max-height: calc(100vh - 200px);
|
|
1962
|
-
`,children:s(x,{paddingTop:"size-50",paddingBottom:"size-50",children:[e(x,{borderBottomColor:"dark",borderBottomWidth:"thin",paddingBottom:"size-50",children:e("div",{css:ta,children:s("label",{children:[e("input",{type:"checkbox",name:"toggle-all",checked:r,onChange:c}),"span columns"]})})}),e("ul",{children:i.map(d=>{const m=l[d.id],
|
|
1962
|
+
`,children:s(x,{paddingTop:"size-50",paddingBottom:"size-50",children:[e(x,{borderBottomColor:"dark",borderBottomWidth:"thin",paddingBottom:"size-50",children:e("div",{css:ta,children:s("label",{children:[e("input",{type:"checkbox",name:"toggle-all",checked:r,onChange:c}),"span columns"]})})}),e("ul",{children:i.map(d=>{const m=l[d.id],f=m??!0,g=typeof d.columnDef.header=="string"?d.columnDef.header:d.id;return e("li",{css:ta,children:s("label",{children:[e("input",{type:"checkbox",name:d.id,checked:f,onChange:o}),g]})},d.id)})}),e(Sc,{...n})]})})}function Sc({query:n}){const a=T.useFragment(oi,n),l=Oe(o=>o.annotationColumnVisibility),t=Oe(o=>o.setAnnotationColumnVisibility),i=u.useMemo(()=>a.spanAnnotationNames.every(o=>l[o]||!1),[a.spanAnnotationNames,l]),r=u.useCallback(()=>{const o=a.spanAnnotationNames.reduce((c,d)=>({...c,[d]:!i}),{});t(o)},[a.spanAnnotationNames,t,i]);return s("section",{children:[e(x,{paddingTop:"size-50",paddingBottom:"size-50",borderColor:"dark",borderTopWidth:"thin",borderBottomWidth:"thin",children:e("div",{css:ta,children:s("label",{children:[e("input",{type:"checkbox",name:"toggle-evaluations-all",checked:i,onChange:r}),"feedback"]})})}),e("ul",{children:a.spanAnnotationNames.map(o=>{const c=l[o]??!1;return e("li",{css:ta,children:s("label",{children:[e("input",{type:"checkbox",name:o,checked:c,onChange:()=>{t({...l,[o]:!c})}}),o]})},o)})})]})}const ci=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"condition"},{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={kind:"InlineFragment",selections:[{alias:null,args:[{kind:"Variable",name:"condition",variableName:"condition"}],concreteType:"ValidationResult",kind:"LinkedField",name:"validateSpanFilterCondition",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"isValid",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"errorMessage",storageKey:null}],storageKey:null}],type:"Project",abstractKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SpanFilterConditionFieldValidationQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SpanFilterConditionFieldValidationQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,{kind:"TypeDiscriminator",abstractKey:"__isNode"},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}]},params:{cacheID:"29583e7ec666cef832dc7effb9e75678",id:null,metadata:{},name:"SpanFilterConditionFieldValidationQuery",operationKind:"query",text:`query SpanFilterConditionFieldValidationQuery(
|
|
1963
1963
|
$condition: String!
|
|
1964
1964
|
$id: GlobalID!
|
|
1965
1965
|
) {
|
|
@@ -2006,19 +2006,19 @@ fragment SpansTable_spans_1XEuU on Project {
|
|
|
2006
2006
|
border-color: var(--ac-global-color-danger);
|
|
2007
2007
|
}
|
|
2008
2008
|
box-sizing: border-box;
|
|
2009
|
-
`;function
|
|
2009
|
+
`;function vc(n){const a=n.matchBefore(/\w*/);return!a||a.from==a.to&&!n.explicit?null:{from:a.from,options:[{label:"span_kind",type:"variable",info:"The span variant: CHAIN, LLM, RETRIEVER, TOOL, etc."},{label:"status_code",type:"variable",info:"The span status: OK, UNSET, or ERROR"},{label:"input.value",type:"variable",info:"The input value of a span, typically a query"},{label:"output.value",type:"variable",info:"The output value of a span, typically a response"},{label:"name",type:"variable",info:"The name given to a span - e.x. OpenAI"},{label:"latency_ms",type:"variable",info:"Latency (i.e. duration) in milliseconds"},{label:"cumulative_token_count.prompt",type:"variable",info:"Sum of token count for prompt from self and all child spans"},{label:"cumulative_token_count.completion",type:"variable",info:"Sum of token count for completion from self and all child spans"},{label:"cumulative_token_count.total",type:"variable",info:"Sum of token count total (prompt + completion) from self and all child spans"},{label:"llm spans",type:"text",apply:"span_kind == 'LLM'",detail:"macro"},{label:"retriever spans",type:"text",apply:"span_kind == 'RETRIEVER'",detail:"macro"},{label:"search input",type:"text",apply:"'' in input.value",detail:"macro"},{label:"search output",type:"text",apply:"'' in output.value",detail:"macro"},{label:"status_code error",type:"text",apply:"status_code == 'ERROR'",detail:"macro"},{label:"Latency >= 10s",type:"text",apply:"latency_ms >= 10_000",detail:"macro"},{label:"Tokens >= 1,000",type:"text",apply:"llm.token_count.total >= 1_000",detail:"macro"},{label:"Hallucinations",type:"text",apply:"annotations['Hallucination'].label == 'hallucinated'",detail:"macro"},{label:"Annotations",type:"text",apply:"annotations['Hallucination'].label == 'hallucinated'",detail:"macro"},{label:"Metadata",type:"text",apply:"metadata['topic'] == 'agent'",detail:"macro"},{label:"Substring",type:"text",apply:"'agent' in input.value",detail:"macro"}]}}async function Cc(n,a){if(!n)return{isValid:!0,errorMessage:null};const l=await wr.fetchQuery(Ie,ci,{condition:n,id:a}).toPromise();if(!l)throw new Error("Filter condition validation is null");return l.project.validateSpanFilterCondition}const Fc=[Hs.of([{key:"Enter",run:n=>!0}]),Oa(),Gs({override:[vc]})];function gi(n){const{onValidCondition:a,placeholder:l="filter condition (e.x. span_kind == 'LLM')"}=n,[t,i]=u.useState(!1),[r,o]=u.useState(""),{filterCondition:c,setFilterCondition:d,appendFilterCondition:m}=ai(),f=u.useDeferredValue(c),{theme:g}=Hn(),p=g==="dark"?pa:void 0,{projectId:y}=je();u.useEffect(()=>{Cc(f,y).then(b=>{b!=null&&b.isValid?(o(""),u.startTransition(()=>{a(f)})):o((b==null?void 0:b.errorMessage)??"Invalid filter condition")})},[a,f,y]);const k=r!=="",v=c!=="";return s("div",{"data-is-focused":t,"data-is-invalid":k,className:"span-filter-condition-field",css:mi,children:[s(h,{direction:"row",children:[e(Ns,{children:e(P,{svg:e(E.Search,{})})}),e(ga,{css:ui,indentWithTab:!1,basicSetup:{lineNumbers:!1,foldGutter:!1,bracketMatching:!0,syntaxHighlighting:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1,defaultKeymap:!1},onFocus:()=>i(!0),onBlur:()=>i(!1),value:c,onChange:d,height:"36px",width:"100%",theme:p,placeholder:l,extensions:Fc}),e("button",{css:C`
|
|
2010
2010
|
margin-right: var(--ac-global-dimension-static-size-100);
|
|
2011
2011
|
color: var(--ac-global-text-color-700);
|
|
2012
2012
|
visibility: ${v?"visible":"hidden"};
|
|
2013
|
-
`,onClick:()=>d(""),className:"button--reset",children:e(P,{svg:e(
|
|
2013
|
+
`,onClick:()=>d(""),className:"button--reset",children:e(P,{svg:e(E.CloseCircleOutline,{})})}),s(yn,{placement:"bottom right",children:[e(Kn,{children:e("button",{css:C`
|
|
2014
2014
|
color: var(--ac-global-text-color-700);
|
|
2015
2015
|
background-color: var(--ac-global-color-grey-400);
|
|
2016
2016
|
padding-left: var(--ac-global-dimension-static-size-100);
|
|
2017
2017
|
padding-right: var(--ac-global-dimension-static-size-100);
|
|
2018
2018
|
height: 100%;
|
|
2019
|
-
`,className:"button--reset",children:e(P,{svg:e(
|
|
2019
|
+
`,className:"button--reset",children:e(P,{svg:e(E.PlusCircleOutline,{})})})}),e(Kc,{onAddFilterConditionSnippet:m})]})]}),s(Fe,{isOpen:k&&t,placement:"bottom",children:[e(Kn,{children:e("div",{})}),e(Jn,{children:r!=""?e(F,{color:"danger",children:r}):e(F,{color:"success",children:"Valid Expression"})})]})]})}function Kc(n){const{onAddFilterConditionSnippet:a}=n;return e(x,{width:"500px",paddingTop:"size-200",paddingStart:"size-200",paddingEnd:"size-200",borderRadius:"medium",borderWidth:"thin",borderColor:"light",backgroundColor:"light",children:s(mn,{children:[e(nn,{label:"filter by kind",initialSnippet:"span_kind == 'LLM'",onAddFilterConditionSnippet:a},"kind"),e(nn,{label:"filter by token count",initialSnippet:"cumulative_token_count.total > 1000",onAddFilterConditionSnippet:a},"token_count"),e(nn,{label:"filter by annotation label",initialSnippet:"annotations['Hallucination'].label == 'hallucinated'",onAddFilterConditionSnippet:a},"annotation_label"),e(nn,{label:"filter by evaluation label",initialSnippet:"evals['Hallucination'].label == 'hallucinated'",onAddFilterConditionSnippet:a},"eval_label"),e(nn,{label:"filter by evaluation score",initialSnippet:"evals['Hallucination'].score < 1",onAddFilterConditionSnippet:a},"eval_score"),e(nn,{label:"filter by metadata",initialSnippet:"metadata['topic'] == 'agent'",onAddFilterConditionSnippet:a},"metadata"),e(nn,{label:"filter by substring",initialSnippet:"'agent' in input.value",onAddFilterConditionSnippet:a},"substring")]})})}function nn(n){const{initialSnippet:a,onAddFilterConditionSnippet:l}=n,[t,i]=u.useState(a),{theme:r}=Hn(),o=r==="light"?void 0:pa;return e(ma,{label:n.label,children:s(h,{direction:"row",width:"100%",gap:"size-100",children:[e("div",{css:C(mi,C`
|
|
2020
2020
|
flex: 1 1 auto;
|
|
2021
|
-
`),children:e(ga,{value:t,basicSetup:{lineNumbers:!1,foldGutter:!1,bracketMatching:!0,syntaxHighlighting:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1},extensions:[Oa()],editable:!0,onChange:i,theme:o,css:ui})}),e(N,{title:"Add to filter condition",variant:"default",onClick:()=>l(t),icon:e(P,{svg:e(
|
|
2021
|
+
`),children:e(ga,{value:t,basicSetup:{lineNumbers:!1,foldGutter:!1,bracketMatching:!0,syntaxHighlighting:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1},extensions:[Oa()],editable:!0,onChange:i,theme:o,css:ui})}),e(N,{title:"Add to filter condition",variant:"default",onClick:()=>l(t),icon:e(P,{svg:e(E.PlusCircleOutline,{})})})]})})}const pi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"DatasetMutationPayload",kind:"LinkedField",name:"addSpansToDataset",plural:!1,selections:[{alias:null,args:null,concreteType:"Dataset",kind:"LinkedField",name:"dataset",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SpanSelectionToolbarAddSpansToDatasetMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SpanSelectionToolbarAddSpansToDatasetMutation",selections:a},params:{cacheID:"1c694540190478b8fba8ef3c0cacf30c",id:null,metadata:{},name:"SpanSelectionToolbarAddSpansToDatasetMutation",operationKind:"mutation",text:`mutation SpanSelectionToolbarAddSpansToDatasetMutation(
|
|
2022
2022
|
$input: AddSpansToDatasetInput!
|
|
2023
2023
|
) {
|
|
2024
2024
|
addSpansToDataset(input: $input) {
|
|
@@ -2055,15 +2055,15 @@ fragment DatasetSelectorPopoverContent_datasets on Query {
|
|
|
2055
2055
|
}
|
|
2056
2056
|
}
|
|
2057
2057
|
}
|
|
2058
|
-
`}};hi.hash="7cd8a13144d97d2b5294f2a09c9e1351";function
|
|
2058
|
+
`}};hi.hash="7cd8a13144d97d2b5294f2a09c9e1351";function xc(n){const{onCreateNewDataset:a,onDatasetSelected:l}=n,[t,i]=u.useState(""),r=T.useLazyLoadQuery(hi,{},{fetchPolicy:"network-only"});return s(z,{title:"Add to Dataset",variant:"compact",backgroundColor:"light",borderColor:"light",bodyStyle:{padding:0},extra:e(N,{variant:"default",size:"compact",onClick:a,children:"New Dataset"}),children:[e(x,{padding:"size-100",children:e(le,{type:"search",placeholder:"Search datasets",addonBefore:e(P,{svg:e(E.Search,{})}),onChange:o=>{i(o)}})}),e(x,{borderTopWidth:"thin",borderColor:"light",children:e("div",{css:C`
|
|
2059
2059
|
height: 400px;
|
|
2060
2060
|
overflow-y: auto;
|
|
2061
|
-
`,children:e(
|
|
2061
|
+
`,children:e(Dc,{query:r,search:t,onDatasetSelected:l})})})]})}function Dc(n){const{search:a,onDatasetSelected:l}=n,[t]=T.useRefetchableFragment(fi,n.query),i=u.useMemo(()=>{let o=t.datasets.edges.map(c=>c.dataset);return a&&(o=o.filter(c=>c.name.toLowerCase().includes(a.toLowerCase()))),o},[a,t]);return i.length===0?e(h,{direction:"column",justifyContent:"center",alignItems:"center",flex:"1 1 auto",children:e(F,{children:"No datasets found"})}):e(Wn,{selectionMode:"single",onSelectionChange:o=>{if(typeof o=="object"){const c=Array.from(o);l(c[0])}},children:i.map(o=>e(J,{children:o.name},o.id))})}function ki(n){const a=ae(),[l,t]=u.useState(null),i=ge(),r=An(),[o,c]=u.useState(!1),{selectedSpans:d,onClearSelection:m}=n,[f,g]=T.useMutation(pi),p=d.length!==1,y=u.useCallback(k=>{f({variables:{input:{datasetId:k,spanIds:d.map(v=>v.id)}},onCompleted:()=>{i({title:"Examples added to dataset",message:`${d.length} example${p?"s":""} have been added to the dataset.`,action:{text:"View dataset",onClick:()=>{a(`/datasets/${k}/examples`)}}}),m()},onError:v=>{r({title:"An error occurred",message:`Failed to add spans to dataset: ${v.message}`})}})},[f,d,i,p,m,a,r]);return s("div",{css:C`
|
|
2062
2062
|
position: absolute;
|
|
2063
2063
|
bottom: var(--ac-global-dimension-size-400);
|
|
2064
2064
|
left: 50%;
|
|
2065
2065
|
transform: translateX(-50%);
|
|
2066
|
-
`,children:[e(x,{backgroundColor:"light",padding:"size-200",borderColor:"light",borderWidth:"thin",borderRadius:"medium",minWidth:"size-6000",children:s(h,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[e(F,{children:`${d.length} span${
|
|
2066
|
+
`,children:[e(x,{backgroundColor:"light",padding:"size-200",borderColor:"light",borderWidth:"thin",borderRadius:"medium",minWidth:"size-6000",children:s(h,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[e(F,{children:`${d.length} span${p?"s":""} selected`}),s(h,{direction:"row",gap:"size-100",children:[e(N,{variant:"default",size:"compact",onClick:m,children:"Cancel"}),s(yn,{placement:"top end",crossOffset:300,isOpen:o,onOpenChange:k=>{c(k)},children:[e(N,{variant:"primary",size:"compact",icon:e(P,{svg:e(E.DatabaseOutline,{})}),loading:g,disabled:g,children:g?"Adding to dataset":"Add to dataset"}),e(u.Suspense,{children:e(xc,{onDatasetSelected:k=>{y(k),c(!1)},onCreateNewDataset:()=>{c(!1),t(e(j,{title:"New Dataset",isDismissable:!0,onDismiss:()=>t(null),children:e(Pa,{onDatasetCreateError:()=>{r({title:"Dataset creation failed",message:"Failed to create dataset."})},onDatasetCreated:k=>{t(null),i({title:"Dataset created",message:`${k.name} has been successfully created.`}),c(!0)}})}))}})})]})]})]})}),e(U,{onDismiss:()=>{t(null)},children:l})]})}const bi=C`
|
|
2067
2067
|
display: flex;
|
|
2068
2068
|
flex-direction: column;
|
|
2069
2069
|
flex: 1 1 auto;
|
|
@@ -2076,10 +2076,10 @@ fragment DatasetSelectorPopoverContent_datasets on Query {
|
|
|
2076
2076
|
.ac-dropdown-button {
|
|
2077
2077
|
min-width: var(--ac-global-dimension-static-size-300);
|
|
2078
2078
|
}
|
|
2079
|
-
`,qn="annotations",
|
|
2079
|
+
`,qn="annotations",Ae=":",Si={col:"startTime",dir:"desc"};function vi(n){let a=null,l=null;if(n.id&&n.id.startsWith(qn)){const[,t,i]=n.id.split(Ae);l={attr:t,name:i}}else a=n.id;return{col:a,evalResultKey:l,dir:n.desc?"desc":"asc"}}const nl=50;function Tc(n){const{fetchKey:a}=Mn(),l=u.useRef(null),[t,i]=u.useState({}),[r,o]=u.useState([]),[c,d]=u.useState(""),m=Oe(M=>M.columnVisibility),f=ae(),{data:g,loadNext:p,hasNext:y,isLoadingNext:k,refetch:v}=T.usePaginationFragment(ti,n.project),b=Oe(M=>M.annotationColumnVisibility),S=u.useMemo(()=>Object.keys(b).filter(M=>b[M]),[b]),L=u.useMemo(()=>g.spans.edges.map(({span:V})=>V),[g]),I=S.map(M=>({header:M,columns:[{header:"label",accessorKey:`${qn}${Ae}label${Ae}${M}`,cell:({row:V})=>{const _=V.original.spanAnnotations.find($=>$.name===M);return _?_.label:null}},{header:"score",accessorKey:`${qn}${Ae}score${Ae}${M}`,cell:({row:V})=>{const _=V.original.spanAnnotations.find($=>$.name===M);return _?_.score:null}}]})),A=[{header:()=>s(h,{direction:"row",gap:"size-50",children:[e("span",{children:"feedback"}),s(Pn,{children:[e(te,{level:3,weight:"heavy",children:"Feedback"}),e(Rn,{children:"Feedback includes evaluations and human annotations logged via the API or set via the UI."})]})]}),accessorKey:"spanAnnotations",enableSorting:!1,cell:({row:M})=>s(h,{direction:"row",gap:"size-50",wrap:"wrap",children:[M.original.spanAnnotations.map(V=>e(Un,{annotation:V,layout:"horizontal",width:"500px",extra:e(ri,{annotation:V}),children:e(pn,{annotation:V,annotationDisplayPreference:"label"})},V.name)),M.original.documentRetrievalMetrics.map(V=>s(H,{children:[e(he,{name:V.evaluationName,metric:"ndcg",score:V.ndcg},"ndcg"),e(he,{name:V.evaluationName,metric:"precision",score:V.precision},"precision"),e(he,{name:V.evaluationName,metric:"hit",score:V.hit},"hit")]}))]})},...I],K=[{id:"select",maxSize:10,header:({table:M})=>e(ze,{checked:M.getIsAllRowsSelected(),indeterminate:M.getIsSomeRowsSelected(),onChange:M.getToggleAllRowsSelectedHandler()}),cell:({row:M})=>e(ze,{checked:M.getIsSelected(),disabled:!M.getCanSelect(),indeterminate:M.getIsSomeSelected(),onChange:M.getToggleSelectedHandler()})},{header:"kind",accessorKey:"spanKind",maxSize:100,enableSorting:!1,cell:({getValue:M})=>e(Ma,{spanKind:M()})},{header:"name",accessorKey:"name",enableSorting:!1,cell:({getValue:M,row:V})=>{const _=V.original,{traceId:$}=_.context;return e(wn,{to:`traces/${$}?selectedSpanNodeId=${_.id}`,children:M()})}},{header:"input",accessorKey:"input.value",cell:fe,enableSorting:!1},{header:"output",accessorKey:"output.value",cell:fe,enableSorting:!1},{header:"metadata",accessorKey:"metadata",cell:fe,enableSorting:!1},...A,{header:"start time",accessorKey:"startTime",cell:ve},{header:"latency",accessorKey:"latencyMs",cell:({getValue:M})=>{const V=M();return V===null||typeof V!="number"?null:e(xe,{latencyMs:V})}},{header:"total tokens",accessorKey:"tokenCountTotal",cell:({row:M,getValue:V})=>{const _=V();return _===null?"--":e(Ra,{tokenCountTotal:_,tokenCountPrompt:M.original.tokenCountPrompt||0,tokenCountCompletion:M.original.tokenCountCompletion||0})}},{header:"status",accessorKey:"statusCode",enableSorting:!1,cell:({getValue:M})=>e(sa,{statusCode:M()})}];u.useEffect(()=>{const M=r[0];u.startTransition(()=>{v({sort:M?vi(M):Si,after:null,first:nl,filterCondition:c},{fetchPolicy:"store-and-network"})})},[r,v,c,a]);const D=u.useCallback(M=>{if(M){const{scrollHeight:V,scrollTop:_,clientHeight:$}=M;V-_-$<300&&!k&&y&&p(nl)}},[y,k,p]),R=ue({columns:K,data:L,state:{sorting:r,columnVisibility:m,rowSelection:t},manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:i,onSortingChange:o,getCoreRowModel:me(),getSortedRowModel:Dn()}),w=R.getRowModel().rows,O=R.getSelectedRowModel().rows,Z=O.map(M=>M.original),ne=u.useCallback(()=>{i({})},[i]),oe=w.length===0,de=R.getAllColumns().filter(M=>M.columns.length===0);return s("div",{css:bi,children:[e(x,{paddingTop:"size-100",paddingBottom:"size-100",paddingStart:"size-200",paddingEnd:"size-200",borderBottomColor:"grey-300",borderBottomWidth:"thin",flex:"none",children:s(h,{direction:"row",gap:"size-100",width:"100%",alignItems:"center",children:[e(gi,{onValidCondition:d}),e(di,{columns:de,query:g})]})}),e("div",{css:C`
|
|
2080
2080
|
flex: 1 1 auto;
|
|
2081
2081
|
overflow: auto;
|
|
2082
|
-
`,onScroll:M=>D(M.target),ref:l,children:s("table",{css:En,children:[e("thead",{children:R.getHeaderGroups().map(M=>e("tr",{children:M.headers.map(V=>e("th",{colSpan:V.colSpan,children:V.isPlaceholder?null:s("div",{className:V.column.getCanSort()?"cursor-pointer":"",onClick:V.column.getToggleSortingHandler(),style:{left:V.getStart(),width:V.getSize()},children:[
|
|
2082
|
+
`,onScroll:M=>D(M.target),ref:l,children:s("table",{css:En,children:[e("thead",{children:R.getHeaderGroups().map(M=>e("tr",{children:M.headers.map(V=>e("th",{colSpan:V.colSpan,children:V.isPlaceholder?null:s("div",{className:V.column.getCanSort()?"cursor-pointer":"",onClick:V.column.getToggleSortingHandler(),style:{left:V.getStart(),width:V.getSize()},children:[B(V.column.columnDef.header,V.getContext()),V.column.getIsSorted()?e(P,{className:"sort-icon",svg:V.column.getIsSorted()==="asc"?e(E.ArrowUpFilled,{}):e(E.ArrowDownFilled,{})}):null]})},V.id))},M.id))}),oe?e(si,{projectName:g.name}):e("tbody",{children:w.map(M=>e("tr",{onClick:()=>f(`traces/${M.original.context.traceId}?selectedSpanNodeId=${M.original.id}`),children:M.getVisibleCells().map(V=>e("td",{children:B(V.column.columnDef.cell,V.getContext())},V.id))},M.id))})]})}),O.length?e(ki,{selectedSpans:Z,onClearSelection:ne}):null]})}const Ci=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"StreamToggleRefetchQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"StreamToggle_data"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"StreamToggleRefetchQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{kind:"TypeDiscriminator",abstractKey:"__isNode"},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"streamingLastUpdatedAt",storageKey:null}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"4e136f41c0942f253822336dc0c5b291",id:null,metadata:{},name:"StreamToggleRefetchQuery",operationKind:"query",text:`query StreamToggleRefetchQuery(
|
|
2083
2083
|
$id: GlobalID!
|
|
2084
2084
|
) {
|
|
2085
2085
|
node(id: $id) {
|
|
@@ -2094,7 +2094,7 @@ fragment StreamToggle_data on Project {
|
|
|
2094
2094
|
streamingLastUpdatedAt
|
|
2095
2095
|
id
|
|
2096
2096
|
}
|
|
2097
|
-
`}}}();Ci.hash="30a8f0bcf1aa6021b2c9a47866f5dc49";const Fi={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:Ci,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"StreamToggle_data",selections:[{alias:null,args:null,kind:"ScalarField",name:"streamingLastUpdatedAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],type:"Project",abstractKey:null};Fi.hash="30a8f0bcf1aa6021b2c9a47866f5dc49";function Ki(n,a){const l=u.useRef(null);u.useEffect(()=>{l.current=n},[n]),u.useEffect(()=>{function t(){l.current&&l.current()}if(typeof a=="number"){const i=setInterval(t,a);return()=>clearInterval(i)}},[a])}const
|
|
2097
|
+
`}}}();Ci.hash="30a8f0bcf1aa6021b2c9a47866f5dc49";const Fi={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:Ci,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"StreamToggle_data",selections:[{alias:null,args:null,kind:"ScalarField",name:"streamingLastUpdatedAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],type:"Project",abstractKey:null};Fi.hash="30a8f0bcf1aa6021b2c9a47866f5dc49";function Ki(n,a){const l=u.useRef(null);u.useEffect(()=>{l.current=n},[n]),u.useEffect(()=>{function t(){l.current&&l.current()}if(typeof a=="number"){const i=setInterval(t,a);return()=>clearInterval(i)}},[a])}const Ic=2e3;function Lc(n){const{isStreaming:a,setIsStreaming:l,setFetchKey:t}=Mn(),[i,r]=T.useRefetchableFragment(Fi,n.project),o=u.useRef(i.streamingLastUpdatedAt),c=u.useCallback(()=>{a&&u.startTransition(()=>{r({},{fetchPolicy:"store-and-network"})})},[a,r]),d=i.streamingLastUpdatedAt;return u.useEffect(()=>{d!=null&&(o.current==null||o.current<d)&&(o.current=d,t(`fetch-traces-${d}`))},[t,d]),Ki(c,Ic),e(ca,{labelPlacement:"start",isSelected:a,onChange:()=>{l(!a)},children:"Stream"})}const xi=function(){var n={defaultValue:null,kind:"LocalArgument",name:"after"},a={defaultValue:null,kind:"LocalArgument",name:"filterCondition"},l={defaultValue:50,kind:"LocalArgument",name:"first"},t={defaultValue:null,kind:"LocalArgument",name:"id"},i={defaultValue:{col:"startTime",dir:"desc"},kind:"LocalArgument",name:"sort"},r={defaultValue:null,kind:"LocalArgument",name:"timeRange"},o=[{kind:"Variable",name:"id",variableName:"id"}],c={kind:"Variable",name:"after",variableName:"after"},d={kind:"Variable",name:"filterCondition",variableName:"filterCondition"},m={kind:"Variable",name:"first",variableName:"first"},f={kind:"Variable",name:"sort",variableName:"sort"},g={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},p={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},y={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},k=[c,d,m,{kind:"Literal",name:"rootSpansOnly",value:!0},f,{kind:"Variable",name:"timeRange",variableName:"timeRange"}],v={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},b={alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},S={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},L={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},I={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},A=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}],K={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},D={alias:null,args:null,concreteType:"SpanAnnotation",kind:"LinkedField",name:"spanAnnotations",plural:!0,selections:[y,{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},R={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},w=[{alias:null,args:null,kind:"ScalarField",name:"value",storageKey:null}];return{fragment:{argumentDefinitions:[n,a,l,t,i,r],kind:"Fragment",metadata:null,name:"TracesTableQuery",selections:[{alias:null,args:o,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:[c,d,m,f],kind:"FragmentSpread",name:"TracesTable_spans"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,a,l,i,r,t],kind:"Operation",name:"TracesTableQuery",selections:[{alias:null,args:o,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[g,{kind:"TypeDiscriminator",abstractKey:"__isNode"},p,{kind:"InlineFragment",selections:[y,{alias:null,args:null,kind:"ScalarField",name:"spanAnnotationNames",storageKey:null},{alias:"rootSpans",args:k,concreteType:"SpanConnection",kind:"LinkedField",name:"spans",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"rootSpan",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[p,v,y,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},b,S,L,{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountCompletion",storageKey:null},I,{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:A,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:A,storageKey:null},K,D,R,{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"descendants",plural:!0,selections:[p,v,y,b,S,L,I,{alias:"cumulativeTokenCountTotal",args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:"cumulativeTokenCountPrompt",args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:"cumulativeTokenCountCompletion",args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:w,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:w,storageKey:null},K,D,R],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:[g],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},{alias:"rootSpans",args:k,filters:["sort","rootSpansOnly","filterCondition","timeRange"],handle:"connection",key:"TracesTable_rootSpans",kind:"LinkedHandle",name:"spans"}],type:"Project",abstractKey:null}],storageKey:null}]},params:{cacheID:"4e6571e93159d5ab4244d5cc4058a65a",id:null,metadata:{},name:"TracesTableQuery",operationKind:"query",text:`query TracesTableQuery(
|
|
2098
2098
|
$after: String = null
|
|
2099
2099
|
$filterCondition: String = null
|
|
2100
2100
|
$first: Int = 50
|
|
@@ -2200,16 +2200,16 @@ fragment TracesTable_spans_1XEuU on Project {
|
|
|
2200
2200
|
}
|
|
2201
2201
|
id
|
|
2202
2202
|
}
|
|
2203
|
-
`}}}();xi.hash="69e77ceeea7371be4ec13fc702225150";const Di=function(){var n=["rootSpans"],a={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},i={alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},o={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},c={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},d=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}],m={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},
|
|
2203
|
+
`}}}();xi.hash="69e77ceeea7371be4ec13fc702225150";const Di=function(){var n=["rootSpans"],a={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"spanKind",storageKey:null},i={alias:"statusCode",args:null,kind:"ScalarField",name:"propagatedStatusCode",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},o={alias:null,args:null,kind:"ScalarField",name:"latencyMs",storageKey:null},c={alias:null,args:null,kind:"ScalarField",name:"parentId",storageKey:null},d=[{alias:"value",args:null,kind:"ScalarField",name:"truncatedValue",storageKey:null}],m={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},f={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},g={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},p=[{alias:null,args:null,kind:"ScalarField",name:"value",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:xi,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"TracesTable_spans",selections:[a,{args:null,kind:"FragmentSpread",name:"SpanColumnSelector_annotations"},{alias:"rootSpans",args:[{kind:"Variable",name:"filterCondition",variableName:"filterCondition"},{kind:"Literal",name:"rootSpansOnly",value:!0},{kind:"Variable",name:"sort",variableName:"sort"},{kind:"Variable",name:"timeRange",variableName:"timeRange"}],concreteType:"SpanConnection",kind:"LinkedField",name:"__TracesTable_rootSpans_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"SpanEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"rootSpan",args:null,concreteType:"Span",kind:"LinkedField",name:"node",plural:!1,selections:[l,t,a,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},i,r,o,{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountTotal",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountPrompt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cumulativeTokenCountCompletion",storageKey:null},c,{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:d,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:d,storageKey:null},m,f,g,{alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"descendants",plural:!0,selections:[l,t,a,i,r,o,c,{alias:"cumulativeTokenCountTotal",args:null,kind:"ScalarField",name:"tokenCountTotal",storageKey:null},{alias:"cumulativeTokenCountPrompt",args:null,kind:"ScalarField",name:"tokenCountPrompt",storageKey:null},{alias:"cumulativeTokenCountCompletion",args:null,kind:"ScalarField",name:"tokenCountCompletion",storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"input",plural:!1,selections:p,storageKey:null},{alias:null,args:null,concreteType:"SpanIOValue",kind:"LinkedField",name:"output",plural:!1,selections:p,storageKey:null},m,f,g],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}}();Di.hash="69e77ceeea7371be4ec13fc702225150";const al=50;function Ti(n){const a=[];for(const l of n){const t={...l.span,children:Ti(l.children)};a.push(t)}return a}function _c(n){const a=u.useRef(null),[l,t]=u.useState({}),[i,r]=u.useState([]),[o,c]=u.useState(""),d=ae(),{fetchKey:m}=Mn(),{data:f,loadNext:g,hasNext:p,isLoadingNext:y,refetch:k}=T.usePaginationFragment(Di,n.project),v=Oe(_=>_.annotationColumnVisibility),b=u.useMemo(()=>Object.keys(v).filter(_=>v[_]),[v]),S=u.useMemo(()=>f.rootSpans.edges.map(({rootSpan:$})=>{const W=hs([$,...$.descendants]),[Ye]=Ti(W);return Ye}),[f]),L=b.map(_=>({header:_,columns:[{header:"label",accessorKey:`${qn}${Ae}label${Ae}${_}`,cell:({row:$})=>{const W=$.original.spanAnnotations.find(Ye=>Ye.name===_);return W?W.label:null}},{header:"score",accessorKey:`${qn}${Ae}score${Ae}${_}`,cell:({row:$})=>{const W=$.original.spanAnnotations.find(Ye=>Ye.name===_);return W?W.score:null}}]})),I=[{header:()=>s(h,{direction:"row",gap:"size-50",children:[e("span",{children:"feedback"}),s(Pn,{children:[e(te,{level:3,weight:"heavy",children:"Feedback"}),e(Rn,{children:"Feedback includes evaluations and human annotations logged via the API or set via the UI."})]})]}),accessorKey:"spanAnnotations",enableSorting:!1,cell:({row:_})=>{const $=_.original.spanAnnotations.length===0&&_.original.documentRetrievalMetrics.length===0;return s(h,{direction:"row",gap:"size-50",wrap:"wrap",children:[_.original.spanAnnotations.map(W=>e(Un,{annotation:W,layout:"horizontal",width:"500px",extra:e(ri,{annotation:W}),children:e(pn,{annotation:W,annotationDisplayPreference:"label"})},W.name)),_.original.documentRetrievalMetrics.map(W=>s(u.Fragment,{children:[e(he,{name:W.evaluationName,metric:"ndcg",score:W.ndcg},"ndcg"),e(he,{name:W.evaluationName,metric:"precision",score:W.precision},"precision"),e(he,{name:W.evaluationName,metric:"hit",score:W.hit},"hit")]},"doc-evals")),$?"--":null]})}},...L],A=[{id:"select",maxSize:10,header:({table:_})=>e(ze,{checked:_.getIsAllRowsSelected(),indeterminate:_.getIsSomeRowsSelected(),onChange:_.getToggleAllRowsSelectedHandler()}),cell:({row:_})=>e(ze,{checked:_.getIsSelected(),disabled:!_.getCanSelect(),indeterminate:_.getIsSomeSelected(),onChange:_.getToggleSelectedHandler()})},{header:()=>s(h,{gap:"size-50",direction:"row",alignItems:"center",children:[e(Ga,{isExpanded:O.getIsAllRowsExpanded(),onClick:O.getToggleAllRowsExpandedHandler(),"aria-label":"Expand all rows"}),"kind"]}),enableSorting:!1,accessorKey:"spanKind",maxSize:100,cell:_=>e("div",{css:C`
|
|
2204
2204
|
// Since rows are flattened by default,
|
|
2205
2205
|
// we can use the row.depth property
|
|
2206
2206
|
// and paddingLeft to visually indicate the depth
|
|
2207
2207
|
// of the row
|
|
2208
2208
|
padding-left: ${_.row.depth*2}rem;
|
|
2209
|
-
`,children:s(h,{gap:"size-50",children:[_.row.getCanExpand()?e(Ga,{isExpanded:_.row.getIsExpanded(),onClick:_.row.getToggleExpandedHandler(),"aria-label":"Expand row"}):null,e(Ma,{spanKind:_.getValue()})]})})},{header:"name",accessorKey:"name",enableSorting:!1,cell:({getValue:_,row:$})=>{const{traceId:
|
|
2209
|
+
`,children:s(h,{gap:"size-50",children:[_.row.getCanExpand()?e(Ga,{isExpanded:_.row.getIsExpanded(),onClick:_.row.getToggleExpandedHandler(),"aria-label":"Expand row"}):null,e(Ma,{spanKind:_.getValue()})]})})},{header:"name",accessorKey:"name",enableSorting:!1,cell:({getValue:_,row:$})=>{const{traceId:W}=$.original.context;return e(wn,{to:`traces/${W}?selectedSpanNodeId=${$.original.id}`,children:_()})}},{header:"input",accessorKey:"input.value",enableSorting:!1,cell:fe},{header:"output",accessorKey:"output.value",enableSorting:!1,cell:fe},{header:"metadata",accessorKey:"metadata",enableSorting:!1,cell:fe},...I,{header:"start time",accessorKey:"startTime",cell:ve},{header:"latency",accessorKey:"latencyMs",cell:({getValue:_})=>{const $=_();return $===null||typeof $!="number"?null:e(xe,{latencyMs:$})}},{header:"total tokens",minSize:80,accessorKey:"cumulativeTokenCountTotal",cell:({row:_,getValue:$})=>{const W=$();return W===null?"--":e(Ra,{tokenCountTotal:W,tokenCountPrompt:_.original.cumulativeTokenCountPrompt||0,tokenCountCompletion:_.original.cumulativeTokenCountCompletion||0})}},{header:"status",accessorKey:"statusCode",enableSorting:!1,cell:({getValue:_})=>e(sa,{statusCode:_()})}];u.useEffect(()=>{const _=i[0];u.startTransition(()=>{k({sort:_?vi(_):Si,after:null,first:al,filterCondition:o},{fetchPolicy:"store-and-network"})})},[i,k,o,m]);const K=Te.useCallback(_=>{if(_){const{scrollHeight:$,scrollTop:W,clientHeight:Ye}=_;$-W-Ye<300&&!y&&p&&g(al)}},[p,y,g]),[D,R]=u.useState({}),w=Oe(_=>_.columnVisibility),O=ue({columns:A,data:S,onExpandedChange:R,manualSorting:!0,getSubRows:_=>_.children,state:{sorting:i,expanded:D,columnVisibility:w,rowSelection:l},onRowSelectionChange:t,enableSubRowSelection:!1,onSortingChange:r,getCoreRowModel:me(),getSortedRowModel:Dn(),getExpandedRowModel:Rr(),getRowId:_=>_.id}),Z=O.getRowModel().rows,ne=O.getSelectedRowModel().flatRows,oe=ne.map(_=>_.original),de=u.useCallback(()=>{t({})},[t]),M=Z.length===0,V=O.getAllColumns().filter(_=>_.columns.length===0);return s("div",{css:bi,children:[e(x,{paddingTop:"size-100",paddingBottom:"size-100",paddingStart:"size-200",paddingEnd:"size-200",borderBottomColor:"grey-300",borderBottomWidth:"thin",flex:"none",children:s(h,{direction:"row",gap:"size-100",width:"100%",alignItems:"center",children:[e(gi,{onValidCondition:c}),e(di,{columns:V,query:f})]})}),e("div",{css:C`
|
|
2210
2210
|
flex: 1 1 auto;
|
|
2211
2211
|
overflow: auto;
|
|
2212
|
-
`,onScroll:_=>K(_.target),ref:a,children:s("table",{css:En,children:[e("thead",{children:O.getHeaderGroups().map(_=>e("tr",{children:_.headers.map($=>e("th",{colSpan:$.colSpan,children:$.isPlaceholder?null:s("div",{"data-sortable":$.column.getCanSort(),className:$.column.getCanSort()?"cursor-pointer":"",onClick:$.column.getToggleSortingHandler(),style:{left:$.getStart(),width:$.getSize()},children:[
|
|
2212
|
+
`,onScroll:_=>K(_.target),ref:a,children:s("table",{css:En,children:[e("thead",{children:O.getHeaderGroups().map(_=>e("tr",{children:_.headers.map($=>e("th",{colSpan:$.colSpan,children:$.isPlaceholder?null:s("div",{"data-sortable":$.column.getCanSort(),className:$.column.getCanSort()?"cursor-pointer":"",onClick:$.column.getToggleSortingHandler(),style:{left:$.getStart(),width:$.getSize()},children:[B($.column.columnDef.header,$.getContext()),$.column.getIsSorted()?e(P,{className:"sort-icon",svg:$.column.getIsSorted()==="asc"?e(E.ArrowUpFilled,{}):e(E.ArrowDownFilled,{})}):null]})},$.id))},_.id))}),M?e(si,{projectName:f.name}):e("tbody",{children:Z.map(_=>e("tr",{onClick:()=>d(`traces/${_.original.context.traceId}`),children:_.getVisibleCells().map($=>e("td",{children:B($.column.columnDef.cell,$.getContext())},$.id))},_.id))})]})}),ne.length?e(ki,{selectedSpans:oe,onClearSelection:de}):null]})}const Ac=C`
|
|
2213
2213
|
flex: 1 1 auto;
|
|
2214
2214
|
display: flex;
|
|
2215
2215
|
flex-direction: column;
|
|
@@ -2235,7 +2235,7 @@ fragment TracesTable_spans_1XEuU on Project {
|
|
|
2235
2235
|
}
|
|
2236
2236
|
}
|
|
2237
2237
|
}
|
|
2238
|
-
`;function
|
|
2238
|
+
`;function Lm(){const{projectId:n}=je(),{timeRange:a}=oa();return e(u.Suspense,{fallback:e(se,{}),children:e(Ec,{projectId:n,timeRange:a})})}const Ii=Bt;function Ec({projectId:n,timeRange:a}){const l=u.useMemo(()=>({start:a.start.toISOString(),end:a.end.toISOString()}),[a]),t=T.useLazyLoadQuery(qt,{id:n,timeRange:l},{fetchPolicy:"store-and-network"}),[i,r,o]=T.useQueryLoader(Ii),c=u.useCallback(d=>{d===1?r({id:n,timeRange:l}):o()},[o,r,n,l]);return s("main",{css:Ac,children:[e(pc,{project:t.project,extra:s(h,{direction:"row",alignItems:"center",gap:"size-100",children:[e(Lc,{project:t.project}),e(Ll,{})]})}),s(ke,{onChange:c,children:[e(q,{name:"Traces",children:({isSelected:d})=>d&&e(el,{children:e(u.Suspense,{children:e(_c,{project:t.project})})})}),e(q,{name:"Spans",title:"Spans",children:({isSelected:d})=>d&&i&&e(el,{children:e(u.Suspense,{fallback:e(se,{}),children:e(wc,{queryReference:i})})})})]}),e(u.Suspense,{children:e(Ke,{})})]})}function wc({queryReference:n}){const a=T.usePreloadedQuery(Ii,n);return e(Tc,{project:a.project})}const Li=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],type:"Project",abstractKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"projectLoaderQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,t],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"projectLoaderQuery",selections:[{alias:"project",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,t],storageKey:null}]},params:{cacheID:"04c84b5bc2a01477851d347af75dcc11",id:null,metadata:{},name:"projectLoaderQuery",operationKind:"query",text:`query projectLoaderQuery(
|
|
2239
2239
|
$id: GlobalID!
|
|
2240
2240
|
) {
|
|
2241
2241
|
project: node(id: $id) {
|
|
@@ -2246,36 +2246,36 @@ fragment TracesTable_spans_1XEuU on Project {
|
|
|
2246
2246
|
}
|
|
2247
2247
|
}
|
|
2248
2248
|
}
|
|
2249
|
-
`}}}();Li.hash="3d31e323c06df38ec2eaa6f3adb55e79";async function
|
|
2249
|
+
`}}}();Li.hash="3d31e323c06df38ec2eaa6f3adb55e79";async function _m(n){const{projectId:a}=n.params;return await T.fetchQuery(Ie,Li,{id:a}).toPromise()}const Rc=C`
|
|
2250
2250
|
display: flex;
|
|
2251
2251
|
direction: row;
|
|
2252
2252
|
height: 100vh;
|
|
2253
2253
|
overflow: hidden;
|
|
2254
|
-
`,
|
|
2254
|
+
`,Pc=C`
|
|
2255
2255
|
display: flex;
|
|
2256
2256
|
flex-direction: column;
|
|
2257
2257
|
flex: 1 1 auto;
|
|
2258
2258
|
height: 100%;
|
|
2259
2259
|
overflow: hidden;
|
|
2260
2260
|
padding-left: var(--px-nav-collapsed-width);
|
|
2261
|
-
`,
|
|
2261
|
+
`,Mc=C`
|
|
2262
2262
|
flex: 1 1 auto;
|
|
2263
2263
|
display: flex;
|
|
2264
2264
|
flex-direction: column;
|
|
2265
2265
|
height: 100%;
|
|
2266
2266
|
overflow: hidden;
|
|
2267
|
-
`,
|
|
2267
|
+
`,Nc=C`
|
|
2268
2268
|
display: flex;
|
|
2269
2269
|
flex-direction: column;
|
|
2270
2270
|
margin: 0;
|
|
2271
2271
|
list-style: none;
|
|
2272
2272
|
gap: var(--ac-global-dimension-size-50);
|
|
2273
2273
|
padding-inline-start: 0;
|
|
2274
|
-
`,
|
|
2274
|
+
`,Vc=C`
|
|
2275
2275
|
display: flex;
|
|
2276
2276
|
flex-direction: column;
|
|
2277
2277
|
gap: var(--ac-global-dimension-size-50);
|
|
2278
|
-
`;function
|
|
2278
|
+
`;function Am(){return s("div",{css:Rc,"data-testid":"layout",children:[e($c,{}),s("div",{css:Pc,children:[e(bs,{children:e(ks,{})}),e("div",{"data-testid":"content",css:Mc,children:e(u.Suspense,{fallback:e(se,{}),children:e(Ke,{})})})]})]})}function $c(){const n=u.useMemo(()=>window.Config.hasInferences,[]),{authenticationEnabled:a}=$l();return s(Ks,{children:[e(Ss,{}),s(h,{direction:"column",justifyContent:"space-between",flex:"1 1 auto",children:[s("ul",{css:Vc,children:[n&&e("li",{children:e(fn,{to:"/model",text:"Model",icon:e(P,{svg:e(E.CubeOutline,{})})})}),e("li",{children:e(fn,{to:"/projects",text:"Projects",icon:e(P,{svg:e(E.GridOutline,{})})})}),e("li",{children:e(fn,{to:"/datasets",text:"Datasets",icon:e(P,{svg:e(E.DatabaseOutline,{})})})}),e("li",{children:e(fn,{to:"/apis",text:"APIs",icon:e(P,{svg:e(E.Code,{})})})})]}),s("ul",{css:Nc,children:[e("li",{children:e(fn,{to:"/settings",text:"Settings",icon:e(P,{svg:e(E.SettingsOutline,{})})})}),e("li",{children:e(vs,{})}),e("li",{children:e(Cs,{})}),e("li",{children:e(Fs,{})}),a&&e("li",{children:e(fn,{to:"/profile",text:"Profile",icon:e(P,{svg:e(E.PersonOutline,{})})})})]})]})]})}function Em(){const n=Pr(),a=u.useMemo(()=>n instanceof Error&&n.message==="Failed to fetch"?e(zc,{}):e(Qc,{error:n}),[n]);return e("main",{css:C`
|
|
2279
2279
|
width: 100%;
|
|
2280
2280
|
height: 100%;
|
|
2281
2281
|
display: flex;
|
|
@@ -2288,7 +2288,7 @@ fragment TracesTable_spans_1XEuU on Project {
|
|
|
2288
2288
|
margin-top: 200px;
|
|
2289
2289
|
display: flex;
|
|
2290
2290
|
flex-direction: column;
|
|
2291
|
-
`,children:a})})}function
|
|
2291
|
+
`,children:a})})}function zc(){return s(H,{children:[s(h,{direction:"column",width:"100%",alignItems:"center",children:[e(ua,{graphicKey:"not found"}),e("h1",{children:"Server disconnected"})]}),e("p",{children:"We are unable to reach the Phoenix server. Please ensure that Phoenix is running and try again."})]})}function Qc({error:n}){return s(H,{children:[s(h,{direction:"column",width:"100%",alignItems:"center",children:[e(ua,{graphicKey:"error"}),e("h1",{children:"Something went wrong"})]}),e("p",{children:"We strive to do our very best but 🐛 bugs happen. It would mean a lot to us if you could file a an issue. If you feel comfortable, please include the error details below in your issue. We will get back to you as soon as we can."}),e("p",{css:C`
|
|
2292
2292
|
display: flex;
|
|
2293
2293
|
flex-direction: row;
|
|
2294
2294
|
justify-content: flex-end;
|
|
@@ -2298,13 +2298,13 @@ fragment TracesTable_spans_1XEuU on Project {
|
|
|
2298
2298
|
flex-direction: row;
|
|
2299
2299
|
align-items: baseline;
|
|
2300
2300
|
gap: 0.2em;
|
|
2301
|
-
`,children:["💙 the",e(
|
|
2301
|
+
`,children:["💙 the",e(dn,{href:"mailto:phoenix-devs@arize.com",children:"phoenix team"})]})}),s("div",{css:C`
|
|
2302
2302
|
display: flex;
|
|
2303
2303
|
flex-direction: row;
|
|
2304
2304
|
justify-content: flex-end;
|
|
2305
2305
|
align-items: center;
|
|
2306
2306
|
gap: var(--px-spacing-med);
|
|
2307
|
-
`,children:[e(
|
|
2307
|
+
`,children:[e(dn,{href:"https://github.com/Arize-ai/phoenix/issues/new?assignees=&labels=bug&template=bug_report.md&title=%5BBUG%5D",children:"file an issue with us"}),e(N,{variant:"primary",size:"compact",onClick:()=>{window.location.href="/"},children:"Return Home"})]}),s("details",{open:!0,children:[e("summary",{children:"error details"}),e("pre",{css:C`
|
|
2308
2308
|
white-space: pre-wrap;
|
|
2309
2309
|
overflow-wrap: break-word;
|
|
2310
2310
|
overflow: hidden;
|
|
@@ -2329,7 +2329,7 @@ fragment TracesTable_spans_1XEuU on Project {
|
|
|
2329
2329
|
}
|
|
2330
2330
|
}
|
|
2331
2331
|
}
|
|
2332
|
-
`}}}();_i.hash="b73d8f3f532a0c6f88863f3c6dd5734f";const
|
|
2332
|
+
`}}}();_i.hash="b73d8f3f532a0c6f88863f3c6dd5734f";const Oc=_i;function wm(){const n=T.useLazyLoadQuery(Oc,{}),{model:{primaryInferences:a,referenceInferences:l,corpusInferences:t}}=n;return e(Ds,{primaryInferences:a,referenceInferences:l??null,corpusInferences:t??null,children:e(xs,{timeRangeBounds:{start:new Date(a.startTime),end:new Date(a.endTime)},children:e(Ke,{})})})}function Rm(){return e(yc,{children:e(dc,{children:e(Ke,{})})})}function Pm(){return e(Ts,{children:e(Ke,{})})}const Ai=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:50,kind:"LocalArgument",name:"first"},{defaultValue:null,kind:"LocalArgument",name:"timeRange"}],a=[{kind:"Variable",name:"after",variableName:"after"},{kind:"Variable",name:"first",variableName:"first"}],l={kind:"Variable",name:"timeRange",variableName:"timeRange"},t=[l];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ProjectsPageProjectsQuery",selections:[{args:a,kind:"FragmentSpread",name:"ProjectsPageProjectsFragment"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ProjectsPageProjectsQuery",selections:[{alias:null,args:a,concreteType:"ProjectConnection",kind:"LinkedField",name:"projects",plural:!1,selections:[{alias:null,args:null,concreteType:"ProjectEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"project",args:null,concreteType:"Project",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"gradientStartColor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"gradientEndColor",storageKey:null},{alias:null,args:t,kind:"ScalarField",name:"traceCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},{alias:"latencyMsP50",args:[{kind:"Literal",name:"probability",value:.5},l],kind:"ScalarField",name:"latencyMsQuantile",storageKey:null},{alias:null,args:t,kind:"ScalarField",name:"tokenCountTotal",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Project",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},{alias:null,args:a,filters:null,handle:"connection",key:"ProjectsPage_projects",kind:"LinkedHandle",name:"projects"}]},params:{cacheID:"ead527a5c3ddda0f6c906c99183edf06",id:null,metadata:{},name:"ProjectsPageProjectsQuery",operationKind:"query",text:`query ProjectsPageProjectsQuery(
|
|
2333
2333
|
$after: String = null
|
|
2334
2334
|
$first: Int = 50
|
|
2335
2335
|
$timeRange: TimeRange
|
|
@@ -2391,7 +2391,7 @@ fragment ProjectsPageProjectsFragment on Query {
|
|
|
2391
2391
|
}
|
|
2392
2392
|
}
|
|
2393
2393
|
}
|
|
2394
|
-
`}}}();wi.hash="c28f5ced0b3ec4b3b8277d0aac29de2d";const
|
|
2394
|
+
`}}}();wi.hash="c28f5ced0b3ec4b3b8277d0aac29de2d";const jc="https://docs.arize.com/phoenix/tracing/how-to-tracing/setup-tracing";function qc(){const[n,a]=u.useState(null);return s("div",{children:[e(N,{variant:"default",icon:e(P,{svg:e(E.GridOutline,{})}),onClick:()=>{a(e(Bc,{}))},children:"New Project"}),e(U,{isDismissable:!0,type:"slideOver",onDismiss:()=>a(null),children:n})]})}function Bc(){const[n,a]=u.useState("Python");return e(j,{title:"Create a New Project",size:"L",children:s(x,{padding:"size-400",overflow:"auto",children:[e(x,{paddingBottom:"size-200",children:e(Dl,{language:n,onChange:a})}),e(x,{paddingBottom:"size-100",children:s(F,{children:["Projects are created when you log your first trace via OpenTelemetry. See the"," ",e(dn,{href:jc,children:"documentation"})," ","for a complete guide."]})}),n==="Python"?e(Tl,{}):e(Il,{})]})})}const Ri=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"Query",kind:"LinkedField",name:"clearProject",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ProjectActionMenuClearMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ProjectActionMenuClearMutation",selections:a},params:{cacheID:"63319b4e42b499db2447817f1dc821fb",id:null,metadata:{},name:"ProjectActionMenuClearMutation",operationKind:"mutation",text:`mutation ProjectActionMenuClearMutation(
|
|
2395
2395
|
$input: ClearProjectInput!
|
|
2396
2396
|
) {
|
|
2397
2397
|
clearProject(input: $input) {
|
|
@@ -2412,19 +2412,19 @@ fragment ProjectsPageProjectsFragment on Query {
|
|
|
2412
2412
|
__typename
|
|
2413
2413
|
}
|
|
2414
2414
|
}
|
|
2415
|
-
`}}}();Mi.hash="212501fe2d6367ec1503bd7a00c1730f";function
|
|
2415
|
+
`}}}();Mi.hash="212501fe2d6367ec1503bd7a00c1730f";function Hc(n){const{projectId:a}=n,l=u.useRef(null),[t,i]=T.useMutation(Mi),{control:r,handleSubmit:o,setError:c,formState:{isValid:d}}=qe({defaultValues:{endDate:new Date(Date.now()-Is).toISOString().slice(0,16)}}),m=u.useCallback(f=>{const g=cl(f.endDate);if(!ul(g))return c("endDate",{message:"Date is not in a valid format"});t({variables:{input:{id:a,endTime:new Date(g).toISOString()}},onCompleted:()=>{n.onComplete()},onError:p=>{alert("Failed to clear project traces: "+p)}})},[t,a,n,c]);return s("form",{onSubmit:o(m),ref:l,children:[s(x,{padding:"size-200",children:[e(F,{color:"danger",children:"You are about to remove all data before the following date. This cannot be undone."}),e(G,{name:"endDate",control:r,rules:{required:"field is required"},render:({field:{name:f,onChange:g,onBlur:p,value:y},fieldState:{invalid:k,error:v}})=>e(le,{label:"End Date",type:"datetime-local",name:f,description:"The date up to which you want to remove data",errorMessage:v==null?void 0:v.message,validationState:k?"invalid":"valid",onChange:g,onBlur:p,defaultValue:y})})]}),e(x,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(h,{direction:"row",justifyContent:"end",children:e(N,{type:"submit",variant:"danger",isDisabled:!d,size:"compact",loading:i,onClick:()=>{var f;(f=l.current)==null||f.requestSubmit()},children:i?"Removing...":"Remove Data"})})})]})}function Gc({projectId:n,projectName:a,onProjectDelete:l,onProjectClear:t,onProjectRemoveData:i}){const[r,o]=u.useState(null),c=a!=="default",[d]=T.useMutation(Pi),[m]=T.useMutation(Ri),f=u.useCallback(()=>{u.startTransition(()=>{d({variables:{projectId:n}}),l()})},[d,n,l]),g=u.useCallback(()=>{u.startTransition(()=>{m({variables:{input:{id:n}},onCompleted:()=>{t()},onError:v=>{alert("Failed to clear project: "+v)}})})},[m,n,t]),p=u.useCallback(()=>{o(s(j,{size:"S",title:"Delete Project",children:[e(x,{padding:"size-200",children:e(F,{color:"danger",children:`Are you sure you want to delete project ${a}? This cannot be undone.`})}),e(x,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(h,{direction:"row",justifyContent:"end",children:e(N,{variant:"danger",onClick:()=>{f(),o(null)},children:"Delete Project"})})})]}))},[f,a]),y=u.useCallback(()=>{o(s(j,{size:"S",title:"Clear Project",children:[e(x,{padding:"size-200",children:e(F,{color:"danger",children:`Are you sure you want to clear project ${a}? All traces and evaluations for this project will be deleted. This cannot be undone.`})}),e(x,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(h,{direction:"row",justifyContent:"end",children:e(N,{variant:"danger",onClick:()=>{g(),o(null)},children:"Clear"})})})]}))},[g,a]),k=u.useCallback(()=>{o(e(j,{size:"M",title:"Remove Data",children:e(Hc,{projectId:n,onComplete:()=>{i(),o(null)}})}))},[i,n]);return s("div",{onClick:v=>{v.preventDefault(),v.stopPropagation()},children:[s(Ue,{buttonVariant:"quiet",align:"end",onAction:v=>{switch(v){case"deleteProject":return p();case"clearProject":return y();case"removeProjectData":return k()}},disabledKeys:c?[]:["deleteProject"],children:[e(J,{textValue:"Clear Traces",children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(P,{svg:e(E.Refresh,{})}),e(F,{children:"Clear Data"})]})},"clearProject"),e(J,{textValue:"Remove Data",children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(P,{svg:e(E.CloseCircleOutline,{})}),e(F,{children:"Remove Data"})]})},"removeProjectData"),c?e(J,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(P,{svg:e(E.TrashOutline,{})}),e(F,{children:"Delete"})]})},"deleteProject"):null]}),e(U,{type:"modal",isDismissable:!0,onDismiss:()=>o(null),children:r})]})}function Uc(){const n=un(l=>l.projectsAutoRefreshEnabled),a=un(l=>l.setProjectAutoRefreshEnabled);return e(ca,{labelPlacement:"start",isSelected:n,onChange:()=>{a(!n)},children:"Auto-Refresh"})}const Wc=1e4,Jc=50;function Mm(){const{timeRange:n}=oa();return e(u.Suspense,{fallback:e(se,{}),children:e(Zc,{timeRange:n})})}function Zc({timeRange:n}){const a=un(S=>S.projectsAutoRefreshEnabled),[l,t]=Vs(),i=u.useMemo(()=>({start:n.start.toISOString(),end:n.end.toISOString()}),[n]),r=T.useLazyLoadQuery(wi,{timeRange:i}),{data:o,loadNext:c,hasNext:d,isLoadingNext:m,refetch:f}=T.usePaginationFragment(Ei,r),g=o.projects.edges.map(S=>S.project),p=u.useRef(null),y=u.useCallback(S=>{if(S){const{scrollHeight:L,scrollTop:I,clientHeight:A}=S;L-I-A<300&&!m&&d&&c(Jc)}},[d,m,c]);Ki(()=>{u.startTransition(()=>{f({},{fetchPolicy:"store-and-network"})})},a?Wc:null);const k=u.useCallback(S=>{u.startTransition(()=>{f({},{fetchPolicy:"store-and-network"}),l({variant:"success",title:"Project Deleted",message:`Project ${S} has been deleted.`})})},[l,f]),v=u.useCallback(S=>{u.startTransition(()=>{f({},{fetchPolicy:"store-and-network"}),l({variant:"success",title:"Project Cleared",message:`Project ${S} has been cleared of traces.`})})},[l,f]),b=u.useCallback(S=>{u.startTransition(()=>{f({},{fetchPolicy:"store-and-network"}),l({variant:"success",title:"Project Data Removed",message:`Old data from project ${S} have been removed.`})})},[l,f]);return s("div",{css:C`
|
|
2416
2416
|
flex: 1 1 auto;
|
|
2417
2417
|
overflow-y: auto;
|
|
2418
2418
|
overflow-x: hidden;
|
|
2419
2419
|
padding-bottom: var(--ac-global-dimension-size-750);
|
|
2420
|
-
`,onScroll:S=>
|
|
2420
|
+
`,onScroll:S=>y(S.target),ref:p,children:[e(x,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",width:"100%",borderBottomColor:"grey-200",borderBottomWidth:"thin",children:s(h,{direction:"row",justifyContent:"end",alignItems:"center",gap:"size-100",children:[e(Uc,{}),e(qc,{}),e(Ll,{})]})}),e(x,{padding:"size-200",width:"100%",children:e("ul",{css:C`
|
|
2421
2421
|
display: flex;
|
|
2422
2422
|
flex-direction: row;
|
|
2423
2423
|
gap: var(--ac-global-dimension-size-200);
|
|
2424
2424
|
flex-wrap: wrap;
|
|
2425
2425
|
`,children:g.map(S=>e("li",{children:e(wn,{to:`/projects/${S.id}`,css:C`
|
|
2426
2426
|
text-decoration: none;
|
|
2427
|
-
`,children:e(
|
|
2427
|
+
`,children:e(Yc,{project:S,onProjectDelete:()=>k(S.name),onProjectClear:()=>v(S.name),onProjectRemoveData:()=>b(S.name)})})},S.id))})}),t]})}function Xc({gradientStartColor:n,gradientEndColor:a}){return e("div",{css:C`
|
|
2428
2428
|
border-radius: 50%;
|
|
2429
2429
|
width: 32px;
|
|
2430
2430
|
height: 32px;
|
|
@@ -2434,7 +2434,7 @@ fragment ProjectsPageProjectsFragment on Query {
|
|
|
2434
2434
|
${a} 84.38%
|
|
2435
2435
|
);
|
|
2436
2436
|
flex-shrink: 0;
|
|
2437
|
-
`})}function
|
|
2437
|
+
`})}function Yc({project:n,onProjectDelete:a,onProjectClear:l,onProjectRemoveData:t}){const{endTime:i,traceCount:r,tokenCountTotal:o,latencyMsP50:c,gradientStartColor:d,gradientEndColor:m}=n,f=u.useMemo(()=>i?`Last updated ${Mr(new Date(i),new Date,{addSuffix:!0})}`:"No traces uploaded yet.",[i]);return s("div",{css:C`
|
|
2438
2438
|
padding: var(--ac-global-dimension-size-200);
|
|
2439
2439
|
border: 1px solid var(--ac-global-color-grey-400);
|
|
2440
2440
|
background-color: var(--ac-global-color-grey-100);
|
|
@@ -2448,11 +2448,11 @@ fragment ProjectsPageProjectsFragment on Query {
|
|
|
2448
2448
|
display: flex;
|
|
2449
2449
|
flex-direction: column;
|
|
2450
2450
|
justify-content: space-between;
|
|
2451
|
-
`,children:[s(h,{direction:"row",justifyContent:"space-between",alignItems:"start",children:[s(h,{direction:"row",gap:"size-100",alignItems:"center",minWidth:0,children:[e(
|
|
2451
|
+
`,children:[s(h,{direction:"row",justifyContent:"space-between",alignItems:"start",children:[s(h,{direction:"row",gap:"size-100",alignItems:"center",minWidth:0,children:[e(Xc,{gradientStartColor:d,gradientEndColor:m}),s(h,{direction:"column",minWidth:0,children:[e(te,{level:2,css:C`
|
|
2452
2452
|
overflow: hidden;
|
|
2453
2453
|
white-space: nowrap;
|
|
2454
2454
|
text-overflow: ellipsis;
|
|
2455
|
-
`,children:n.name}),e(F,{color:"text-700",textSize:"small",fontStyle:"italic",children:
|
|
2455
|
+
`,children:n.name}),e(F,{color:"text-700",textSize:"small",fontStyle:"italic",children:f})]})]}),e(Gc,{projectId:n.id,projectName:n.name,onProjectDelete:a,onProjectClear:l,onProjectRemoveData:t})]}),s(h,{direction:"row",justifyContent:"space-between",children:[s(h,{direction:"column",flex:"none",children:[e(F,{elementType:"h3",textSize:"medium",color:"text-700",children:"Total Traces"}),e(F,{textSize:"xlarge",children:cn(r)})]}),s(h,{direction:"column",flex:"none",children:[e(F,{elementType:"h3",textSize:"medium",color:"text-700",children:"Total Tokens"}),e(F,{textSize:"xlarge",children:cn(o)})]}),s(h,{direction:"column",flex:"none",children:[e(F,{elementType:"h3",textSize:"medium",color:"text-700",children:"Latency P50"}),c!=null?e(xe,{latencyMs:c,textSize:"xlarge"}):e(F,{textSize:"xlarge",children:"--"})]})]})]})}const Ni=function(){var n=[{kind:"Literal",name:"first",value:100},{kind:"Literal",name:"sort",value:{col:"createdAt",dir:"desc"}}];return{fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"DatasetsPageQuery",selections:[{args:null,kind:"FragmentSpread",name:"DatasetsTable_datasets"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"DatasetsPageQuery",selections:[{alias:null,args:n,concreteType:"DatasetConnection",kind:"LinkedField",name:"datasets",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"Dataset",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"exampleCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"experimentCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",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:'datasets(first:100,sort:{"col":"createdAt","dir":"desc"})'},{alias:null,args:n,filters:["sort"],handle:"connection",key:"DatasetsTable_datasets",kind:"LinkedHandle",name:"datasets"}]},params:{cacheID:"695b221e981c4795492d79faa7d007e4",id:null,metadata:{},name:"DatasetsPageQuery",operationKind:"query",text:`query DatasetsPageQuery {
|
|
2456
2456
|
...DatasetsTable_datasets
|
|
2457
2457
|
}
|
|
2458
2458
|
|
|
@@ -2477,13 +2477,13 @@ fragment DatasetsTable_datasets on Query {
|
|
|
2477
2477
|
}
|
|
2478
2478
|
}
|
|
2479
2479
|
}
|
|
2480
|
-
`}}}();Ni.hash="985853a7939f44c0cefdd1a91472c67e";function
|
|
2481
|
-
`);return a.length>0?a[0].split(",").map(l=>l.trim()):[]}function
|
|
2480
|
+
`}}}();Ni.hash="985853a7939f44c0cefdd1a91472c67e";function eu(n){const a=n.split(`
|
|
2481
|
+
`);return a.length>0?a[0].split(",").map(l=>l.trim()):[]}function nu(n){const{onDatasetCreated:a,onDatasetCreateError:l}=n,[t,i]=u.useState([]),{control:r,handleSubmit:o,resetField:c,formState:{isDirty:d,isValid:m}}=qe({defaultValues:{name:"Dataset "+new Date().toISOString(),input_keys:[],output_keys:[],metadata_keys:[],description:"",metadata:{}}}),f=u.useCallback(g=>{const p=new FormData;return p.append("file",g.file[0]),p.append("name",g.name),p.append("description",g.description),p.append("metadata",JSON.stringify(g.metadata)),g.input_keys.forEach(y=>{p.append("input_keys[]",y)}),g.output_keys.forEach(y=>{p.append("output_keys[]",y)}),g.metadata_keys.forEach(y=>{p.append("metadata_keys[]",y)}),fetch("/v1/datasets/upload?sync=true",{method:"POST",body:p}).then(y=>{if(!y.ok)throw l(new Error(y.statusText||"Failed to create dataset"));return y.json()}).then(y=>{a({name:g.name,id:y.data.dataset_id})})},[l,a]);return s(mn,{onSubmit:o(f),children:[s("div",{css:C`
|
|
2482
2482
|
padding: var(--ac-global-dimension-size-200);
|
|
2483
2483
|
.ac-dropdown-button {
|
|
2484
2484
|
width: 100%;
|
|
2485
2485
|
}
|
|
2486
|
-
`,children:[e(
|
|
2486
|
+
`,children:[e(G,{name:"name",control:r,rules:{required:"field is required"},render:({field:{onChange:g,onBlur:p,value:y},fieldState:{invalid:k,error:v}})=>e(le,{label:"Dataset Name",description:"The name of the dataset",errorMessage:v==null?void 0:v.message,validationState:k?"invalid":"valid",onChange:g,onBlur:p,value:y.toString()})}),e(G,{name:"description",control:r,render:({field:{onChange:g,onBlur:p,value:y},fieldState:{invalid:k,error:v}})=>e(Zn,{label:"description",placeholder:"Description of the dataset",isRequired:!1,height:100,errorMessage:v==null?void 0:v.message,validationState:k?"invalid":"valid",onChange:g,onBlur:p,value:y.toString()})}),e(G,{control:r,name:"file",rules:{required:"CSV file is required"},render:({field:{value:g,onChange:p,...y},fieldState:{invalid:k,error:v}})=>e(ma,{label:"CSV file",validationState:k?"invalid":"valid",errorMessage:v==null?void 0:v.message,children:e("input",{...y,onChange:b=>{var L;p(b.target.files),c("input_keys"),c("output_keys"),c("metadata_keys");const S=(L=b.target.files)==null?void 0:L[0];if(S){const I=new FileReader;I.onload=function(A){if(!A.target)return;const K=A.target.result,D=eu(K);i(D)},I.readAsText(S)}},type:"file",id:"file",accept:".csv"})})}),e(G,{name:"input_keys",control:r,rules:{required:"field is required"},render:({field:{value:g,onChange:p},fieldState:{invalid:y,error:k}})=>e(va,{label:"input keys",validationState:y?"invalid":"valid",description:"the columns to use as input",columns:t,selectedColumns:g,onChange:p,errorMessage:k==null?void 0:k.message})}),e(G,{name:"output_keys",control:r,render:({field:{value:g,onChange:p},fieldState:{invalid:y,error:k}})=>e(va,{label:"output keys",validationState:y?"invalid":"valid",description:"the columns to use as output",columns:t,selectedColumns:g,onChange:p,errorMessage:k==null?void 0:k.message})}),e(G,{name:"metadata_keys",control:r,render:({field:{value:g,onChange:p},fieldState:{invalid:y,error:k}})=>e(va,{label:"metadata keys",validationState:y?"invalid":"valid",description:"the columns to use as metadata",columns:t,selectedColumns:g,onChange:p,errorMessage:k==null?void 0:k.message})})]}),e(x,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(h,{direction:"row",justifyContent:"end",children:e(N,{type:"submit",isDisabled:!m,variant:d?"primary":"default",size:"compact",loading:!1,children:"Create Dataset"})})})]})}function va(n){const{columns:a,selectedColumns:l,onChange:t,label:i,validationState:r,description:o,errorMessage:c,...d}=n,m=a.length===0,f=u.useMemo(()=>m?"No columns to select":l.length>0?`${l.join(", ")}`:"No columns selected",[l,m]);return e(ma,{label:i,isDisabled:m,validationState:r,description:o,errorMessage:c,children:e(za,{isDisabled:m,...d,menu:e(Wn,{selectionMode:"multiple",onSelectionChange:g=>{t(Array.from(g))},selectedKeys:new Set(l),children:a.map(g=>e(J,{children:g},g))}),triggerProps:{placement:"bottom end"},children:f})})}const Vi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"},{defaultValue:{col:"createdAt",dir:"desc"},kind:"LocalArgument",name:"sort"}],a=[{kind:"Variable",name:"after",variableName:"after"},{kind:"Variable",name:"first",variableName:"first"},{kind:"Variable",name:"sort",variableName:"sort"}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"DatasetsTableDatasetsQuery",selections:[{args:a,kind:"FragmentSpread",name:"DatasetsTable_datasets"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"DatasetsTableDatasetsQuery",selections:[{alias:null,args:a,concreteType:"DatasetConnection",kind:"LinkedField",name:"datasets",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"Dataset",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"exampleCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"experimentCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",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},{alias:null,args:a,filters:["sort"],handle:"connection",key:"DatasetsTable_datasets",kind:"LinkedHandle",name:"datasets"}]},params:{cacheID:"5ac1688f54e51f9bb3247c83e23d98fb",id:null,metadata:{},name:"DatasetsTableDatasetsQuery",operationKind:"query",text:`query DatasetsTableDatasetsQuery(
|
|
2487
2487
|
$after: String = null
|
|
2488
2488
|
$first: Int = 100
|
|
2489
2489
|
$sort: DatasetSort = {col: createdAt, dir: desc}
|
|
@@ -2519,10 +2519,10 @@ fragment DatasetsTable_datasets_dWkdd on Query {
|
|
|
2519
2519
|
__typename
|
|
2520
2520
|
}
|
|
2521
2521
|
}
|
|
2522
|
-
`}}}();zi.hash="7066cca7015a7e344b77862b0bdab21c";function
|
|
2522
|
+
`}}}();zi.hash="7066cca7015a7e344b77862b0bdab21c";function au({datasetId:n,datasetName:a,onDatasetDelete:l,onDatasetDeleteError:t}){const[i,r]=T.useMutation(zi),o=u.useCallback(()=>{u.startTransition(()=>{i({variables:{datasetId:n},onCompleted:()=>{l()},onError:c=>{t(c)}})})},[i,n,l,t]);return s(j,{size:"S",title:"Delete Dataset",children:[e(x,{padding:"size-200",children:e(F,{color:"danger",children:`Are you sure you want to delete dataset ${a}? This will also delete all associated experiments and traces, and it cannot be undone.`})}),e(x,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(h,{direction:"row",justifyContent:"end",children:e(N,{variant:"danger",onClick:()=>{o()},disabled:r,loading:r,children:"Delete Dataset"})})})]})}function lu({datasetName:n,datasetId:a,datasetDescription:l,datasetMetadata:t,onDatasetEdited:i,onDatasetEditError:r}){return e(j,{title:"Edit Dataset",size:"M",children:e(Ls,{datasetName:n,datasetId:a,datasetDescription:l,datasetMetadata:t,onDatasetEdited:i,onDatasetEditError:r})})}function tu(n){const{datasetId:a,datasetName:l,datasetDescription:t,datasetMetadata:i,onDatasetDelete:r,onDatasetDeleteError:o,onDatasetEdit:c,onDatasetEditError:d}=n,[m,f]=u.useState(null),g=u.useCallback(()=>{f(e(au,{datasetId:a,datasetName:l,onDatasetDelete:()=>{r(),f(null)},onDatasetDeleteError:o}))},[a,l,r,o]),p=u.useCallback(()=>{f(e(lu,{datasetId:a,datasetName:l,datasetDescription:t,datasetMetadata:i,onDatasetEdited:()=>{c(),f(null)},onDatasetEditError:d}))},[t,a,i,l,c,d]);return s("div",{onClick:y=>{y.preventDefault(),y.stopPropagation()},children:[s(Ue,{align:"end",buttonSize:"compact",onAction:y=>{switch(y){case"deleteDataset":g();break;case"editDataset":p();break}},children:[e(J,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(P,{svg:e(E.TrashOutline,{})}),e(F,{children:"Delete"})]})},"deleteDataset"),e(J,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(P,{svg:e(E.Edit2Outline,{})}),e(F,{children:"Edit"})]})},"editDataset")]}),e(U,{type:"modal",isDismissable:!0,onDismiss:()=>f(null),children:m})]})}const ll=100;function iu(n){const a=n.id;if(a!=="createdAt"&&a!=="name")throw new Error("Invalid sort column");return{col:a,dir:n.desc?"desc":"asc"}}function ru(n){const[a,l]=u.useState([]),t=u.useRef(null),i=ae(),r=ge(),o=An(),{data:c,loadNext:d,hasNext:m,isLoadingNext:f,refetch:g}=T.usePaginationFragment($i,n.query),p=u.useMemo(()=>c.datasets.edges.map(S=>S.node),[c]),y=Te.useCallback(S=>{if(S){const{scrollHeight:L,scrollTop:I,clientHeight:A}=S;L-I-A<300&&!f&&m&&d(ll)}},[m,f,d]),k=ue({columns:[{header:"name",accessorKey:"name",cell:({row:S})=>{const I=S.original.experimentCount>0?`${S.original.id}/experiments`:`${S.original.id}/examples`;return e(wn,{to:I,children:S.original.name})}},{header:"description",accessorKey:"description",enableSorting:!1},{header:"created at",accessorKey:"createdAt",cell:ve},{header:"example count",accessorKey:"exampleCount",enableSorting:!1,meta:{textAlign:"right"}},{header:"experiment count",accessorKey:"experimentCount",enableSorting:!1,meta:{textAlign:"right"}},{header:"metadata",accessorKey:"metadata",enableSorting:!1,cell:Fn},{header:"",id:"actions",enableSorting:!1,size:10,cell:({row:S})=>e(tu,{datasetId:S.original.id,datasetName:S.original.name,datasetDescription:S.original.description,datasetMetadata:S.original.metadata,onDatasetEdit:()=>{r({title:"Dataset updated",message:`${S.original.name} has been successfully updated.`}),g({},{fetchPolicy:"store-and-network"})},onDatasetEditError:L=>{o({title:"Dataset update failed",message:L.message})},onDatasetDelete:()=>{r({title:"Dataset deleted",message:`${S.original.name} has been successfully deleted.`}),g({},{fetchPolicy:"store-and-network"})},onDatasetDeleteError:L=>{o({title:"Dataset deletion failed",message:L.message})}})}],data:p,state:{sorting:a},getCoreRowModel:me(),getSortedRowModel:Dn(),onSortingChange:l,manualSorting:!0});u.useEffect(()=>{const S=a[0];u.startTransition(()=>{g({sort:S?iu(S):{col:"createdAt",dir:"desc"},after:null,first:ll},{fetchPolicy:"store-and-network"})})},[a,g]);const v=k.getRowModel().rows,b=v.length===0;return e("div",{css:C`
|
|
2523
2523
|
flex: 1 1 auto;
|
|
2524
2524
|
overflow: auto;
|
|
2525
|
-
`,onScroll:S=>
|
|
2525
|
+
`,onScroll:S=>y(S.target),ref:t,children:s("table",{css:En,children:[e("thead",{children:k.getHeaderGroups().map(S=>e("tr",{children:S.headers.map(L=>{var I;return e("th",{colSpan:L.colSpan,children:L.isPlaceholder?null:s("div",{className:L.column.getCanSort()?"cursor-pointer":"",onClick:L.column.getToggleSortingHandler(),style:{textAlign:(I=L.column.columnDef.meta)==null?void 0:I.textAlign},children:[B(L.column.columnDef.header,L.getContext()),L.column.getIsSorted()?e(P,{className:"sort-icon",svg:L.column.getIsSorted()==="asc"?e(E.ArrowUpFilled,{}):e(E.ArrowDownFilled,{})}):null]})},L.id)})},S.id))}),b?e(Ge,{}):e("tbody",{children:v.map(S=>e("tr",{onClick:()=>{const I=S.original.experimentCount>0?`${S.original.id}/experiments`:`${S.original.id}/examples`;i(I)},children:S.getVisibleCells().map(L=>{var I;return e("td",{align:(I=L.column.columnDef.meta)==null?void 0:I.textAlign,children:B(L.column.columnDef.cell,L.getContext())},L.id)})},S.id))})]})})}function Nm(){return e(u.Suspense,{fallback:e(se,{}),children:e(su,{})})}function su(){const[n,a]=u.useState(0),l=T.useLazyLoadQuery(Ni,{},{fetchKey:n,fetchPolicy:"store-and-network"}),t=u.useCallback(()=>{a(i=>i+1)},[a]);return s(h,{direction:"column",height:"100%",children:[e(x,{padding:"size-200",borderBottomWidth:"thin",borderBottomColor:"dark",flex:"none",children:s(h,{direction:"row",justifyContent:"space-between",children:[e(te,{level:1,children:"Datasets"}),e(ou,{onDatasetCreated:t})]})}),e(ru,{query:l})]})}function ou({onDatasetCreated:n}){const a=ae(),l=ge(),t=An(),[i,r]=u.useState(null),o=()=>{r(e(j,{size:"S",title:"New Dataset",children:e(Pa,{onDatasetCreated:d=>{l({title:"Dataset created",message:`${d.name} has been successfully created.`,action:{text:"Go to Dataset",onClick:()=>{a(`/datasets/${d.id}`)}}}),r(null),n()},onDatasetCreateError:d=>{t({title:"Dataset creation failed",message:d.message})}})}))},c=()=>{r(e(j,{size:"M",title:"New Dataset from CSV",children:e(nu,{onDatasetCreated:d=>{l({title:"Dataset created",message:`${d.name} has been successfully created.`,action:{text:"Go to Dataset",onClick:()=>{a(`/datasets/${d.id}`)}}}),r(null),n()},onDatasetCreateError:d=>{t({title:"Dataset creation failed",message:d.message})}})}))};return s(H,{children:[s(Ue,{buttonText:"Create Dataset",align:"end",icon:e(P,{svg:e(E.DatabaseOutline,{})}),onAction:d=>{switch(d){case"newDataset":o();break;case"datasetFromCSV":c();break}},children:[e(J,{children:"New Dataset"},"newDataset"),e(J,{children:"Dataset from CSV"},"datasetFromCSV")]}),e(U,{type:"modal",isDismissable:!0,onDismiss:()=>r(null),children:i})]})}const Qi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"datasetId"}],a=[{kind:"Variable",name:"id",variableName:"datasetId"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={kind:"InlineFragment",selections:[{alias:"latestVersions",args:[{kind:"Literal",name:"first",value:1},{kind:"Literal",name:"sort",value:{col:"createdAt",dir:"desc"}}],concreteType:"DatasetVersionConnection",kind:"LinkedField",name:"versions",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetVersionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"version",args:null,concreteType:"DatasetVersion",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:'versions(first:1,sort:{"col":"createdAt","dir":"desc"})'}],type:"Dataset",abstractKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"datasetStore_latestVersionQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,t],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"datasetStore_latestVersionQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,t],storageKey:null}]},params:{cacheID:"d7075240e4dae8871997e57616c05302",id:null,metadata:{},name:"datasetStore_latestVersionQuery",operationKind:"query",text:`query datasetStore_latestVersionQuery(
|
|
2526
2526
|
$datasetId: GlobalID!
|
|
2527
2527
|
) {
|
|
2528
2528
|
dataset: node(id: $datasetId) {
|
|
@@ -2541,17 +2541,17 @@ fragment DatasetsTable_datasets_dWkdd on Query {
|
|
|
2541
2541
|
}
|
|
2542
2542
|
}
|
|
2543
2543
|
}
|
|
2544
|
-
`}}}();Qi.hash="a1349b92d8b0c745f5e8039c55b048c7";const
|
|
2544
|
+
`}}}();Qi.hash="a1349b92d8b0c745f5e8039c55b048c7";const du=n=>{const a=(l,t)=>({...n,isRefreshingLatestVersion:!1,refreshLatestVersion:async()=>{const i=t();l({isRefreshingLatestVersion:!0});const r=await cu({datasetId:i.datasetId});l({latestVersion:r,isRefreshingLatestVersion:!1})}});return Nr()(Vr(a))};async function cu({datasetId:n}){var i;const a=await T.fetchQuery(Ie,Qi,{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 Oi=u.createContext(null);function uu({children:n,...a}){const l=u.useRef();return l.current||(l.current=du(a)),e(Oi.Provider,{value:l.current,children:n})}function gn(n,a){const l=u.useContext(Oi);if(!l)throw new Error("Missing DatasetContext.Provider in the tree");return dl(l,n,a)}const ji=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) {
|
|
2548
2548
|
__typename
|
|
2549
2549
|
}
|
|
2550
2550
|
}
|
|
2551
|
-
`}}}();ji.hash="8d99470f590cd5d28701fa6e3c0330e6";const Ca={backgroundColor:"light",borderColor:"light",collapsible:!0,bodyStyle:{padding:0}};function
|
|
2551
|
+
`}}}();ji.hash="8d99470f590cd5d28701fa6e3c0330e6";const Ca={backgroundColor:"light",borderColor:"light",collapsible:!0,bodyStyle:{padding:0}};function mu(n){const{datasetId:a,onCompleted:l}=n,[t,i]=u.useState(null),[r,o]=T.useMutation(ji),{control:c,setError:d,handleSubmit:m,formState:{isValid:f}}=qe({defaultValues:{input:"{}",output:"{}",metadata:"{}"}}),g=u.useCallback(p=>{if(i(null),!Ee(p==null?void 0:p.input))return d("input",{message:"Input must be a valid JSON object"});if(!Ee(p==null?void 0:p.output))return d("output",{message:"Output must be a valid JSON object"});if(!Ee(p==null?void 0:p.metadata))return d("metadata",{message:"Metadata must be a valid JSON object"});r({variables:{input:{datasetId:a,examples:[{input:JSON.parse(p.input),output:JSON.parse(p.output),metadata:JSON.parse(p.metadata)}],datasetVersionDescription:p.description}},onCompleted:()=>{l()},onError:y=>{i(y.message)}})},[r,a,d,l]);return s(j,{size:"L",title:"Add Example",children:[e("div",{css:C`
|
|
2552
2552
|
overflow-y: auto;
|
|
2553
2553
|
padding: var(--ac-global-dimension-size-400);
|
|
2554
|
-
`,children:e(h,{direction:"row",justifyContent:"center",children:e(x,{width:"900px",paddingStart:"auto",paddingEnd:"auto",children:s(h,{direction:"column",gap:"size-200",children:[t?e(Y,{variant:"danger",children:t}):null,e(
|
|
2554
|
+
`,children:e(h,{direction:"row",justifyContent:"center",children:e(x,{width:"900px",paddingStart:"auto",paddingEnd:"auto",children:s(h,{direction:"column",gap:"size-200",children:[t?e(Y,{variant:"danger",children:t}):null,e(G,{control:c,name:"input",render:({field:{onChange:p,onBlur:y,value:k},fieldState:{invalid:v,error:b}})=>s(z,{title:"Input",subTitle:"The input to the LLM, retriever, program, etc.",...Ca,children:[v?e(Y,{variant:"danger",banner:!0,children:b==null?void 0:b.message}):null,e(we,{value:k,onChange:p,onBlur:y})]})}),e(G,{control:c,name:"output",render:({field:{onChange:p,onBlur:y,value:k},fieldState:{invalid:v,error:b}})=>s(z,{title:"Output",subTitle:"The output of the LLM or program to be used as an expected output",...Ca,backgroundColor:"green-100",borderColor:"green-700",children:[v?e(Y,{variant:"danger",banner:!0,children:b==null?void 0:b.message}):null,e(we,{value:k,onChange:p,onBlur:y})]})}),e(G,{control:c,name:"metadata",render:({field:{onChange:p,onBlur:y,value:k},fieldState:{invalid:v,error:b}})=>s(z,{title:"Metadata",subTitle:"All data from the span to use during experimentation or evaluation",...Ca,children:[v?e(Y,{variant:"danger",banner:!0,children:b==null?void 0:b.message}):null,e(we,{value:k,onChange:p,onBlur:y})]})}),e(G,{control:c,name:"description",render:({field:{onChange:p,onBlur:y,value:k},fieldState:{invalid:v,error:b}})=>e(Zn,{label:"Version Description",value:k,onChange:p,onBlur:y,errorMessage:b==null?void 0:b.message,validationState:v?"invalid":"valid",placeholder:"A description of the changes made. Will be displayed in the version history.",height:100})})]})})})}),e(x,{padding:"size-200",borderTopColor:"light",borderTopWidth:"thin",children:e(h,{direction:"row",justifyContent:"end",gap:"size-100",children:e(N,{variant:"primary",size:"compact",disabled:!f||o,loading:o,onClick:m(g),children:"Add Example"})})})]})}function gu(n){const{datasetId:a,onAddExampleCompleted:l}=n,[t,i]=u.useState(null),r=u.useCallback(()=>{i(e(mu,{datasetId:a,onCompleted:()=>{l(),i(null)}}))},[a,l]);return s(H,{children:[e(N,{icon:e(P,{svg:e(E.PlusCircleOutline,{})}),size:"compact",variant:"default",onClick:r,children:"Add Example"}),e(U,{isDismissable:!0,onDismiss:()=>{i(null)},children:t})]})}function pu(){const n=gn(i=>i.datasetId),a=gn(i=>i.latestVersion);let l=`${Ia}/v1/datasets/${n}/examples`;a&&(l+=`?version-id=${a.id}`);const t=u.useMemo(()=>`import phoenix as px
|
|
2555
2555
|
client = px.Client()
|
|
2556
2556
|
# Get the current dataset version
|
|
2557
2557
|
dataset = client.get_dataset(id="${n}"${a?`, version_id="${a.id}"`:""})`,[n,a]);return e("div",{css:C`
|
|
@@ -2561,12 +2561,12 @@ dataset = client.get_dataset(id="${n}"${a?`, version_id="${a.id}"`:""})`,[n,a]);
|
|
|
2561
2561
|
padding-right: 10px;
|
|
2562
2562
|
}
|
|
2563
2563
|
}
|
|
2564
|
-
`,children:s(yn,{placement:"bottom right",children:[e(Pl,{addonBefore:e(P,{svg:e(
|
|
2564
|
+
`,children:s(yn,{placement:"bottom right",children:[e(Pl,{addonBefore:e(P,{svg:e(E.Code,{})}),children:"Code"}),e($a,{children:s("section",{css:C`
|
|
2565
2565
|
width: 500px;
|
|
2566
2566
|
.ac-field {
|
|
2567
2567
|
flex: 1 1 auto;
|
|
2568
2568
|
}
|
|
2569
|
-
`,children:[e(x,{padding:"size-200",children:s(
|
|
2569
|
+
`,children:[e(x,{padding:"size-200",children:s(mn,{children:[s(h,{direction:"row",gap:"size-100",alignItems:"end",width:"100%",children:[e(le,{label:"Dataset ID",isReadOnly:!0,value:n}),e(X,{text:n,size:"normal"})]}),s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(le,{label:"Version ID",isReadOnly:!0,value:(a==null?void 0:a.id)||"No Versions",validationState:a?"valid":"invalid"}),e(X,{text:(a==null?void 0:a.id)||"No Versions",disabled:!a,size:"normal"})]})]})}),s(ke,{children:[e(q,{name:"Python",children:e(x,{margin:"size-200",borderColor:"light",borderWidth:"thin",borderRadius:"small",children:e(an,{value:t})})}),e(q,{name:"REST",children:e(x,{padding:"size-200",children:e(mn,{children:s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(le,{label:"URL",isReadOnly:!0,value:l}),e(X,{text:l,size:"normal"})]})})})})]})]})})]})})}const qi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"datasetId"}],a=[{kind:"Variable",name:"id",variableName:"datasetId"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i=[{kind:"Literal",name:"first",value:100}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"DatasetHistoryDialogQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[l,{args:null,kind:"FragmentSpread",name:"DatasetHistoryTable_versions"}],type:"Dataset",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"DatasetHistoryDialogQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[t,{kind:"TypeDiscriminator",abstractKey:"__isNode"},l,{kind:"InlineFragment",selections:[{alias:null,args:i,concreteType:"DatasetVersionConnection",kind:"LinkedField",name:"versions",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetVersionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"DatasetVersion",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},t],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",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:"versions(first:100)"},{alias:null,args:i,filters:null,handle:"connection",key:"DatasetHistoryTable_versions",kind:"LinkedHandle",name:"versions"}],type:"Dataset",abstractKey:null}],storageKey:null}]},params:{cacheID:"df94b4e72c0187fd0fd1c8416af19354",id:null,metadata:{},name:"DatasetHistoryDialogQuery",operationKind:"query",text:`query DatasetHistoryDialogQuery(
|
|
2570
2570
|
$datasetId: GlobalID!
|
|
2571
2571
|
) {
|
|
2572
2572
|
dataset: node(id: $datasetId) {
|
|
@@ -2629,31 +2629,31 @@ fragment DatasetHistoryTable_versions_2HEEH6 on Dataset {
|
|
|
2629
2629
|
}
|
|
2630
2630
|
id
|
|
2631
2631
|
}
|
|
2632
|
-
`}}}();Bi.hash="37e453bc58759a1e89bc5862c460de6b";const Hi=function(){var n=["versions"],a={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"}],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:Bi,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"DatasetHistoryTable_versions",selections:[{alias:"versions",args:null,concreteType:"DatasetVersionConnection",kind:"LinkedField",name:"__DatasetHistoryTable_versions_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetVersionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"DatasetVersion",kind:"LinkedField",name:"node",plural:!1,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",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},a],type:"Dataset",abstractKey:null}}();Hi.hash="37e453bc58759a1e89bc5862c460de6b";const
|
|
2632
|
+
`}}}();Bi.hash="37e453bc58759a1e89bc5862c460de6b";const Hi=function(){var n=["versions"],a={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"}],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:Bi,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"DatasetHistoryTable_versions",selections:[{alias:"versions",args:null,concreteType:"DatasetVersionConnection",kind:"LinkedField",name:"__DatasetHistoryTable_versions_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetVersionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"DatasetVersion",kind:"LinkedField",name:"node",plural:!1,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",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},a],type:"Dataset",abstractKey:null}}();Hi.hash="37e453bc58759a1e89bc5862c460de6b";const yu=100;function fu(n){const a=u.useRef(null),{data:l,loadNext:t,hasNext:i,isLoadingNext:r}=T.usePaginationFragment(Hi,n.dataset),o=u.useMemo(()=>l.versions.edges.map(g=>g.node),[l]),c=Te.useCallback(g=>{if(g){const{scrollHeight:p,scrollTop:y,clientHeight:k}=g;p-y-k<300&&!r&&i&&t(yu)}},[i,r,t]),d=ue({columns:[{header:"version ID",accessorKey:"id"},{header:"description",accessorKey:"description"},{header:"created at",accessorKey:"createdAt",cell:ve}],data:o,getCoreRowModel:me(),getSortedRowModel:Dn()}),m=d.getRowModel().rows,f=m.length===0;return e("div",{css:C`
|
|
2633
2633
|
flex: 1 1 auto;
|
|
2634
2634
|
overflow: auto;
|
|
2635
|
-
`,onScroll:g=>c(g.target),ref:a,children:s("table",{css:
|
|
2635
|
+
`,onScroll:g=>c(g.target),ref:a,children:s("table",{css:He,children:[e("thead",{children:d.getHeaderGroups().map(g=>e("tr",{children:g.headers.map(p=>e("th",{colSpan:p.colSpan,children:p.isPlaceholder?null:s("div",{className:p.column.getCanSort()?"cursor-pointer":"",onClick:p.column.getToggleSortingHandler(),style:{left:p.getStart(),width:p.getSize()},children:[B(p.column.columnDef.header,p.getContext()),p.column.getIsSorted()?e(P,{className:"sort-icon",svg:p.column.getIsSorted()==="asc"?e(E.ArrowUpFilled,{}):e(E.ArrowDownFilled,{})}):null]})},p.id))},g.id))}),f?e(Ge,{}):e("tbody",{children:m.map(g=>e("tr",{children:g.getVisibleCells().map(p=>e("td",{children:B(p.column.columnDef.cell,p.getContext())},p.id))},g.id))})]})})}function hu(n){const{datasetId:a}=n,l=T.useLazyLoadQuery(qi,{datasetId:a});return e(j,{size:"L",title:"Dataset History",children:e("div",{css:C`
|
|
2636
2636
|
height: 500px;
|
|
2637
|
-
`,children:e(
|
|
2637
|
+
`,children:e(fu,{dataset:l.dataset})})})}function ku(n){const{datasetId:a}=n,[l,t]=u.useState(null);return s(H,{children:[s(Fe,{children:[e(N,{variant:"default",icon:e(P,{svg:e(E.ClockOutline,{})}),"aria-label":"Version History",onClick:()=>{t(e(hu,{datasetId:a}))}}),e(On,{children:"Dataset Version History"})]}),e(u.Suspense,{fallback:null,children:e(U,{type:"modal",isDismissable:!0,onDismiss:()=>{t(null)},children:l})})]})}const bu=`pip install arize-phoenix>=${window.Config.platformVersion}`,Su=`import os
|
|
2638
2638
|
# Set the phoenix collector endpoint. Commonly http://localhost:6060
|
|
2639
|
-
os.environ["PHOENIX_COLLECTOR_ENDPOINT"] = "<your-phoenix-url>"`,
|
|
2639
|
+
os.environ["PHOENIX_COLLECTOR_ENDPOINT"] = "<your-phoenix-url>"`,vu=`from phoenix.experiments.types import Example
|
|
2640
2640
|
# Define your task
|
|
2641
2641
|
# Typically should be an LLM call or a call to your application
|
|
2642
2642
|
def my_task(example: Example) -> str:
|
|
2643
2643
|
# This is just an example of how to return a JSON serializable value
|
|
2644
|
-
return f"Hello {example.input["person"]}"`,
|
|
2644
|
+
return f"Hello {example.input["person"]}"`,Cu=`# Define an evaluator. This just an example.
|
|
2645
2645
|
def exact_match(input, output) -> float:
|
|
2646
2646
|
return 1.0 if output is f"Hello {input}" else 0.0
|
|
2647
2647
|
|
|
2648
2648
|
# Store the evaluators for later use
|
|
2649
|
-
evaluators = [exact_match]`,
|
|
2649
|
+
evaluators = [exact_match]`,Fu=`# Run an experiment
|
|
2650
2650
|
from phoenix.experiments import run_experiment
|
|
2651
2651
|
|
|
2652
|
-
experiment = run_experiment(dataset, my_task, evaluators=evaluators)`;function Gi(){const[n,a]=u.useState(null),l=u.useCallback(()=>{a(e(j,{title:"Run Experiment",size:"XL",children:e(
|
|
2652
|
+
experiment = run_experiment(dataset, my_task, evaluators=evaluators)`;function Gi(){const[n,a]=u.useState(null),l=u.useCallback(()=>{a(e(j,{title:"Run Experiment",size:"XL",children:e(Ku,{})}))},[]);return s(H,{children:[e(N,{size:"compact",variant:"default",icon:e(P,{svg:e(E.ExperimentOutline,{})}),onClick:l,children:"Run Experiment"}),e(U,{isDismissable:!0,type:"slideOver",onDismiss:()=>{a(null)},children:n})]})}function Ku(){const n=gn(t=>t.datasetName),a=gn(t=>t.latestVersion),l=u.useMemo(()=>`import phoenix as px
|
|
2653
2653
|
# Initialize a phoenix client
|
|
2654
2654
|
client = px.Client()
|
|
2655
2655
|
# Get the current dataset version. You can omit the version for the latest.
|
|
2656
|
-
dataset = client.get_dataset(name="${n}"${a?`, version_id="${a.id}"`:""})`,[n,a]);return s(x,{padding:"size-400",overflow:"auto",children:[e(x,{paddingBottom:"size-100",children:e(F,{children:"Install Phoenix"})}),e(hn,{children:e(
|
|
2656
|
+
dataset = client.get_dataset(name="${n}"${a?`, version_id="${a.id}"`:""})`,[n,a]);return s(x,{padding:"size-400",overflow:"auto",children:[e(x,{paddingBottom:"size-100",children:e(F,{children:"Install Phoenix"})}),e(hn,{children:e(an,{value:bu})}),e(x,{paddingTop:"size-100",paddingBottom:"size-100",children:e(F,{children:"Point to a running instance of Phoenix"})}),e(hn,{children:e(an,{value:Su})}),e(x,{paddingTop:"size-100",paddingBottom:"size-100",children:e(F,{children:"Pull down this dataset"})}),e(hn,{children:e(an,{value:l})}),e(x,{paddingTop:"size-100",paddingBottom:"size-100",children:e(F,{children:"Define your task"})}),e(hn,{children:e(an,{value:vu})}),e(x,{paddingTop:"size-100",paddingBottom:"size-100",children:e(F,{children:"Define evaluators"})}),e(hn,{children:e(an,{value:Cu})}),e(x,{paddingTop:"size-100",paddingBottom:"size-100",children:e(F,{children:"Run an experiment"})}),e(hn,{children:e(an,{value:Fu})})]})}function Vm(){const n=Bn(),a=u.useMemo(()=>{const l=n.dataset.latestVersions;return l!=null&&l.edges&&l.edges.length?l.edges[0].version:null},[n]);return e(uu,{datasetId:n.dataset.id,datasetName:n.dataset.name,latestVersion:a,children:e(u.Suspense,{fallback:e(se,{}),children:e(Du,{dataset:n.dataset})})})}const xu=C`
|
|
2657
2657
|
flex: 1 1 auto;
|
|
2658
2658
|
display: flex;
|
|
2659
2659
|
flex-direction: column;
|
|
@@ -2679,7 +2679,7 @@ dataset = client.get_dataset(name="${n}"${a?`, version_id="${a.id}"`:""})`,[n,a]
|
|
|
2679
2679
|
}
|
|
2680
2680
|
}
|
|
2681
2681
|
}
|
|
2682
|
-
`;function
|
|
2682
|
+
`;function Du({dataset:n}){const a=n.id,l=gn(d=>d.refreshLatestVersion),t=ge(),i=ae(),r=u.useCallback(d=>{d===0?i(`/datasets/${a}/experiments`):d===1&&i(`/datasets/${a}/examples`)},[i,a]),c=$r().pathname.includes("examples")?1:0;return s("main",{css:xu,children:[e(x,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-200",paddingBottom:"size-50",flex:"none",children:s(h,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[e(h,{direction:"column",justifyContent:"space-between",children:e(h,{direction:"row",gap:"size-200",alignItems:"center",children:s(h,{direction:"column",children:[e(F,{elementType:"h1",textSize:"xlarge",weight:"heavy",children:n.name}),e(F,{color:"text-700",children:n.description||"--"})]})})}),s(h,{direction:"row",gap:"size-100",children:[s(Ue,{align:"end",icon:e(P,{svg:e(E.DownloadOutline,{})}),onAction:d=>{switch(d){case"csv":window.open(`/v1/datasets/${n.id}/csv`,"_blank");break;case"openai-ft":window.open(`/v1/datasets/${n.id}/jsonl/openai_ft`,"_blank");break;case"openai-evals":window.open(`/v1/datasets/${n.id}/jsonl/openai_evals`,"_blank");break}},children:[e(J,{children:"Download CSV"},"csv"),e(J,{children:"Download OpenAI Fine-Tuning JSONL"},"openai-ft"),e(J,{children:"Download OpenAI Evals JSONL"},"openai-evals")]}),e(ku,{datasetId:n.id}),e(pu,{}),e(Gi,{}),e(gu,{datasetId:n.id,onAddExampleCompleted:()=>{t({title:"Example added",message:"The example has been added successfully and the version has been updated."}),l()}})]})]})}),s(ke,{onChange:r,defaultIndex:c,children:[e(q,{name:"Experiments",extra:e(Me,{children:n.experimentCount}),children:e(u.Suspense,{children:e(Ke,{})})}),e(q,{name:"Examples",extra:e(Me,{children:n.exampleCount}),children:e(u.Suspense,{children:e(Ke,{})})})]})]})}const Ui=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},i={kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},t,{alias:null,args:null,kind:"ScalarField",name:"exampleCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"experimentCount",storageKey:null},{alias:"latestVersions",args:[{kind:"Literal",name:"first",value:1},{kind:"Literal",name:"sort",value:{col:"createdAt",dir:"desc"}}],concreteType:"DatasetVersionConnection",kind:"LinkedField",name:"versions",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetVersionEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"version",args:null,concreteType:"DatasetVersion",kind:"LinkedField",name:"node",plural:!1,selections:[l,t,{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:'versions(first:1,sort:{"col":"createdAt","dir":"desc"})'}],type:"Dataset",abstractKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"datasetLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,i],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"datasetLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,i],storageKey:null}]},params:{cacheID:"5b221627cf7e63f41fbec41027cc0951",id:null,metadata:{},name:"datasetLoaderQuery",operationKind:"query",text:`query datasetLoaderQuery(
|
|
2683
2683
|
$id: GlobalID!
|
|
2684
2684
|
) {
|
|
2685
2685
|
dataset: node(id: $id) {
|
|
@@ -2703,7 +2703,7 @@ dataset = client.get_dataset(name="${n}"${a?`, version_id="${a.id}"`:""})`,[n,a]
|
|
|
2703
2703
|
}
|
|
2704
2704
|
}
|
|
2705
2705
|
}
|
|
2706
|
-
`}}}();Ui.hash="469da2debdebd608c88a6ef83c2540aa";async function
|
|
2706
|
+
`}}}();Ui.hash="469da2debdebd608c88a6ef83c2540aa";async function $m(n){const{datasetId:a}=n.params;return await T.fetchQuery(Ie,Ui,{id:a}).toPromise()}const Wi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"exampleId"}],a=[{kind:"Variable",name:"id",variableName:"exampleId"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},i={alias:"latestRevision",args:null,concreteType:"DatasetExampleRevision",kind:"LinkedField",name:"revision",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"input",storageKey:null},t,{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null}],storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null},o={alias:null,args:null,concreteType:"Span",kind:"LinkedField",name:"span",plural:!1,selections:[l,{alias:null,args:null,concreteType:"SpanContext",kind:"LinkedField",name:"context",plural:!1,selections:[r],storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[l],storageKey:null}],storageKey:null},c={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},d=[{kind:"Literal",name:"first",value:100}],m={alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[r,{alias:null,args:null,kind:"ScalarField",name:"projectId",storageKey:null}],storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ExampleDetailsDialogQuery",selections:[{alias:"example",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[l,i,o],type:"DatasetExample",abstractKey:null},{args:null,kind:"FragmentSpread",name:"ExampleExperimentRunsTableFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ExampleDetailsDialogQuery",selections:[{alias:"example",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[c,{kind:"TypeDiscriminator",abstractKey:"__isNode"},l,{kind:"InlineFragment",selections:[i,o,{alias:null,args:d,concreteType:"ExperimentRunConnection",kind:"LinkedField",name:"experimentRuns",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"run",args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"error",storageKey:null},t,m,{alias:null,args:null,concreteType:"ExperimentRunAnnotationConnection",kind:"LinkedField",name:"annotations",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunAnnotationEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"annotation",args:null,concreteType:"ExperimentRunAnnotation",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{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:"explanation",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},m],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"node",plural:!1,selections:[c],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:"experimentRuns(first:100)"},{alias:null,args:d,filters:null,handle:"connection",key:"ExampleExperimentRunsTable_experimentRuns",kind:"LinkedHandle",name:"experimentRuns"}],type:"DatasetExample",abstractKey:null}],storageKey:null}]},params:{cacheID:"6fa23dc80c23ecdf48e57d139d76a721",id:null,metadata:{},name:"ExampleDetailsDialogQuery",operationKind:"query",text:`query ExampleDetailsDialogQuery(
|
|
2707
2707
|
$exampleId: GlobalID!
|
|
2708
2708
|
) {
|
|
2709
2709
|
example: node(id: $exampleId) {
|
|
@@ -2780,7 +2780,7 @@ fragment ExampleExperimentRunsTableFragment on DatasetExample {
|
|
|
2780
2780
|
__typename
|
|
2781
2781
|
}
|
|
2782
2782
|
}
|
|
2783
|
-
`}}}();Ji.hash="a5e0e601ed24ffaa37a99ba358f960d3";const Fa={backgroundColor:"light",borderColor:"light",collapsible:!0,bodyStyle:{padding:0}};function
|
|
2783
|
+
`}}}();Ji.hash="a5e0e601ed24ffaa37a99ba358f960d3";const Fa={backgroundColor:"light",borderColor:"light",collapsible:!0,bodyStyle:{padding:0}};function Tu(n){const{exampleId:a,onCompleted:l}=n,[t,i]=u.useState(null),[r,o]=T.useMutation(Ji),{control:c,setError:d,handleSubmit:m,formState:{isValid:f}}=qe({defaultValues:n.currentRevision}),g=u.useCallback(p=>{if(i(null),!Ee(p==null?void 0:p.input))return d("input",{message:"Input must be a valid JSON object"});if(!Ee(p==null?void 0:p.output))return d("output",{message:"Output must be a valid JSON object"});if(!Ee(p==null?void 0:p.metadata))return d("metadata",{message:"Metadata must be a valid JSON object"});r({variables:{input:{patches:[{exampleId:a,input:JSON.parse(p.input),output:JSON.parse(p.output),metadata:JSON.parse(p.metadata)}],versionDescription:p.description}},onCompleted:()=>{l()},onError:y=>{i(y.message)}})},[r,a,d,l]);return e(j,{size:"fullscreen",title:`Edit Example: ${a}`,extra:e(N,{variant:"primary",size:"compact",disabled:!f||o,loading:o,onClick:m(g),children:"Save Changes"}),children:e("div",{css:C`
|
|
2784
2784
|
overflow-y: auto;
|
|
2785
2785
|
padding: var(--ac-global-dimension-size-400);
|
|
2786
2786
|
/* Make widths configurable */
|
|
@@ -2791,7 +2791,7 @@ fragment ExampleExperimentRunsTableFragment on DatasetExample {
|
|
|
2791
2791
|
width: 100%;
|
|
2792
2792
|
}
|
|
2793
2793
|
}
|
|
2794
|
-
`,children:e(h,{direction:"row",justifyContent:"center",children:e(x,{width:"900px",paddingStart:"auto",paddingEnd:"auto",children:s(h,{direction:"column",gap:"size-200",children:[t?e(Y,{variant:"danger",children:t}):null,e(
|
|
2794
|
+
`,children:e(h,{direction:"row",justifyContent:"center",children:e(x,{width:"900px",paddingStart:"auto",paddingEnd:"auto",children:s(h,{direction:"column",gap:"size-200",children:[t?e(Y,{variant:"danger",children:t}):null,e(G,{control:c,name:"input",render:({field:{onChange:p,onBlur:y,value:k},fieldState:{invalid:v,error:b}})=>s(z,{title:"Input",subTitle:"The input to the LLM, retriever, program, etc.",...Fa,children:[v?e(Y,{variant:"danger",banner:!0,children:b==null?void 0:b.message}):null,e(we,{value:k,onChange:p,onBlur:y})]})}),e(G,{control:c,name:"output",render:({field:{onChange:p,onBlur:y,value:k},fieldState:{invalid:v,error:b}})=>s(z,{title:"Output",subTitle:"The output of the LLM or program to be used as an expected output",...Fa,backgroundColor:"green-100",borderColor:"green-700",children:[v?e(Y,{variant:"danger",banner:!0,children:b==null?void 0:b.message}):null,e(we,{value:k,onChange:p,onBlur:y})]})}),e(G,{control:c,name:"metadata",render:({field:{onChange:p,onBlur:y,value:k},fieldState:{invalid:v,error:b}})=>s(z,{title:"Metadata",subTitle:"All data from the span to use during experimentation or evaluation",...Fa,children:[v?e(Y,{variant:"danger",banner:!0,children:b==null?void 0:b.message}):null,e(we,{value:k,onChange:p,onBlur:y})]})}),e(G,{control:c,name:"description",render:({field:{onChange:p,onBlur:y,value:k},fieldState:{invalid:v,error:b}})=>e(Zn,{label:"Revision Description",value:k,onChange:p,onBlur:y,errorMessage:b==null?void 0:b.message,validationState:v?"invalid":"valid",placeholder:"A description of the changes made in this revision. Will be displayed in the version history.",height:100})})]})})})})})}function Iu(n){const{onCompleted:a,...l}=n,[t,i]=u.useState(null);return s(H,{children:[e(N,{variant:"default",size:"compact",icon:e(P,{svg:e(E.EditOutline,{})}),onClick:()=>i(e(Tu,{...l,onCompleted:()=>{i(null),a()}})),children:"Edit Example"}),e(U,{type:"slideOver",isDismissable:!0,onDismiss:()=>i(null),children:t})]})}const Zi=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"},{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l=[{kind:"Variable",name:"after",variableName:"after"},{kind:"Variable",name:"first",variableName:"first"}],t={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"projectId",storageKey:null}],storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ExampleExperimentRunsTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:l,kind:"FragmentSpread",name:"ExampleExperimentRunsTableFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ExampleExperimentRunsTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[t,{kind:"TypeDiscriminator",abstractKey:"__isNode"},i,{kind:"InlineFragment",selections:[{alias:null,args:l,concreteType:"ExperimentRunConnection",kind:"LinkedField",name:"experimentRuns",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"run",args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"node",plural:!1,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"error",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},r,{alias:null,args:null,concreteType:"ExperimentRunAnnotationConnection",kind:"LinkedField",name:"annotations",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunAnnotationEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"annotation",args:null,concreteType:"ExperimentRunAnnotation",kind:"LinkedField",name:"node",plural:!1,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{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:"explanation",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},r],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"node",plural:!1,selections:[t],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},{alias:null,args:l,filters:null,handle:"connection",key:"ExampleExperimentRunsTable_experimentRuns",kind:"LinkedHandle",name:"experimentRuns"}],type:"DatasetExample",abstractKey:null}],storageKey:null}]},params:{cacheID:"2ec7ead16e6df0877bc47db0ed7c7553",id:null,metadata:{},name:"ExampleExperimentRunsTableQuery",operationKind:"query",text:`query ExampleExperimentRunsTableQuery(
|
|
2795
2795
|
$after: String = null
|
|
2796
2796
|
$first: Int = 100
|
|
2797
2797
|
$id: GlobalID!
|
|
@@ -2846,22 +2846,22 @@ fragment ExampleExperimentRunsTableFragment_2HEEH6 on DatasetExample {
|
|
|
2846
2846
|
}
|
|
2847
2847
|
id
|
|
2848
2848
|
}
|
|
2849
|
-
`}}}();Zi.hash="6ca0f938b309407e8c184a1c13d1c52d";const Xi=function(){var n=["experimentRuns"],a={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},l={alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"projectId",storageKey:null}],storageKey:null};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"}],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:Zi,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"ExampleExperimentRunsTableFragment",selections:[{alias:"experimentRuns",args:null,concreteType:"ExperimentRunConnection",kind:"LinkedField",name:"__ExampleExperimentRunsTable_experimentRuns_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"run",args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"node",plural:!1,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"error",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},l,{alias:null,args:null,concreteType:"ExperimentRunAnnotationConnection",kind:"LinkedField",name:"annotations",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunAnnotationEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"annotation",args:null,concreteType:"ExperimentRunAnnotation",kind:"LinkedField",name:"node",plural:!1,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{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:"explanation",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},l],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"ExperimentRun",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},a],type:"DatasetExample",abstractKey:null}}();Xi.hash="6ca0f938b309407e8c184a1c13d1c52d";const
|
|
2849
|
+
`}}}();Zi.hash="6ca0f938b309407e8c184a1c13d1c52d";const Xi=function(){var n=["experimentRuns"],a={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},l={alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"projectId",storageKey:null}],storageKey:null};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"}],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:Zi,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"ExampleExperimentRunsTableFragment",selections:[{alias:"experimentRuns",args:null,concreteType:"ExperimentRunConnection",kind:"LinkedField",name:"__ExampleExperimentRunsTable_experimentRuns_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"run",args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"node",plural:!1,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"error",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},l,{alias:null,args:null,concreteType:"ExperimentRunAnnotationConnection",kind:"LinkedField",name:"annotations",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunAnnotationEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"annotation",args:null,concreteType:"ExperimentRunAnnotation",kind:"LinkedField",name:"node",plural:!1,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{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:"explanation",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},l],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"ExperimentRun",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},a],type:"DatasetExample",abstractKey:null}}();Xi.hash="6ca0f938b309407e8c184a1c13d1c52d";const Lu=100;function _u(){return e("tbody",{className:"is-empty",children:e("tr",{children:e("td",{colSpan:100,css:n=>C`
|
|
2850
2850
|
text-align: center;
|
|
2851
2851
|
padding: ${n.spacing.margin24}px ${n.spacing.margin24}px !important;
|
|
2852
|
-
`,children:"No experiments have been run for this example."})})})}const
|
|
2852
|
+
`,children:"No experiments have been run for this example."})})})}const Au=C`
|
|
2853
2853
|
display: flex;
|
|
2854
2854
|
flex-direction: row;
|
|
2855
2855
|
align-items: center;
|
|
2856
2856
|
color: var(--ac-global-color-primary);
|
|
2857
2857
|
gap: var(--ac-global-dimension-size-50);
|
|
2858
|
-
`;function
|
|
2858
|
+
`;function Eu({example:n}){const a=u.useRef(null),l=ae(),{data:t,loadNext:i,hasNext:r,isLoadingNext:o}=T.usePaginationFragment(Xi,n),c=u.useMemo(()=>t.experimentRuns.edges.map(y=>{let k=null;return y.run.startTime&&y.run.endTime&&(k=new Date(y.run.endTime).getTime()-new Date(y.run.startTime).getTime()),{...y.run,output:JSON.stringify(y.run.output),latencyMs:k}}),[t]),m=ue({columns:[{header:"start time",accessorKey:"startTime",cell:ve},{header:"output",accessorKey:"output",cell:y=>{var v;const k=(v=y.row.original)==null?void 0:v.error;return k!==null?e(F,{color:"danger",children:k}):e(fe,{...y})}},{header:"latency",accessorKey:"latencyMs",cell:({getValue:y})=>{const k=y();return k===null||typeof k!="number"?"--":e(xe,{latencyMs:k})}},{header:"evaluations",accessorKey:"annotations",cell:({row:y})=>e(h,{direction:"row",gap:"size-50",wrap:"wrap",children:y.original.annotations.edges.map((k,v)=>{const b=k.annotation;return e(Un,{annotation:b,extra:b.trace&&e(x,{paddingTop:"size-100",children:s("div",{css:Au,children:[e(P,{svg:e(E.InfoOutline,{})}),e("span",{children:"Click to view evaluator trace"})]})}),children:e(pn,{annotation:b,onClick:()=>{b.trace&&l(`/projects/${b.trace.projectId}/traces/${b.trace.traceId}`)}},v)},v)})})},{id:"actions",cell:({row:y})=>{const k=y.original.trace;if(k)return e(N,{variant:"default",size:"compact",icon:e(P,{svg:e(E.Trace,{})}),onClick:()=>{l(`/projects/${k.projectId}/traces/${k.traceId}`)},"aria-label":"view trace"})}}],data:c,getCoreRowModel:me()}),f=m.getRowModel().rows,g=f.length===0,p=u.useCallback(y=>{if(y){const{scrollHeight:k,scrollTop:v,clientHeight:b}=y;k-v-b<300&&!o&&r&&i(Lu)}},[r,o,i]);return e("div",{css:C`
|
|
2859
2859
|
flex: 1 1 auto;
|
|
2860
2860
|
overflow: auto;
|
|
2861
|
-
`,ref:a,onScroll:p
|
|
2861
|
+
`,ref:a,onScroll:y=>p(y.target),children:s("table",{css:En,children:[e("thead",{children:m.getHeaderGroups().map(y=>e("tr",{children:y.headers.map(k=>e("th",{children:e("div",{children:B(k.column.columnDef.header,k.getContext())})},k.id))},y.id))}),g?e(_u,{}):e("tbody",{children:f.map(y=>e("tr",{children:y.getVisibleCells().map(k=>e("td",{children:B(k.column.columnDef.cell,k.getContext())},k.id))},y.id))})]})})}function Yi({exampleId:n,onDismiss:a}){const[l,t]=u.useState(0),i=T.useLazyLoadQuery(Wi,{exampleId:n},{fetchKey:l,fetchPolicy:"store-and-network"}),r=u.useMemo(()=>{const p=i.example.latestRevision;return{input:JSON.stringify(p==null?void 0:p.input,null,2),output:JSON.stringify(p==null?void 0:p.output,null,2),metadata:JSON.stringify(p==null?void 0:p.metadata,null,2)}},[i]),o=u.useMemo(()=>{const p=i.example.span;return p?{id:p.id,traceId:p.context.traceId,projectId:p.project.id}:null},[i]),{input:c,output:d,metadata:m}=r,f=ae(),g=ge();return e(U,{type:"slideOver",isDismissable:!0,onDismiss:a,children:e(j,{size:"XL",title:`Example: ${n}`,extra:s(h,{direction:"row",gap:"size-100",children:[o?e(N,{variant:"default",size:"compact",onClick:()=>{f(`/projects/${o.projectId}/traces/${o.traceId}?selectedSpanNodeId=${o.id}`)},children:"View Source Span"}):null,e(Iu,{exampleId:n,currentRevision:r,onCompleted:()=>{g({title:"Example updated",message:`Example ${n} has been updated.`}),t(p=>p+1)}})]}),children:s(sn,{direction:"vertical",autoSaveId:"example-panel-group",children:[e(ce,{defaultSize:200,children:e("div",{css:C`
|
|
2862
2862
|
overflow-y: auto;
|
|
2863
2863
|
height: 100%;
|
|
2864
|
-
`,children:e(h,{direction:"row",justifyContent:"center",children:e(x,{width:"900px",paddingStart:"auto",paddingEnd:"auto",paddingTop:"size-200",paddingBottom:"size-200",children:s(h,{direction:"column",gap:"size-200",children:[e(z,{title:"Input",...Ka,extra:e(X,{text:c}),children:e(
|
|
2864
|
+
`,children:e(h,{direction:"row",justifyContent:"center",children:e(x,{width:"900px",paddingStart:"auto",paddingEnd:"auto",paddingTop:"size-200",paddingBottom:"size-200",children:s(h,{direction:"column",gap:"size-200",children:[e(z,{title:"Input",...Ka,extra:e(X,{text:c}),children:e(ln,{value:c})}),e(z,{title:"Output",...Ka,extra:e(X,{text:d}),children:e(ln,{value:d})}),e(z,{title:"Metadata",...Ka,extra:e(X,{text:m}),children:e(ln,{value:m})})]})})})})}),e(on,{css:_n}),e(ce,{defaultSize:100,children:s(h,{direction:"column",height:"100%",children:[e(x,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderBottomColor:"dark",borderBottomWidth:"thin",flex:"none",children:e(te,{level:3,children:"Experiment Runs"})}),e(Eu,{example:i.example})]})})]})})})}const Ka={backgroundColor:"light",borderColor:"light",variant:"compact",collapsible:!0,bodyStyle:{padding:0}};function zm(){const{exampleId:n,datasetId:a}=je(),l=ae();return e(Yi,{exampleId:n,onDismiss:()=>{l(`/datasets/${a}/examples`)}})}const er=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i=[{kind:"Literal",name:"first",value:100}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"examplesLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{args:null,kind:"FragmentSpread",name:"ExamplesTableFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"examplesLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[t,l,{kind:"InlineFragment",selections:[{alias:null,args:i,concreteType:"DatasetExampleConnection",kind:"LinkedField",name:"examples",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetExampleEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"example",args:null,concreteType:"DatasetExample",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,concreteType:"DatasetExampleRevision",kind:"LinkedField",name:"revision",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"input",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"DatasetExample",kind:"LinkedField",name:"node",plural:!1,selections:[t],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:"examples(first:100)"},{alias:null,args:i,filters:["datasetVersionId"],handle:"connection",key:"ExamplesTable_examples",kind:"LinkedHandle",name:"examples"}],type:"Dataset",abstractKey:null}],storageKey:null}]},params:{cacheID:"7e303fa9a3c09ccd6a3dc1f3dbb2afb3",id:null,metadata:{},name:"examplesLoaderQuery",operationKind:"query",text:`query examplesLoaderQuery(
|
|
2865
2865
|
$id: GlobalID!
|
|
2866
2866
|
) {
|
|
2867
2867
|
dataset: node(id: $id) {
|
|
@@ -2894,7 +2894,7 @@ fragment ExamplesTableFragment on Dataset {
|
|
|
2894
2894
|
}
|
|
2895
2895
|
id
|
|
2896
2896
|
}
|
|
2897
|
-
`}}}();er.hash="6406bbf43a2e850b384ba9573d8e69de";async function
|
|
2897
|
+
`}}}();er.hash="6406bbf43a2e850b384ba9573d8e69de";async function Qm(n){const{datasetId:a}=n.params;return await T.fetchQuery(Ie,er,{id:a}).toPromise()}const nr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:null,kind:"LocalArgument",name:"datasetVersionId"},{defaultValue:100,kind:"LocalArgument",name:"first"},{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l=[{kind:"Variable",name:"after",variableName:"after"},{kind:"Variable",name:"datasetVersionId",variableName:"datasetVersionId"},{kind:"Variable",name:"first",variableName:"first"}],t={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ExamplesTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:l,kind:"FragmentSpread",name:"ExamplesTableFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ExamplesTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[t,{kind:"TypeDiscriminator",abstractKey:"__isNode"},i,{kind:"InlineFragment",selections:[{alias:null,args:l,concreteType:"DatasetExampleConnection",kind:"LinkedField",name:"examples",plural:!1,selections:[{alias:null,args:null,concreteType:"DatasetExampleEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"example",args:null,concreteType:"DatasetExample",kind:"LinkedField",name:"node",plural:!1,selections:[i,{alias:null,args:null,concreteType:"DatasetExampleRevision",kind:"LinkedField",name:"revision",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"input",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"DatasetExample",kind:"LinkedField",name:"node",plural:!1,selections:[t],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},{alias:null,args:l,filters:["datasetVersionId"],handle:"connection",key:"ExamplesTable_examples",kind:"LinkedHandle",name:"examples"}],type:"Dataset",abstractKey:null}],storageKey:null}]},params:{cacheID:"ca59c018695d41ca01b5f9d453386886",id:null,metadata:{},name:"ExamplesTableQuery",operationKind:"query",text:`query ExamplesTableQuery(
|
|
2898
2898
|
$after: String = null
|
|
2899
2899
|
$datasetVersionId: GlobalID
|
|
2900
2900
|
$first: Int = 100
|
|
@@ -2940,15 +2940,15 @@ fragment ExamplesTableFragment_4a6F8Z on Dataset {
|
|
|
2940
2940
|
}
|
|
2941
2941
|
}
|
|
2942
2942
|
}
|
|
2943
|
-
`}}}();lr.hash="455bf9e5dc4b9cc655095dc829ef7e12";function
|
|
2943
|
+
`}}}();lr.hash="455bf9e5dc4b9cc655095dc829ef7e12";function wu(n){const a=gn(y=>y.refreshLatestVersion),{selectedExamples:l,onExamplesDeleted:t,onClearSelection:i}=n,[r,o]=u.useState(null),c=ge(),d=An(),[m,f]=T.useMutation(lr),g=l.length!==1,p=u.useCallback(()=>{m({variables:{input:{exampleIds:l.map(y=>y.id)}},onCompleted:()=>{c({title:"Examples Deleted",message:`${l.length} example${g?"s":""} have been deleted.`}),t(),i(),a()},onError:y=>{d({title:"An error occurred",message:`Failed to delete examples: ${y.message}`})}})},[m,l,c,g,t,i,a,d]);return s("div",{css:C`
|
|
2944
2944
|
position: absolute;
|
|
2945
2945
|
bottom: var(--ac-global-dimension-size-400);
|
|
2946
2946
|
left: 50%;
|
|
2947
2947
|
transform: translateX(-50%);
|
|
2948
|
-
`,children:[e(x,{backgroundColor:"light",padding:"size-200",borderColor:"light",borderWidth:"thin",borderRadius:"medium",minWidth:"size-6000",children:s(h,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[e(F,{children:`${l.length} example${g?"s":""} selected`}),s(h,{direction:"row",gap:"size-100",children:[e(N,{variant:"default",size:"compact",onClick:i,children:"Cancel"}),e(N,{variant:"danger",size:"compact",icon:e(P,{svg:e(
|
|
2948
|
+
`,children:[e(x,{backgroundColor:"light",padding:"size-200",borderColor:"light",borderWidth:"thin",borderRadius:"medium",minWidth:"size-6000",children:s(h,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[e(F,{children:`${l.length} example${g?"s":""} selected`}),s(h,{direction:"row",gap:"size-100",children:[e(N,{variant:"default",size:"compact",onClick:i,children:"Cancel"}),e(N,{variant:"danger",size:"compact",icon:e(P,{svg:e(E.TrashOutline,{})}),loading:f,disabled:f,onClick:p,children:f?"Deleting...":"Delete Example"+(g?"s":"")})]})]})}),e(U,{onDismiss:()=>{o(null)},children:r})]})}const Ru=100;function Pu({dataset:n}){const a=gn(A=>A.latestVersion),l=u.useRef(null),[t,i]=Te.useState({}),{data:r,loadNext:o,hasNext:c,isLoadingNext:d,refetch:m}=T.usePaginationFragment(ar,n);u.useEffect(()=>{u.startTransition(()=>{m({datasetVersionId:(a==null?void 0:a.id)||null},{fetchPolicy:"store-and-network"})})},[a,m]);const f=u.useMemo(()=>r.examples.edges.map(A=>{const K=A.example,D=K.revision;return{id:K.id,input:D.input,output:D.output,metadata:D.metadata}}),[r]),p=ue({columns:[{id:"select",header:({table:A})=>e(ze,{checked:A.getIsAllRowsSelected(),indeterminate:A.getIsSomeRowsSelected(),onChange:A.getToggleAllRowsSelectedHandler()}),cell:({row:A})=>e(ze,{checked:A.getIsSelected(),disabled:!A.getCanSelect(),indeterminate:A.getIsSomeSelected(),onChange:A.getToggleSelectedHandler()})},{header:"example id",accessorKey:"id",cell:({getValue:A,row:K})=>{const D=K.original.id;return e(wn,{to:`${D}`,children:A()})}},{header:"input",accessorKey:"input",cell:Fn},{header:"output",accessorKey:"output",cell:Fn},{header:"metadata",accessorKey:"metadata",cell:Fn}],data:f,state:{rowSelection:t},onRowSelectionChange:i,getCoreRowModel:me()}),y=p.getRowModel().rows,k=y.length===0,v=p.getSelectedRowModel().rows,b=v.map(A=>A.original),S=u.useCallback(()=>{i({})},[i]),L=u.useCallback(A=>{if(A){const{scrollHeight:K,scrollTop:D,clientHeight:R}=A;K-D-R<300&&!d&&c&&o(Ru)}},[c,d,o]),I=ae();return s("div",{css:C`
|
|
2949
2949
|
flex: 1 1 auto;
|
|
2950
2950
|
overflow: auto;
|
|
2951
|
-
`,ref:l,onScroll:A=>L(A.target),children:[s("table",{css:En,children:[e("thead",{children:
|
|
2951
|
+
`,ref:l,onScroll:A=>L(A.target),children:[s("table",{css:En,children:[e("thead",{children:p.getHeaderGroups().map(A=>e("tr",{children:A.headers.map(K=>e("th",{children:e("div",{children:B(K.column.columnDef.header,K.getContext())})},K.id))},A.id))}),k?e(Ge,{}):e("tbody",{children:y.map(A=>e("tr",{onClick:()=>{I(`${A.original.id}`)},children:A.getVisibleCells().map(K=>e("td",{children:B(K.column.columnDef.cell,K.getContext())},K.id))},A.id))})]}),v.length?e(wu,{selectedExamples:b,onClearSelection:S,onExamplesDeleted:()=>{m({},{fetchPolicy:"store-and-network"})}}):null]})}function Om(){const n=Bn();return s(H,{children:[e(Pu,{dataset:n.dataset})," ",e(u.Suspense,{children:e(Ke,{})})]})}const tr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"annotationName",storageKey:null},r=[{kind:"Literal",name:"first",value:100}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"experimentsLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"InlineFragment",selections:[{args:null,kind:"FragmentSpread",name:"ExperimentsTableFragment"}],type:"Dataset",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"experimentsLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[t,l,{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"experimentAnnotationSummaries",plural:!0,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"minScore",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"maxScore",storageKey:null}],storageKey:null},{alias:null,args:r,concreteType:"ExperimentConnection",kind:"LinkedField",name:"experiments",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"errorRate",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"runCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"averageRunLatencyMs",storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[l],storageKey:null},{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"annotationSummaries",plural:!0,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[t],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:"experiments(first:100)"},{alias:null,args:r,filters:null,handle:"connection",key:"ExperimentsTable_experiments",kind:"LinkedHandle",name:"experiments"}],type:"Dataset",abstractKey:null}],storageKey:null}]},params:{cacheID:"91f92395f5df4858554b124deed3f47a",id:null,metadata:{},name:"experimentsLoaderQuery",operationKind:"query",text:`query experimentsLoaderQuery(
|
|
2952
2952
|
$id: GlobalID!
|
|
2953
2953
|
) {
|
|
2954
2954
|
dataset: node(id: $id) {
|
|
@@ -2998,7 +2998,7 @@ fragment ExperimentsTableFragment on Dataset {
|
|
|
2998
2998
|
}
|
|
2999
2999
|
id
|
|
3000
3000
|
}
|
|
3001
|
-
`}}}();tr.hash="1461484d9e1232cbb99e1251edabbec3";async function
|
|
3001
|
+
`}}}();tr.hash="1461484d9e1232cbb99e1251edabbec3";async function jm(n){const{datasetId:a}=n.params;return await T.fetchQuery(Ie,tr,{id:a}).toPromise()}const ir=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"},{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l=[{kind:"Variable",name:"after",variableName:"after"},{kind:"Variable",name:"first",variableName:"first"}],t={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"annotationName",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ExperimentsTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:l,kind:"FragmentSpread",name:"ExperimentsTableFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ExperimentsTableQuery",selections:[{alias:null,args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[t,{kind:"TypeDiscriminator",abstractKey:"__isNode"},i,{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"experimentAnnotationSummaries",plural:!0,selections:[r,{alias:null,args:null,kind:"ScalarField",name:"minScore",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"maxScore",storageKey:null}],storageKey:null},{alias:null,args:l,concreteType:"ExperimentConnection",kind:"LinkedField",name:"experiments",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"errorRate",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"runCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"averageRunLatencyMs",storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[i],storageKey:null},{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"annotationSummaries",plural:!0,selections:[r,{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[t],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},{alias:null,args:l,filters:null,handle:"connection",key:"ExperimentsTable_experiments",kind:"LinkedHandle",name:"experiments"}],type:"Dataset",abstractKey:null}],storageKey:null}]},params:{cacheID:"1db5ce5523fa9a472c91d093b0e6160e",id:null,metadata:{},name:"ExperimentsTableQuery",operationKind:"query",text:`query ExperimentsTableQuery(
|
|
3002
3002
|
$after: String = null
|
|
3003
3003
|
$first: Int = 100
|
|
3004
3004
|
$id: GlobalID!
|
|
@@ -3049,19 +3049,19 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
|
|
|
3049
3049
|
}
|
|
3050
3050
|
id
|
|
3051
3051
|
}
|
|
3052
|
-
`}}}();ir.hash="c7c7580fe40888ceb86a1701fe4eedf4";const rr=function(){var n=["experiments"],a={alias:null,args:null,kind:"ScalarField",name:"annotationName",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"}],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:ir,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"ExperimentsTableFragment",selections:[{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"experimentAnnotationSummaries",plural:!0,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"minScore",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"maxScore",storageKey:null}],storageKey:null},{alias:"experiments",args:null,concreteType:"ExperimentConnection",kind:"LinkedField",name:"__ExperimentsTable_experiments_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"errorRate",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"runCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"averageRunLatencyMs",storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[l],storageKey:null},{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"annotationSummaries",plural:!0,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Experiment",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:"Dataset",abstractKey:null}}();rr.hash="c7c7580fe40888ceb86a1701fe4eedf4";function
|
|
3052
|
+
`}}}();ir.hash="c7c7580fe40888ceb86a1701fe4eedf4";const rr=function(){var n=["experiments"],a={alias:null,args:null,kind:"ScalarField",name:"annotationName",storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"after"},{defaultValue:100,kind:"LocalArgument",name:"first"}],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:ir,identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"ExperimentsTableFragment",selections:[{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"experimentAnnotationSummaries",plural:!0,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"minScore",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"maxScore",storageKey:null}],storageKey:null},{alias:"experiments",args:null,concreteType:"ExperimentConnection",kind:"LinkedField",name:"__ExperimentsTable_experiments_connection",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[l,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"metadata",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"errorRate",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"runCount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"averageRunLatencyMs",storageKey:null},{alias:null,args:null,concreteType:"Project",kind:"LinkedField",name:"project",plural:!1,selections:[l],storageKey:null},{alias:null,args:null,concreteType:"ExperimentAnnotationSummary",kind:"LinkedField",name:"annotationSummaries",plural:!0,selections:[a,{alias:null,args:null,kind:"ScalarField",name:"meanScore",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Experiment",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:"Dataset",abstractKey:null}}();rr.hash="c7c7580fe40888ceb86a1701fe4eedf4";function Mu({getValue:n}){const a=n(),l=a!==null?a*100:null,t=u.useMemo(()=>{if(l!==null)return l>=80?"red-1100":l>0?"orange-1100":"green-1100"},[l]);return e(F,{color:t,children:Ta(l)})}const sr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"ExperimentMutationPayload",kind:"LinkedField",name:"deleteExperiments",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"ExperimentSelectionToolbarDeleteExperimentsMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"ExperimentSelectionToolbarDeleteExperimentsMutation",selections:a},params:{cacheID:"3af24cbaf3208c0d5ad1cd9313dd3823",id:null,metadata:{},name:"ExperimentSelectionToolbarDeleteExperimentsMutation",operationKind:"mutation",text:`mutation ExperimentSelectionToolbarDeleteExperimentsMutation(
|
|
3053
3053
|
$input: DeleteExperimentsInput!
|
|
3054
3054
|
) {
|
|
3055
3055
|
deleteExperiments(input: $input) {
|
|
3056
3056
|
__typename
|
|
3057
3057
|
}
|
|
3058
3058
|
}
|
|
3059
|
-
`}}}();sr.hash="4ab310746eb51c6a3fcb799d2c972762";function
|
|
3059
|
+
`}}}();sr.hash="4ab310746eb51c6a3fcb799d2c972762";function Nu(n){const a=ae(),[l,t]=u.useState(null),[i,r]=T.useMutation(sr),{datasetId:o,selectedExperiments:c,onClearSelection:d,onExperimentsDeleted:m}=n,f=c.length!==1,g=ge(),p=An(),y=u.useCallback(()=>{i({variables:{input:{experimentIds:c.map(v=>v.id)}},onCompleted:()=>{g({title:"Examples Deleted",message:`${c.length} experiment${f?"s":""} have been deleted.`}),m(),d()},onError:v=>{p({title:"An error occurred",message:`Failed to delete examples: ${v.message}`})}})},[i,f,p,g,d,m,c]),k=u.useCallback(()=>{t(s(j,{size:"S",title:"Delete Experiments",children:[e(x,{padding:"size-200",children:e(F,{color:"danger",children:"Are you sure you want to delete these experiments? This will also delete all associated annotations and traces, and it cannot be undone."})}),e(x,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(h,{direction:"row",justifyContent:"end",children:e(N,{variant:"danger",onClick:()=>{y(),t(null)},children:"Delete Experiments"})})})]}))},[y]);return s("div",{css:C`
|
|
3060
3060
|
position: absolute;
|
|
3061
3061
|
bottom: var(--ac-global-dimension-size-400);
|
|
3062
3062
|
left: 50%;
|
|
3063
3063
|
transform: translateX(-50%);
|
|
3064
|
-
`,children:[e(x,{backgroundColor:"light",padding:"size-200",borderColor:"light",borderWidth:"thin",borderRadius:"medium",minWidth:"size-6000",children:s(h,{direction:"row",justifyContent:"space-between",alignItems:"center",gap:"size-100",children:[e(F,{children:`${c.length} experiment${
|
|
3064
|
+
`,children:[e(x,{backgroundColor:"light",padding:"size-200",borderColor:"light",borderWidth:"thin",borderRadius:"medium",minWidth:"size-6000",children:s(h,{direction:"row",justifyContent:"space-between",alignItems:"center",gap:"size-100",children:[e(F,{children:`${c.length} experiment${f?"s":""} selected`}),s(h,{direction:"row",gap:"size-100",children:[e(N,{variant:"default",size:"compact",onClick:d,children:"Cancel"}),e(N,{variant:"danger",size:"compact",icon:e(P,{svg:e(E.TrashOutline,{})}),loading:r,disabled:r,onClick:k,children:r?"Deleting...":"Delete"}),e(N,{variant:"primary",size:"compact",onClick:()=>{a(`/datasets/${o}/compare?${c.map(v=>`experimentId=${v.id}`).join("&")}`)},icon:e(P,{svg:e(E.ArrowCompareOutline,{})}),children:"Compare Experiments"})]})]})}),e(U,{onDismiss:()=>{t(null)},children:l})]})}const Vu=100;function $u(){return e("tbody",{className:"is-empty",children:e("tr",{children:s("td",{colSpan:100,css:C`
|
|
3065
3065
|
text-align: center;
|
|
3066
3066
|
padding: var(--ac-global-dimension-size-400) !important;
|
|
3067
3067
|
.ac-button {
|
|
@@ -3069,20 +3069,20 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
|
|
|
3069
3069
|
margin-left: auto;
|
|
3070
3070
|
margin-right: auto;
|
|
3071
3071
|
}
|
|
3072
|
-
`,children:["No experiments for this dataset. To see how to run experiments on a dataset, check out the documentation.",e(Gi,{})]})})})}function
|
|
3072
|
+
`,children:["No experiments for this dataset. To see how to run experiments on a dataset, check out the documentation.",e(Gi,{})]})})})}function zu({dataset:n}){const a=u.useRef(null),[l,t]=u.useState({}),{data:i,loadNext:r,hasNext:o,isLoadingNext:c,refetch:d}=T.usePaginationFragment(rr,n),m=u.useMemo(()=>i.experiments.edges.map(K=>{const D=K.experiment.annotationSummaries.reduce((R,w)=>(R[w.annotationName]=w,R),{});return{...K.experiment,annotationSummaryMap:D}}),[i]),f=[{id:"select",header:({table:K})=>e(ze,{checked:K.getIsAllRowsSelected(),indeterminate:K.getIsSomeRowsSelected(),onChange:K.getToggleAllRowsSelectedHandler()}),cell:({row:K})=>e(ze,{checked:K.getIsSelected(),disabled:!K.getCanSelect(),indeterminate:K.getIsSomeSelected(),onChange:K.getToggleSelectedHandler()})},{header:"name",accessorKey:"name",minSize:200,cell:({getValue:K,row:D})=>{const R=D.original.id,w=D.original.sequenceNumber;return s(h,{direction:"row",gap:"size-100",children:[e(da,{sequenceNumber:w}),e(wn,{to:`/datasets/${n.id}/compare?experimentId=${R}`,children:K()})]})}},{header:"description",accessorKey:"description",minSize:300,cell:fe},{header:"created at",accessorKey:"createdAt",cell:ve}],g=i.experimentAnnotationSummaries.map(K=>{const{annotationName:D,minScore:R,maxScore:w}=K;return{header:()=>s(h,{direction:"row",gap:"size-100",wrap:!0,alignItems:"center",justifyContent:"end",children:[e(F,{children:D}),e(_s,{annotationName:D})]}),id:`annotation-${D}`,meta:{textAlign:"right"},cell:({row:O})=>{const Z=O.original.annotationSummaryMap[D];return!Z||Z.meanScore==null?e("span",{css:C`
|
|
3073
3073
|
float: right;
|
|
3074
|
-
`,children:"--"}):e(
|
|
3074
|
+
`,children:"--"}):e(Qu,{annotationName:D,value:Z.meanScore,min:R,max:w})}}}),p=[{header:"run count",accessorKey:"runCount",meta:{textAlign:"right"},cell:As},{header:"avg latency",accessorKey:"averageRunLatencyMs",meta:{textAlign:"right"},cell:({getValue:K})=>{const D=K();return D===null||typeof D!="number"?"--":e(xe,{latencyMs:D})}},{header:"error rate",accessorKey:"errorRate",meta:{textAlign:"right"},cell:Mu},{header:"metadata",accessorKey:"metadata",minSize:200,cell:Fn},{id:"actions",cell:({row:K})=>{const D=K.original.project,R=K.original.metadata;return e(Ou,{projectId:(D==null?void 0:D.id)||null,experimentId:K.original.id,metadata:R})}}],y=ue({columns:[...f,...g,...p],data:m,getCoreRowModel:me(),state:{rowSelection:l},onRowSelectionChange:t}),k=y.getRowModel().rows,v=y.getSelectedRowModel().rows,b=v.map(K=>K.original),S=u.useCallback(()=>{t({})},[t]),L=k.length===0,I=u.useCallback(K=>{if(K){const{scrollHeight:D,scrollTop:R,clientHeight:w}=K;D-R-w<300&&!c&&o&&r(Vu)}},[o,c,r]),A=ae();return s("div",{css:C`
|
|
3075
3075
|
flex: 1 1 auto;
|
|
3076
3076
|
overflow: auto;
|
|
3077
3077
|
width: table.getTotalSize();
|
|
3078
|
-
`,ref:a,onScroll:K=>I(K.target),children:[s("table",{css:En,children:[e("thead",{children:
|
|
3078
|
+
`,ref:a,onScroll:K=>I(K.target),children:[s("table",{css:En,children:[e("thead",{children:y.getHeaderGroups().map(K=>e("tr",{children:K.headers.map(D=>{var R,w;return e("th",{align:(w=(R=D.column.columnDef)==null?void 0:R.meta)==null?void 0:w.textAlign,children:e("div",{children:B(D.column.columnDef.header,D.getContext())})},D.id)})},K.id))}),L?e($u,{}):e("tbody",{children:k.map(K=>e("tr",{onClick:()=>{A(`/datasets/${n.id}/compare?experimentId=${K.original.id}`)},children:K.getVisibleCells().map(D=>e("td",{children:B(D.column.columnDef.cell,D.getContext())},D.id))},K.id))})]}),v.length?e(Nu,{datasetId:n.id,selectedExperiments:b,onClearSelection:S,onExperimentsDeleted:()=>{d({},{fetchPolicy:"store-and-network"})}}):null]})}function Qu({annotationName:n,value:a,min:l,max:t}){const i=Kl(n),r=u.useMemo(()=>{const o=typeof l=="number"?l:0,c=typeof t=="number"?t:1;if(o===c&&c===a)return 100;const d=c-o||1;return(a-o)/d*100},[a,l,t]);return s(Fe,{children:[e(Kn,{children:s("div",{css:C`
|
|
3079
3079
|
float: right;
|
|
3080
3080
|
--mod-barloader-fill-color: ${i};
|
|
3081
3081
|
display: flex;
|
|
3082
3082
|
flex-direction: row;
|
|
3083
3083
|
align-items: center;
|
|
3084
3084
|
gap: var(--ac-global-dimension-size-100);
|
|
3085
|
-
`,children:[Cn(a),e(
|
|
3085
|
+
`,children:[Cn(a),e($s,{width:"40px",value:r,"aria-label":"where the mean score lands between overall min max"})]})}),e(Jn,{children:s(x,{width:"size-2400",children:[e(te,{level:3,weight:"heavy",children:n}),s(h,{direction:"column",children:[s(h,{justifyContent:"space-between",children:[e(F,{weight:"heavy",textSize:"small",children:"Mean Score"}),e(F,{textSize:"small",children:Cn(a)})]}),s(h,{justifyContent:"space-between",children:[e(F,{weight:"heavy",textSize:"small",children:"All Experiments Min"}),e(F,{textSize:"small",children:Cn(l)})]}),s(h,{justifyContent:"space-between",children:[e(F,{weight:"heavy",textSize:"small",children:"All Experiments Max"}),e(F,{textSize:"small",children:Cn(t)})]}),s(h,{justifyContent:"space-between",children:[e(F,{weight:"heavy",textSize:"small",children:"Mean Score Percentile"}),e(F,{textSize:"small",children:xl(r)})]})]})]})})]})}function Ou(n){const{projectId:a}=n,l=ae(),[t,i]=u.useState(null),r=ge();return s("div",{onClick:o=>{o.preventDefault(),o.stopPropagation()},children:[s(Ue,{buttonSize:"compact",align:"end",disabledKeys:a?[]:["GO_TO_EXPERIMENT_RUN_TRACES"],onAction:o=>{switch(o){case"GO_TO_EXPERIMENT_RUN_TRACES":return l(`/projects/${a}`);case"VIEW_METADATA":{i(e(j,{title:"Metadata",onDismiss:()=>i(null),children:e(ln,{value:JSON.stringify(n.metadata,null,2)})}));break}case"COPY_EXPERIMENT_ID":{zr(n.experimentId),r({title:"Copied",message:"The experiment ID has been copied to your clipboard"});break}default:be()}},children:[e(J,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(P,{svg:e(E.Trace,{})}),e(F,{children:"View run traces"})]})},"GO_TO_EXPERIMENT_RUN_TRACES"),e(J,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(P,{svg:e(E.InfoOutline,{})}),e(F,{children:"View metadata"})]})},"VIEW_METADATA"),e(J,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(P,{svg:e(E.ClipboardCopy,{})}),e(F,{children:"Copy experiment ID"})]})},"COPY_EXPERIMENT_ID")]}),e(U,{type:"modal",isDismissable:!0,onDismiss:()=>{i(null)},children:t})]})}function qm(){const n=Bn();return s(H,{children:[e(zu,{dataset:n.dataset}),e(u.Suspense,{children:e(Ke,{})})]})}const or=function(){var n={defaultValue:null,kind:"LocalArgument",name:"datasetId"},a={defaultValue:null,kind:"LocalArgument",name:"experimentIds"},l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,concreteType:"Trace",kind:"LinkedField",name:"trace",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"traceId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"projectId",storageKey:null}],storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},r={alias:"comparisons",args:[{kind:"Variable",name:"experimentIds",variableName:"experimentIds"}],concreteType:"ExperimentComparison",kind:"LinkedField",name:"compareExperiments",plural:!0,selections:[{alias:null,args:null,concreteType:"DatasetExample",kind:"LinkedField",name:"example",plural:!1,selections:[l,{alias:null,args:null,concreteType:"DatasetExampleRevision",kind:"LinkedField",name:"revision",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"input",storageKey:null},{alias:"referenceOutput",args:null,kind:"ScalarField",name:"output",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"RunComparisonItem",kind:"LinkedField",name:"runComparisonItems",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"experimentId",storageKey:null},{alias:null,args:null,concreteType:"ExperimentRun",kind:"LinkedField",name:"runs",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"output",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"error",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"startTime",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"endTime",storageKey:null},t,{alias:null,args:null,concreteType:"ExperimentRunAnnotationConnection",kind:"LinkedField",name:"annotations",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentRunAnnotationEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"annotation",args:null,concreteType:"ExperimentRunAnnotation",kind:"LinkedField",name:"node",plural:!1,selections:[l,i,{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"annotatorKind",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"explanation",storageKey:null},t],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null},o=[{kind:"Variable",name:"id",variableName:"datasetId"}],c={kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"ExperimentConnection",kind:"LinkedField",name:"experiments",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[l,i,{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Dataset",abstractKey:null};return{fragment:{argumentDefinitions:[n,a],kind:"Fragment",metadata:null,name:"ExperimentCompareTableQuery",selections:[r,{alias:"dataset",args:o,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,c],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,n],kind:"Operation",name:"ExperimentCompareTableQuery",selections:[r,{alias:"dataset",args:o,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,c],storageKey:null}]},params:{cacheID:"97e80c617426f75b81affa68e276b3d8",id:null,metadata:{},name:"ExperimentCompareTableQuery",operationKind:"query",text:`query ExperimentCompareTableQuery(
|
|
3086
3086
|
$experimentIds: [GlobalID!]!
|
|
3087
3087
|
$datasetId: GlobalID!
|
|
3088
3088
|
) {
|
|
@@ -3140,7 +3140,7 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
|
|
|
3140
3140
|
}
|
|
3141
3141
|
}
|
|
3142
3142
|
}
|
|
3143
|
-
`}}}();or.hash="e6132b301f6d80be7f5c5b0653e25178";const xa={backgroundColor:"light",borderColor:"light",variant:"compact",collapsible:!0,bodyStyle:{padding:0}},
|
|
3143
|
+
`}}}();or.hash="e6132b301f6d80be7f5c5b0653e25178";const xa={backgroundColor:"light",borderColor:"light",variant:"compact",collapsible:!0,bodyStyle:{padding:0}},ju=C`
|
|
3144
3144
|
flex: 1 1 auto;
|
|
3145
3145
|
overflow: auto;
|
|
3146
3146
|
// Make sure the table fills up the remaining space
|
|
@@ -3174,25 +3174,25 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
|
|
|
3174
3174
|
display: flex;
|
|
3175
3175
|
flex-direction: row;
|
|
3176
3176
|
gap: var(--ac-global-dimension-static-size-100);
|
|
3177
|
-
`,
|
|
3177
|
+
`,qu=C`
|
|
3178
3178
|
display: flex;
|
|
3179
3179
|
flex-direction: row;
|
|
3180
3180
|
align-items: center;
|
|
3181
3181
|
color: var(--ac-global-color-primary);
|
|
3182
3182
|
gap: var(--ac-global-dimension-size-50);
|
|
3183
|
-
`;function
|
|
3183
|
+
`;function Bu(n){const{datasetId:a,experimentIds:l,displayFullText:t}=n,i=T.useLazyLoadQuery(or,{experimentIds:l,datasetId:a}),r=u.useMemo(()=>{var b,S;return((S=(b=i.dataset)==null?void 0:b.experiments)==null?void 0:S.edges.reduce((L,I)=>(L[I.experiment.id]={...I.experiment},L),{}))||{}},[i]),o=u.useMemo(()=>i.comparisons.map(b=>{const S=b.runComparisonItems.reduce((L,I)=>(L[I.experimentId]=I,L),{});return{...b,id:b.example.id,input:b.example.revision.input,referenceOutput:b.example.revision.referenceOutput,runComparisonMap:S}}),[i]),[c,d]=u.useState(null),m=u.useMemo(()=>[{header:"input",accessorKey:"input",minWidth:500,cell:({row:b})=>s("div",{css:dr,children:[e(ja,{children:e(Na,{json:b.original.input,disableTitle:!0,space:t?2:0})}),e("div",{className:"controls",css:cr,children:s(Fe,{children:[e(N,{variant:"default",size:"compact","aria-label":"View example details",icon:e(P,{svg:e(E.ExpandOutline,{})}),onClick:()=>{u.startTransition(()=>{d(e(u.Suspense,{children:e(Yi,{exampleId:b.original.example.id,onDismiss:()=>{d(null)}})}))})}}),e(On,{children:"View Example"})]})})]})},{header:"reference output",accessorKey:"referenceOutput",minWidth:500,cell:t?Ju:Fn}],[t]),f=u.useMemo(()=>l.map(b=>({header:()=>{var I,A;const S=(I=r[b])==null?void 0:I.name,L=((A=r[b])==null?void 0:A.sequenceNumber)||0;return s(h,{direction:"row",gap:"size-100",wrap:!0,children:[e(da,{sequenceNumber:L}),e(F,{children:S})]})},accessorKey:b,minSize:500,cell:({row:S})=>{var O,Z;const L=S.original.runComparisonMap[b],I=(L==null?void 0:L.runs.length)||0;if(I===0)return e(tl,{});if(I>1)return e(F,{color:"warning",children:`${I} runs`});const A=L==null?void 0:L.runs[0];let K=null;const D=(O=A==null?void 0:A.trace)==null?void 0:O.traceId,R=(Z=A==null?void 0:A.trace)==null?void 0:Z.projectId;D&&R&&(K=s(Fe,{children:[e(N,{variant:"default",className:"trace-button",size:"compact","aria-label":"View run trace",icon:e(P,{svg:e(E.Trace,{})}),onClick:ne=>{ne.preventDefault(),ne.stopPropagation(),u.startTransition(()=>{d(e(pr,{traceId:D,projectId:R,title:"Experiment Run Trace"}))})}}),e(On,{children:"View Trace"})]}));const w=s(H,{children:[s(Fe,{children:[e(N,{variant:"default",className:"expand-button",size:"compact","aria-label":"View example run details",icon:e(P,{svg:e(E.ExpandOutline,{})}),onClick:ne=>{ne.preventDefault(),ne.stopPropagation(),u.startTransition(()=>{d(e(Zu,{selectedExample:S.original,datasetId:a,experimentInfoById:r}))})}}),e(On,{children:"View run details"})]}),K]});return A?e(Wu,{controls:w,children:e(Uu,{...A,displayFullText:t,setDialog:d})}):e(tl,{})}})),[l,r,a,t]),g=u.useMemo(()=>[...m,...f,{id:"tail",minSize:500}],[m,f]),p=ue({columns:g,data:o,getCoreRowModel:me(),columnResizeMode:"onChange"}),y=Te.useMemo(()=>{const b=p.getFlatHeaders(),S={};for(let L=0;L<b.length;L++){const I=b[L];S[`--header-${I.id}-size`]=I.getSize(),S[`--col-${I.column.id}-size`]=I.column.getSize()}return S},[p.getState().columnSizingInfo,p.getState().columnSizing]),v=p.getRowModel().rows.length===0;return s("div",{css:ju,children:[s("table",{css:b=>C(He(b),Es),style:{...y,width:p.getTotalSize(),minWidth:"100%"},children:[e("thead",{children:p.getHeaderGroups().map(b=>e("tr",{children:b.headers.map(S=>s("th",{style:{width:`calc(var(--header-${S==null?void 0:S.id}-size) * 1px)`},children:[e("div",{children:B(S.column.columnDef.header,S.getContext())}),e("div",{onMouseDown:S.getResizeHandler(),onTouchStart:S.getResizeHandler(),className:`resizer ${S.column.getIsResizing()?"isResizing":""}`})]},S.id))},b.id))}),v?e(Ge,{}):p.getState().columnSizingInfo.isResizingColumn?e(Hu,{table:p}):e(ur,{table:p})]}),e(U,{isDismissable:!0,type:"slideOver",onDismiss:()=>{d(null)},children:c})]})}function ur({table:n}){return e("tbody",{children:n.getRowModel().rows.map(a=>e("tr",{children:a.getVisibleCells().map(l=>e("td",{style:{width:`calc(var(--col-${l.column.id}-size) * 1px)`},children:B(l.column.columnDef.cell,l.getContext())},l.id))},a.id))})}const Hu=Te.memo(ur,(n,a)=>n.table.options.data===a.table.options.data);function Gu(n){const{datasetId:a,exampleId:l}=n,t=ae();return e("div",{onClick:i=>{i.preventDefault(),i.stopPropagation()},children:e(Ue,{buttonSize:"compact",align:"end",onAction:i=>{switch(i){case"gotoExample":return t(`/datasets/${a}/examples/${l}`);default:be()}},children:e(J,{children:s(h,{direction:"row",gap:"size-75",justifyContent:"start",alignItems:"center",children:[e(P,{svg:e(E.ExternalLinkOutline,{})}),e(F,{children:"Go to example"})]})},"gotoExample")})})}function Uu(n){const{output:a,error:l,startTime:t,endTime:i,annotations:r,displayFullText:o,setDialog:c}=n;if(l)return e(mr,{error:l});const d=r!=null&&r.edges.length?r.edges.map(m=>m.annotation):[];return s(h,{direction:"column",gap:"size-100",height:"100%",justifyContent:"space-between",children:[e(ja,{children:e(Na,{json:a,disableTitle:!0,space:o?2:0})}),s("ul",{css:C`
|
|
3184
3184
|
display: flex;
|
|
3185
3185
|
flex-direction: row;
|
|
3186
3186
|
gap: var(--ac-global-dimension-static-size-100);
|
|
3187
3187
|
align-items: center;
|
|
3188
3188
|
flex-wrap: wrap;
|
|
3189
|
-
`,children:[e("li",{children:e(gr,{startTime:t,endTime:i})},"run-latency"),d.map(m=>e("li",{children:e(Un,{annotation:m,extra:m.trace&&e(x,{paddingTop:"size-100",children:s("div",{css:
|
|
3189
|
+
`,children:[e("li",{children:e(gr,{startTime:t,endTime:i})},"run-latency"),d.map(m=>e("li",{children:e(Un,{annotation:m,extra:m.trace&&e(x,{paddingTop:"size-100",children:s("div",{css:qu,children:[e(P,{svg:e(E.InfoOutline,{})}),e("span",{children:"Click to view evaluator trace"})]})}),children:e(pn,{annotation:m,onClick:()=>{const f=m.trace;f&&u.startTransition(()=>{c(e(pr,{traceId:f.traceId,projectId:f.projectId,title:`Evaluator Trace: ${m.name}`}))})}})})},m.id))]})]})}function Wu(n){return s("div",{css:dr,children:[n.children,e("div",{css:cr,className:"controls",children:n.controls})]})}function mr({error:n}){return s(h,{direction:"row",gap:"size-50",alignItems:"center",children:[e(P,{svg:e(E.AlertCircleOutline,{}),color:"danger"}),e(F,{color:"danger",children:n})]})}function gr({startTime:n,endTime:a}){const l=u.useMemo(()=>{let t=null;return n&&a&&(t=new Date(a).getTime()-new Date(n).getTime()),t},[n,a]);return l===null?null:e(xe,{latencyMs:l})}function tl(){return s(h,{direction:"row",gap:"size-50",children:[e(P,{svg:e(E.MinusCircleOutline,{}),color:"grey-800"}),e(F,{color:"text-700",children:"not run"})]})}function Ju({getValue:n}){const a=n();return e(ja,{children:e(Na,{json:a,space:2})})}function ja({children:n}){return e("div",{css:C`
|
|
3190
3190
|
max-height: 300px;
|
|
3191
3191
|
overflow-y: auto;
|
|
3192
|
-
`,children:n})}function
|
|
3192
|
+
`,children:n})}function Zu({selectedExample:n,datasetId:a,experimentInfoById:l}){return e(j,{title:`Comparing Experiments for Example: ${n.id}`,size:"fullscreen",extra:e(Gu,{datasetId:a,exampleId:n.id}),children:s(sn,{direction:"vertical",autoSaveId:"example-compare-panel-group",children:[e(ce,{defaultSize:100,children:e("div",{css:C`
|
|
3193
3193
|
overflow-y: auto;
|
|
3194
3194
|
height: 100%;
|
|
3195
|
-
`,children:e(x,{overflow:"hidden",padding:"size-200",children:s(h,{direction:"row",gap:"size-200",flex:"1 1 auto",children:[e(x,{width:"50%",children:e(z,{title:"Input",...xa,bodyStyle:{padding:0,maxHeight:"300px",overflowY:"auto"},extra:e(X,{text:JSON.stringify(n.input)}),children:e(
|
|
3195
|
+
`,children:e(x,{overflow:"hidden",padding:"size-200",children:s(h,{direction:"row",gap:"size-200",flex:"1 1 auto",children:[e(x,{width:"50%",children:e(z,{title:"Input",...xa,bodyStyle:{padding:0,maxHeight:"300px",overflowY:"auto"},extra:e(X,{text:JSON.stringify(n.input)}),children:e(ln,{value:JSON.stringify(n.input,null,2)})})}),e(x,{width:"50%",children:e(z,{title:"Reference Output",...xa,extra:e(X,{text:JSON.stringify(n.input)}),bodyStyle:{padding:0,maxHeight:"300px",overflowY:"auto"},children:e(ln,{value:JSON.stringify(n.referenceOutput,null,2)})})})]})})})}),e(on,{css:_n}),e(ce,{defaultSize:200,children:s(h,{direction:"column",height:"100%",children:[e(x,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderBottomColor:"dark",borderBottomWidth:"thin",flex:"none",children:e(te,{level:2,children:"Experiments"})}),e("div",{css:C`
|
|
3196
3196
|
overflow-y: auto;
|
|
3197
3197
|
height: 100%;
|
|
3198
3198
|
padding: var(--ac-global-dimension-static-size-200);
|
|
@@ -3200,7 +3200,7 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
|
|
|
3200
3200
|
display: flex;
|
|
3201
3201
|
flex-direction: column;
|
|
3202
3202
|
gap: var(--ac-global-dimension-static-size-200);
|
|
3203
|
-
`,children:n.runComparisonItems.map(t=>{const i=l[t.experimentId];return e("li",{children:e(z,{...xa,title:i==null?void 0:i.name,titleExtra:e(da,{sequenceNumber:(i==null?void 0:i.sequenceNumber)||0}),children:e("ul",{children:t.runs.map((r,o)=>{var c;return e("li",{children:s(h,{direction:"row",children:[e(x,{flex:!0,children:r.error?e(x,{padding:"size-200",children:e(mr,{error:r.error})}):e(
|
|
3203
|
+
`,children:n.runComparisonItems.map(t=>{const i=l[t.experimentId];return e("li",{children:e(z,{...xa,title:i==null?void 0:i.name,titleExtra:e(da,{sequenceNumber:(i==null?void 0:i.sequenceNumber)||0}),children:e("ul",{children:t.runs.map((r,o)=>{var c;return e("li",{children:s(h,{direction:"row",children:[e(x,{flex:!0,children:r.error?e(x,{padding:"size-200",children:e(mr,{error:r.error})}):e(ln,{value:JSON.stringify(r.output,null,2)})}),s(Sn,{width:"size-3000",children:[e(gr,{startTime:r.startTime,endTime:r.endTime}),e("ul",{css:C`
|
|
3204
3204
|
margin-top: var(
|
|
3205
3205
|
--ac-global-dimension-static-size-100
|
|
3206
3206
|
);
|
|
@@ -3211,12 +3211,12 @@ fragment ExperimentsTableFragment_2HEEH6 on Dataset {
|
|
|
3211
3211
|
gap: var(
|
|
3212
3212
|
--ac-global-dimension-static-size-100
|
|
3213
3213
|
);
|
|
3214
|
-
`,children:(c=r.annotations)==null?void 0:c.edges.map(d=>e("li",{children:e(
|
|
3214
|
+
`,children:(c=r.annotations)==null?void 0:c.edges.map(d=>e("li",{children:e(pn,{annotation:d.annotation})},d.annotation.id))})]})]})},o)})})})},t.experimentId)})})})]})})]})})}function pr({traceId:n,projectId:a,title:l}){const t=ae();return e(j,{title:l,size:"fullscreen",extra:e(N,{variant:"default",onClick:()=>t(`/projects/${a}/traces/${n}`),children:"View Trace in Project"}),children:e(jt,{traceId:n,projectId:a})})}const yr={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"ExperimentMultiSelector__experiments",selections:[{alias:null,args:null,concreteType:"ExperimentConnection",kind:"LinkedField",name:"experiments",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Dataset",abstractKey:null};yr.hash="1aa376b1e9425f49268ac231dc2c0412";function Xu(n){const{dataset:a,selectedExperimentIds:l,onChange:t,label:i,validationState:r,description:o,errorMessage:c,...d}=n,m=T.useFragment(yr,a),f=u.useMemo(()=>m.experiments.edges.map(y=>y.experiment),[m]),g=f.length===0,p=u.useMemo(()=>{if(g)return"No experiments";const y=l.length;return y>0?`${y} experiment${y>1?"s":""}`:"No experiments selected"},[l,g]);return e(ma,{label:i,isDisabled:g,validationState:r,description:o,errorMessage:c,children:e(za,{isDisabled:g,...d,menu:e(Wn,{selectionMode:"multiple",onSelectionChange:y=>{t(Array.from(y))},selectedKeys:new Set(l),children:f.map(y=>e(J,{textValue:y.name,children:s(h,{direction:"column",gap:"size-50",children:[s(h,{direction:"row",gap:"size-100",children:[e(da,{sequenceNumber:y.sequenceNumber}),e(F,{children:y.name})]}),e(F,{textSize:"small",color:"text-700",children:new Date(y.createdAt).toLocaleString()})]})},y.id))}),triggerProps:{placement:"bottom start"},children:p})})}function Bm(){const n=Bn(),[a,l]=u.useState(!1),[t,i]=ol(),r=t.getAll("experimentId"),o=r.length>0;return s("main",{css:C`
|
|
3215
3215
|
height: 100%;
|
|
3216
3216
|
display: flex;
|
|
3217
3217
|
flex-direction: column;
|
|
3218
3218
|
overflow: hidden;
|
|
3219
|
-
`,children:[e(x,{padding:"size-200",borderBottomColor:"dark",borderBottomWidth:"thin",flex:"none",children:s(h,{direction:"column",gap:"size-100",children:[e(te,{level:1,children:"Compare Experiments"}),s(h,{direction:"row",justifyContent:"space-between",alignItems:"end",children:[e(
|
|
3219
|
+
`,children:[e(x,{padding:"size-200",borderBottomColor:"dark",borderBottomWidth:"thin",flex:"none",children:s(h,{direction:"column",gap:"size-100",children:[e(te,{level:1,children:"Compare Experiments"}),s(h,{direction:"row",justifyContent:"space-between",alignItems:"end",children:[e(Xu,{dataset:n.dataset,selectedExperimentIds:r,label:"experiments",onChange:c=>{u.startTransition(()=>{t.delete("experimentId"),c.forEach(d=>{t.append("experimentId",d)}),i(t)})}}),e(ca,{onChange:c=>{l(c)},defaultSelected:!1,labelPlacement:"start",children:"Full Text"})]})]})}),o?e(u.Suspense,{fallback:e(se,{}),children:e(Bu,{datasetId:n.dataset.id,experimentIds:r,displayFullText:a})}):e(x,{padding:"size-200",children:e(Y,{variant:"info",title:"No Experiment Selected",children:"Please select one or more experiments."})})]})}const fr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"id"}],a=[{kind:"Variable",name:"id",variableName:"id"}],l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null};return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"experimentCompareLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[l,{kind:"InlineFragment",selections:[t,{args:null,kind:"FragmentSpread",name:"ExperimentMultiSelector__experiments"}],type:"Dataset",abstractKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"experimentCompareLoaderQuery",selections:[{alias:"dataset",args:a,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,{kind:"InlineFragment",selections:[t,{alias:null,args:null,concreteType:"ExperimentConnection",kind:"LinkedField",name:"experiments",plural:!1,selections:[{alias:null,args:null,concreteType:"ExperimentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"experiment",args:null,concreteType:"Experiment",kind:"LinkedField",name:"node",plural:!1,selections:[l,t,{alias:null,args:null,kind:"ScalarField",name:"sequenceNumber",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Dataset",abstractKey:null}],storageKey:null}]},params:{cacheID:"7e89f99f940098a21985137aae870de7",id:null,metadata:{},name:"experimentCompareLoaderQuery",operationKind:"query",text:`query experimentCompareLoaderQuery(
|
|
3220
3220
|
$id: GlobalID!
|
|
3221
3221
|
) {
|
|
3222
3222
|
dataset: node(id: $id) {
|
|
@@ -3242,8 +3242,9 @@ fragment ExperimentMultiSelector__experiments on Dataset {
|
|
|
3242
3242
|
}
|
|
3243
3243
|
}
|
|
3244
3244
|
}
|
|
3245
|
-
`}}}();fr.hash="fa02088830fd16688f0f2fba9a0009eb";async function
|
|
3245
|
+
`}}}();fr.hash="fa02088830fd16688f0f2fba9a0009eb";async function Hm(n){const{datasetId:a}=n.params;return await T.fetchQuery(Ie,fr,{id:a}).toPromise()}const hr=function(){var n=[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"expiresAt",storageKey:null}];return{fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"APIKeysCardQuery",selections:[{args:null,kind:"FragmentSpread",name:"SystemAPIKeysTableFragment"},{args:null,kind:"FragmentSpread",name:"UserAPIKeysTableFragment"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"APIKeysCardQuery",selections:[{alias:null,args:null,concreteType:"SystemApiKey",kind:"LinkedField",name:"systemApiKeys",plural:!0,selections:n,storageKey:null},{alias:null,args:null,concreteType:"UserApiKey",kind:"LinkedField",name:"userApiKeys",plural:!0,selections:n,storageKey:null}]},params:{cacheID:"b5ca39f5901adfac7e884cb2555989fa",id:null,metadata:{},name:"APIKeysCardQuery",operationKind:"query",text:`query APIKeysCardQuery {
|
|
3246
3246
|
...SystemAPIKeysTableFragment
|
|
3247
|
+
...UserAPIKeysTableFragment
|
|
3247
3248
|
}
|
|
3248
3249
|
|
|
3249
3250
|
fragment SystemAPIKeysTableFragment on Query {
|
|
@@ -3255,7 +3256,17 @@ fragment SystemAPIKeysTableFragment on Query {
|
|
|
3255
3256
|
expiresAt
|
|
3256
3257
|
}
|
|
3257
3258
|
}
|
|
3258
|
-
|
|
3259
|
+
|
|
3260
|
+
fragment UserAPIKeysTableFragment on Query {
|
|
3261
|
+
userApiKeys {
|
|
3262
|
+
id
|
|
3263
|
+
name
|
|
3264
|
+
description
|
|
3265
|
+
createdAt
|
|
3266
|
+
expiresAt
|
|
3267
|
+
}
|
|
3268
|
+
}
|
|
3269
|
+
`}}}();hr.hash="ad967afd45af0d5976982c70eaadb330";const kr=function(){var n={defaultValue:null,kind:"LocalArgument",name:"description"},a={defaultValue:null,kind:"LocalArgument",name:"expiresAt"},l={defaultValue:null,kind:"LocalArgument",name:"name"},t=[{fields:[{kind:"Variable",name:"description",variableName:"description"},{kind:"Variable",name:"expiresAt",variableName:"expiresAt"},{kind:"Variable",name:"name",variableName:"name"}],kind:"ObjectValue",name:"input"}],i={alias:null,args:null,kind:"ScalarField",name:"jwt",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},o={alias:null,args:null,concreteType:"SystemApiKey",kind:"LinkedField",name:"apiKey",plural:!1,selections:[r],storageKey:null};return{fragment:{argumentDefinitions:[n,a,l],kind:"Fragment",metadata:null,name:"CreateSystemAPIKeyDialogMutation",selections:[{alias:null,args:t,concreteType:"CreateSystemApiKeyMutationPayload",kind:"LinkedField",name:"createSystemApiKey",plural:!1,selections:[i,{alias:null,args:null,concreteType:"Query",kind:"LinkedField",name:"query",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"SystemAPIKeysTableFragment"}],storageKey:null},o],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[l,n,a],kind:"Operation",name:"CreateSystemAPIKeyDialogMutation",selections:[{alias:null,args:t,concreteType:"CreateSystemApiKeyMutationPayload",kind:"LinkedField",name:"createSystemApiKey",plural:!1,selections:[i,{alias:null,args:null,concreteType:"Query",kind:"LinkedField",name:"query",plural:!1,selections:[{alias:null,args:null,concreteType:"SystemApiKey",kind:"LinkedField",name:"systemApiKeys",plural:!0,selections:[r,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"expiresAt",storageKey:null}],storageKey:null}],storageKey:null},o],storageKey:null}]},params:{cacheID:"e162ef32e40e2920bbdb388bedd83989",id:null,metadata:{},name:"CreateSystemAPIKeyDialogMutation",operationKind:"mutation",text:`mutation CreateSystemAPIKeyDialogMutation(
|
|
3259
3270
|
$name: String!
|
|
3260
3271
|
$description: String = null
|
|
3261
3272
|
$expiresAt: DateTime = null
|
|
@@ -3280,7 +3291,15 @@ fragment SystemAPIKeysTableFragment on Query {
|
|
|
3280
3291
|
expiresAt
|
|
3281
3292
|
}
|
|
3282
3293
|
}
|
|
3283
|
-
`}}}();kr.hash="8e8563676b39f1e44ef4bac4057ef7e3";function
|
|
3294
|
+
`}}}();kr.hash="8e8563676b39f1e44ef4bac4057ef7e3";function Yu(n){const{onSystemKeyCreated:a}=n,[l,t]=u.useState(null),{control:i,handleSubmit:r,formState:{isDirty:o,isValid:c},setError:d}=qe({defaultValues:{name:"System",description:"",expiresAt:""}}),[m,f]=T.useMutation(kr),g=u.useCallback(p=>{if(p.expiresAt){const y=cl(p.expiresAt);if(!ul(y))return d("expiresAt",{message:"Date is not in a valid format"});if(y<new Date)return d("expiresAt",{message:"Date must be in the future"})}t(null),m({variables:{...p,expiresAt:p.expiresAt||null},onCompleted:y=>{a(y.createSystemApiKey.jwt)},onError:y=>{t(y.message)}})},[m,a,d]);return s(j,{title:"Create a System Key",isDismissable:!0,children:[l&&e(Y,{variant:"danger",banner:!0,children:l}),s(Qr,{onSubmit:r(g),children:[s(x,{padding:"size-200",children:[e(G,{name:"name",control:i,rules:{required:"System key name is required"},render:({field:{onChange:p,onBlur:y,value:k},fieldState:{invalid:v,error:b}})=>e(le,{label:"Name",description:"A short name to identify this key",errorMessage:b==null?void 0:b.message,validationState:v?"invalid":"valid",onChange:p,onBlur:y,value:k.toString()})}),e(G,{name:"description",control:i,render:({field:{onChange:p,onBlur:y,value:k},fieldState:{invalid:v,error:b}})=>e(Zn,{label:"description",description:"A description of the system key",isRequired:!1,height:100,errorMessage:b==null?void 0:b.message,validationState:v?"invalid":"valid",onChange:p,onBlur:y,value:k==null?void 0:k.toString()})}),e(G,{name:"expiresAt",control:i,render:({field:{name:p,onChange:y,onBlur:k,value:v},fieldState:{invalid:b,error:S}})=>e(le,{label:"Expires At",type:"datetime-local",name:p,description:"The date at which the key will expire. Optional",errorMessage:S==null?void 0:S.message,validationState:b?"invalid":"valid",onChange:y,onBlur:k,defaultValue:v})})]}),e(x,{paddingStart:"size-200",paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderColor:"dark",borderTopWidth:"thin",children:e(h,{direction:"row",gap:"size-100",justifyContent:"end",children:e(N,{variant:o?"primary":"default",type:"submit",size:"compact",disabled:!c||f,children:f?"Creating...":"Create Key"})})})]})]})}const br=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"DeleteSystemApiKeyMutationPayload",kind:"LinkedField",name:"deleteSystemApiKey",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"SystemAPIKeysTableDeleteAPIKeyMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"SystemAPIKeysTableDeleteAPIKeyMutation",selections:a},params:{cacheID:"c65d1d86f282379c1f529a7234b60120",id:null,metadata:{},name:"SystemAPIKeysTableDeleteAPIKeyMutation",operationKind:"mutation",text:`mutation SystemAPIKeysTableDeleteAPIKeyMutation(
|
|
3295
|
+
$input: DeleteApiKeyInput!
|
|
3296
|
+
) {
|
|
3297
|
+
deleteSystemApiKey(input: $input) {
|
|
3298
|
+
__typename
|
|
3299
|
+
id
|
|
3300
|
+
}
|
|
3301
|
+
}
|
|
3302
|
+
`}}}();br.hash="5b7f3beaf38ac72be768417e2082c889";const Sr={fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"SystemAPIKeysTableQuery",selections:[{args:null,kind:"FragmentSpread",name:"SystemAPIKeysTableFragment"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"SystemAPIKeysTableQuery",selections:[{alias:null,args:null,concreteType:"SystemApiKey",kind:"LinkedField",name:"systemApiKeys",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"expiresAt",storageKey:null}],storageKey:null}]},params:{cacheID:"94e06b8cd5879701a5d73bee083ad614",id:null,metadata:{},name:"SystemAPIKeysTableQuery",operationKind:"query",text:`query SystemAPIKeysTableQuery {
|
|
3284
3303
|
...SystemAPIKeysTableFragment
|
|
3285
3304
|
}
|
|
3286
3305
|
|
|
@@ -3293,20 +3312,25 @@ fragment SystemAPIKeysTableFragment on Query {
|
|
|
3293
3312
|
expiresAt
|
|
3294
3313
|
}
|
|
3295
3314
|
}
|
|
3296
|
-
`}};
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3315
|
+
`}};Sr.hash="de0fc04de739f0adfcbdeaff28b16265";const vr={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:[],operation:Sr}},name:"SystemAPIKeysTableFragment",selections:[{alias:null,args:null,concreteType:"SystemApiKey",kind:"LinkedField",name:"systemApiKeys",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"expiresAt",storageKey:null}],storageKey:null}],type:"Query",abstractKey:null};vr.hash="de0fc04de739f0adfcbdeaff28b16265";function Cr({handleDelete:n}){const[a,l]=u.useState(null),t=()=>{l(s(j,{title:"Delete System Key",children:[e(x,{padding:"size-200",children:e(F,{color:"danger",children:"Are you sure you want to delete this key? This cannot be undone and will disable all uses of this key."})}),e(x,{paddingEnd:"size-200",paddingTop:"size-100",paddingBottom:"size-100",borderTopColor:"light",borderTopWidth:"thin",children:e(h,{direction:"row",justifyContent:"end",children:e(N,{variant:"danger",onClick:()=>{n(),l(null)},children:"Delete Key"})})})]}))};return s(H,{children:[e(N,{variant:"danger",size:"compact",icon:e(P,{svg:e(E.TrashOutline,{})}),"aria-label":"Delete System Key",onClick:t}),e(U,{isDismissable:!0,onDismiss:()=>{l(null)},children:a})]})}function em({query:n}){const[a,l]=T.useRefetchableFragment(vr,n),t=ge(),[i]=T.useMutation(br),r=u.useCallback(g=>{i({variables:{input:{id:g}},onCompleted:()=>{t({title:"System key deleted",message:"The system key has been deleted and is no longer active."}),u.startTransition(()=>{l({},{fetchPolicy:"network-only"})})}})},[i,t]),o=u.useMemo(()=>[...a.systemApiKeys],[a]),c=u.useMemo(()=>[{header:"Name",accessorKey:"name"},{header:"Description",accessorKey:"description",cell:fe},{header:"Created At",accessorKey:"createdAt",cell:ve},{header:"Expires At",accessorKey:"expiresAt",cell:ve},{header:"",accessorKey:"id",size:10,cell:({row:p})=>e(h,{direction:"row",justifyContent:"end",width:"100%",children:e(Cr,{handleDelete:()=>{r(p.original.id)}})}),meta:{textAlign:"right"}}],[l,r]),d=ue({columns:c,data:o,getCoreRowModel:me()}),m=d.getRowModel().rows,f=d.getRowModel().rows.length===0;return s("table",{css:He,children:[e("thead",{children:d.getHeaderGroups().map(g=>e("tr",{children:g.headers.map(p=>e("th",{colSpan:p.colSpan,children:p.isPlaceholder?null:s("div",{className:p.column.getCanSort()?"cursor-pointer":"",onClick:p.column.getToggleSortingHandler(),style:{left:p.getStart(),width:p.getSize()},children:[B(p.column.columnDef.header,p.getContext()),p.column.getIsSorted()?e(P,{className:"sort-icon",svg:p.column.getIsSorted()==="asc"?e(E.ArrowUpFilled,{}):e(E.ArrowDownFilled,{})}):null]})},p.id))},g.id))}),f?e(Ge,{message:"No Keys"}):e("tbody",{children:m.map(g=>e("tr",{children:g.getVisibleCells().map(p=>e("td",{children:B(p.column.columnDef.cell,p.getContext())},p.id))},g.id))})]})}const Fr={fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"UserAPIKeysTableQuery",selections:[{args:null,kind:"FragmentSpread",name:"UserAPIKeysTableFragment"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"UserAPIKeysTableQuery",selections:[{alias:null,args:null,concreteType:"UserApiKey",kind:"LinkedField",name:"userApiKeys",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"expiresAt",storageKey:null}],storageKey:null}]},params:{cacheID:"cd87c66812c50e80c23448d835b9ab43",id:null,metadata:{},name:"UserAPIKeysTableQuery",operationKind:"query",text:`query UserAPIKeysTableQuery {
|
|
3316
|
+
...UserAPIKeysTableFragment
|
|
3317
|
+
}
|
|
3318
|
+
|
|
3319
|
+
fragment UserAPIKeysTableFragment on Query {
|
|
3320
|
+
userApiKeys {
|
|
3301
3321
|
id
|
|
3322
|
+
name
|
|
3323
|
+
description
|
|
3324
|
+
createdAt
|
|
3325
|
+
expiresAt
|
|
3302
3326
|
}
|
|
3303
3327
|
}
|
|
3304
|
-
`}}
|
|
3328
|
+
`}};Fr.hash="b74ea37cf5a935ebe3ce165a42a5fbf7";const Kr={argumentDefinitions:[],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:[],operation:Fr}},name:"UserAPIKeysTableFragment",selections:[{alias:null,args:null,concreteType:"UserApiKey",kind:"LinkedField",name:"userApiKeys",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"expiresAt",storageKey:null}],storageKey:null}],type:"Query",abstractKey:null};Kr.hash="b74ea37cf5a935ebe3ce165a42a5fbf7";function nm({query:n}){const[a,l]=T.useRefetchableFragment(Kr,n),t=u.useMemo(()=>[...a.userApiKeys],[a]),i=u.useMemo(()=>[{header:"Name",accessorKey:"name"},{header:"Description",accessorKey:"description",cell:fe},{header:"Created At",accessorKey:"createdAt",cell:ve},{header:"Expires At",accessorKey:"expiresAt",cell:ve},{header:"",accessorKey:"id",size:10,cell:()=>e(h,{direction:"row",justifyContent:"end",width:"100%",children:e(Cr,{handleDelete:()=>{u.startTransition(()=>{l({},{fetchPolicy:"network-only"})})}})}),meta:{textAlign:"right"}}],[l]),r=ue({columns:i,data:t,getCoreRowModel:me()}),o=r.getRowModel().rows,c=r.getRowModel().rows.length===0;return s("table",{css:He,children:[e("thead",{children:r.getHeaderGroups().map(d=>e("tr",{children:d.headers.map(m=>e("th",{colSpan:m.colSpan,children:m.isPlaceholder?null:s("div",{className:m.column.getCanSort()?"cursor-pointer":"",onClick:m.column.getToggleSortingHandler(),style:{left:m.getStart(),width:m.getSize()},children:[B(m.column.columnDef.header,m.getContext()),m.column.getIsSorted()?e(P,{className:"sort-icon",svg:m.column.getIsSorted()==="asc"?e(E.ArrowUpFilled,{}):e(E.ArrowDownFilled,{})}):null]})},m.id))},d.id))}),c?e(Ge,{message:"No Keys"}):e("tbody",{children:o.map(d=>e("tr",{children:d.getVisibleCells().map(m=>e("td",{children:B(m.column.columnDef.cell,m.getContext())},m.id))},d.id))})]})}function am(){const n=T.useLazyLoadQuery(hr,{});return s(ke,{children:[e(q,{title:"System Keys",name:"System Keys",children:e(em,{query:n})}),e(q,{title:"User Keys",name:"User Keys",children:e(nm,{query:n})})]})}function lm(){const[n,a]=u.useState(null),l=i=>{a(e(tm,{jwt:i}))},t=()=>{a(e(Yu,{onSystemKeyCreated:l}))};return s("div",{children:[e(Va,{title:"API Keys",variant:"compact",extra:e(N,{variant:"default",size:"compact",icon:e(P,{svg:e(E.PlusCircleOutline,{})}),onClick:t,children:"System Key"}),children:e(u.Suspense,{fallback:e(x,{padding:"size-100",children:e(se,{})}),children:e(am,{})})}),e(U,{onDismiss:()=>{a(null)},children:n})]})}function tm(n){const{jwt:a}=n;return s(j,{title:"New API Key Created",isDismissable:!0,children:[e(Y,{variant:"success",banner:!0,children:"You have successfully created a new API key. The API key will only be displayed once below. Please copy and save it in a secure location."}),e("div",{css:C`
|
|
3305
3329
|
padding: var(--ac-global-dimension-size-200);
|
|
3306
3330
|
.ac-field {
|
|
3307
3331
|
width: 100%;
|
|
3308
3332
|
}
|
|
3309
|
-
`,children:s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(le,{label:"API Key",isReadOnly:!0,value:a,minWidth:"100%"}),e(X,{text:a,size:"normal"})]})})]})}const
|
|
3333
|
+
`,children:s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(le,{label:"API Key",isReadOnly:!0,value:a,minWidth:"100%"}),e(X,{text:a,size:"normal"})]})})]})}const xr={fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"UsersCardQuery",selections:[{args:null,kind:"FragmentSpread",name:"UsersTable_users"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"UsersCardQuery",selections:[{alias:null,args:null,concreteType:"UserConnection",kind:"LinkedField",name:"users",plural:!1,selections:[{alias:null,args:null,concreteType:"UserEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"user",args:null,concreteType:"User",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"email",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"username",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,concreteType:"UserRole",kind:"LinkedField",name:"role",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}]},params:{cacheID:"475e4a6a89583e17246b7f9fe5b0cb84",id:null,metadata:{},name:"UsersCardQuery",operationKind:"query",text:`query UsersCardQuery {
|
|
3310
3334
|
...UsersTable_users
|
|
3311
3335
|
}
|
|
3312
3336
|
|
|
@@ -3324,7 +3348,7 @@ fragment UsersTable_users on Query {
|
|
|
3324
3348
|
}
|
|
3325
3349
|
}
|
|
3326
3350
|
}
|
|
3327
|
-
`}};
|
|
3351
|
+
`}};xr.hash="2b3e260c950dd1a6a1a6883ff6fb78c4";const Dr=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"input"}],a=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"UserMutationPayload",kind:"LinkedField",name:"createUser",plural:!1,selections:[{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"user",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"email",storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"NewUserDialogMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"NewUserDialogMutation",selections:a},params:{cacheID:"a9bf3794a5355d9d0e0a3acebe7f3809",id:null,metadata:{},name:"NewUserDialogMutation",operationKind:"mutation",text:`mutation NewUserDialogMutation(
|
|
3328
3352
|
$input: CreateUserInput!
|
|
3329
3353
|
) {
|
|
3330
3354
|
createUser(input: $input) {
|
|
@@ -3334,9 +3358,9 @@ fragment UsersTable_users on Query {
|
|
|
3334
3358
|
}
|
|
3335
3359
|
}
|
|
3336
3360
|
}
|
|
3337
|
-
`}}}();
|
|
3361
|
+
`}}}();Dr.hash="97d1aefa41e8831e57b6bb0d1a078a7c";function im({onNewUserCreated:n,onNewUserCreationError:a,onDismiss:l}){const[t,i]=T.useMutation(Dr),r=u.useCallback(o=>{t({variables:{input:o},onCompleted:c=>{n(c.createUser.user.email)},onError:c=>{a(c)}})},[t,n,a]);return e(U,{onDismiss:l,isDismissable:!0,type:"modal",isKeyboardDismissDisabled:!0,children:e(j,{title:"Add user",children:e(ws,{onSubmit:r,isSubmitting:i})})})}const Tr={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"UsersTable_users",selections:[{alias:null,args:null,concreteType:"UserConnection",kind:"LinkedField",name:"users",plural:!1,selections:[{alias:null,args:null,concreteType:"UserEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:"user",args:null,concreteType:"User",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"email",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"username",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,concreteType:"UserRole",kind:"LinkedField",name:"role",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Query",abstractKey:null};Tr.hash="a87302705dfc7b091db312313f46ec4f";function rm({query:n}){const a=T.useFragment(Tr,n),l=u.useMemo(()=>a.users.edges.map(({user:o})=>({email:o.email,username:o.username,createdAt:o.createdAt,roleName:o.role.name.toLocaleLowerCase()})),[a]),t=ue({columns:[{header:"email",accessorKey:"email"},{header:"username",accessorKey:"username"},{header:"role",accessorKey:"roleName"},{header:"created at",accessorKey:"createdAt",cell:ve}],data:l,getCoreRowModel:me(),getSortedRowModel:Dn()}),i=t.getRowModel().rows,r=t.getRowModel().rows.length===0;return s("table",{css:He,children:[e("thead",{children:t.getHeaderGroups().map(o=>e("tr",{children:o.headers.map(c=>e("th",{colSpan:c.colSpan,children:c.isPlaceholder?null:s("div",{className:c.column.getCanSort()?"cursor-pointer":"",onClick:c.column.getToggleSortingHandler(),style:{left:c.getStart(),width:c.getSize()},children:[B(c.column.columnDef.header,c.getContext()),c.column.getIsSorted()?e(P,{className:"sort-icon",svg:c.column.getIsSorted()==="asc"?e(E.ArrowUpFilled,{}):e(E.ArrowDownFilled,{})}):null]})},c.id))},o.id))}),r?e(Ge,{}):e("tbody",{children:i.map(o=>e("tr",{children:o.getVisibleCells().map(c=>e("td",{children:B(c.column.columnDef.cell,c.getContext())},c.id))},o.id))})]})}function sm(){const[n,a]=u.useState(0),[l,t]=u.useState(null),i=ge(),r=An(),o=T.useLazyLoadQuery(xr,{},{fetchKey:n,fetchPolicy:"store-and-network"});return s(z,{title:"Users",variant:"compact",bodyStyle:{padding:0},extra:e(N,{onClick:()=>{t(e(im,{onDismiss:()=>{t(null)},onNewUserCreated:c=>{i({title:"User added",message:`User ${c} has been added.`}),a(d=>d+1),t(null)},onNewUserCreationError:c=>{r({title:"Error adding user",message:c.message})}}))},variant:"default",size:"compact",icon:e(P,{svg:e(E.PlusCircleOutline,{})}),children:"Add User"}),children:[e(u.Suspense,{fallback:e(x,{padding:"size-e00",children:e(se,{})}),children:e(rm,{query:o})}),e(U,{onDismiss:()=>{t(null)},children:l})]})}const om=C`
|
|
3338
3362
|
overflow-y: auto;
|
|
3339
|
-
`,
|
|
3363
|
+
`,dm=C`
|
|
3340
3364
|
padding: var(--ac-global-dimension-size-400);
|
|
3341
3365
|
max-width: 1000px;
|
|
3342
3366
|
min-width: 500px;
|
|
@@ -3344,12 +3368,12 @@ fragment UsersTable_users on Query {
|
|
|
3344
3368
|
width: 100%;
|
|
3345
3369
|
margin-left: auto;
|
|
3346
3370
|
margin-right: auto;
|
|
3347
|
-
`,
|
|
3371
|
+
`,cm=C`
|
|
3348
3372
|
.ac-field {
|
|
3349
3373
|
// Hacky solution to make the text fields fill the remaining space
|
|
3350
3374
|
width: calc(100% - var(--ac-global-dimension-size-600));
|
|
3351
3375
|
}
|
|
3352
|
-
`;function
|
|
3376
|
+
`;function Gm(){const{authenticationEnabled:n}=$l();return e("main",{css:om,children:e("div",{css:dm,children:s(h,{direction:"column",gap:"size-200",width:"100%",children:[e(z,{title:"Platform Settings",variant:"compact",children:s("form",{css:cm,children:[s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(le,{label:"Hostname",value:Ia,isReadOnly:!0,description:"Connect to Phoenix over HTTP"}),e(Da,{text:Ia})]}),s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(le,{label:"Platform Version",isReadOnly:!0,value:aa,description:"The version of the Phoenix server"}),e(Da,{text:aa})]}),s(h,{direction:"row",gap:"size-100",alignItems:"end",children:[e(le,{label:"Python Version",isReadOnly:!0,value:`pip install 'arize-phoenix==${aa}'`,description:"The version of the Python client library to use to connect to this Phoenix"}),e(Da,{text:aa})]})]})}),n&&e(lm,{}),n&&e(sm,{})]})})})}function Da(n){return e(x,{paddingBottom:"19px",children:e(X,{text:n.text,size:"normal"})})}const il=window.Config.basename,rl={width:"100%",height:"100%",border:"none",backgroundColor:"white"};function Um(){return s("div",{css:C`
|
|
3353
3377
|
display: flex;
|
|
3354
3378
|
flex-direction: column;
|
|
3355
3379
|
flex: 1 1 auto;
|
|
@@ -3362,19 +3386,19 @@ fragment UsersTable_users on Query {
|
|
|
3362
3386
|
flex: 1 1 auto;
|
|
3363
3387
|
height: 100%;
|
|
3364
3388
|
}
|
|
3365
|
-
`,children:[e(Y,{variant:"info",banner:!0,icon:e(P,{svg:e(
|
|
3389
|
+
`,children:[e(Y,{variant:"info",banner:!0,icon:e(P,{svg:e(E.InfoFilled,{})}),children:"These APIs are under active development and are subject to change."}),s(ke,{children:[e(q,{name:"REST",children:({isSelected:n})=>n&&e("iframe",{src:`${il}/docs`,style:rl})}),e(q,{name:"GraphQL",children:({isSelected:n})=>n&&e("iframe",{src:`${il}/graphql`,style:rl})})]})]})}const Ir=function(){var n=[{defaultValue:null,kind:"LocalArgument",name:"email"},{defaultValue:null,kind:"LocalArgument",name:"password"}],a=[{alias:null,args:[{fields:[{kind:"Variable",name:"email",variableName:"email"},{kind:"Variable",name:"password",variableName:"password"}],kind:"ObjectValue",name:"input"}],kind:"ScalarField",name:"login",storageKey:null}];return{fragment:{argumentDefinitions:n,kind:"Fragment",metadata:null,name:"LoginFormMutation",selections:a,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:n,kind:"Operation",name:"LoginFormMutation",selections:a},params:{cacheID:"3028737b93cf12e20a73e49ca3c4ba84",id:null,metadata:{},name:"LoginFormMutation",operationKind:"mutation",text:`mutation LoginFormMutation(
|
|
3366
3390
|
$email: String!
|
|
3367
3391
|
$password: String!
|
|
3368
3392
|
) {
|
|
3369
3393
|
login(input: {email: $email, password: $password})
|
|
3370
3394
|
}
|
|
3371
|
-
`}}}();
|
|
3395
|
+
`}}}();Ir.hash="88ab683f7b6bd5c87e77fe2751da8d4c";function um(){const n=ae(),[a,l]=u.useState(null),[t,i]=T.useMutation(Ir),r=u.useCallback(d=>{l(null),t({variables:d,onCompleted:()=>{n("/")},onError:()=>{l("Invalid Login")}})},[t,n]),{control:o,handleSubmit:c}=qe({defaultValues:{email:"",password:""}});return s(H,{children:[a?s(x,{paddingBottom:"size-100",children:[e(Y,{variant:"danger",children:a})," "]}):null,s(mn,{children:[e(G,{name:"email",control:o,render:({field:{onChange:d,value:m}})=>e(le,{label:"Email",name:"email",isRequired:!0,type:"email",onChange:d,value:m,placeholder:"your email address"})}),e(G,{name:"password",control:o,render:({field:{onChange:d,value:m}})=>e(le,{label:"Password",name:"password",type:"password",isRequired:!0,onChange:d,value:m,placeholder:"your password"})}),e("div",{css:C`
|
|
3372
3396
|
margin-top: var(--ac-global-dimension-size-400);
|
|
3373
3397
|
margin-bottom: var(--ac-global-dimension-size-50);
|
|
3374
3398
|
button {
|
|
3375
3399
|
width: 100%;
|
|
3376
3400
|
}
|
|
3377
|
-
`,children:e(N,{variant:"primary",loading:i,onClick:c(r),children:"Login"})})]})]})}function dm(){return s("svg",{width:"253",height:"63",viewBox:"0 0 682 169",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s("g",{clipPath:"url(#clip0_290_1904)",children:[e("path",{d:"M147.458 105.593C147.022 103.63 146.028 101.824 144.492 100.222C143.901 99.6064 143.244 99.0233 142.529 98.4978C142.184 98.2432 141.815 98.005 141.437 97.7669C140.969 97.4712 140.484 97.192 139.95 96.921C137.995 95.9191 136.328 94.909 134.866 93.825C134.274 93.3897 133.699 92.9299 133.157 92.4535C131.851 91.312 130.972 90.3348 130.315 89.3C130.102 88.9715 129.913 88.6102 129.732 88.2653C129.658 88.1175 129.543 87.9943 129.412 87.8957C129.173 87.7233 128.869 87.6494 128.565 87.6986C128.097 87.789 127.736 88.1667 127.678 88.6431C127.637 89.0126 127.637 89.4068 127.687 89.8092C127.719 90.0474 127.588 90.2773 127.366 90.3758C127.317 90.4005 127.259 90.4087 127.21 90.4169C126.898 90.4498 126.619 90.6222 126.438 90.885C126.257 91.1478 126.208 91.4681 126.282 91.7719C126.348 92.0347 126.438 92.2236 126.512 92.3714L126.578 92.5028C126.627 92.5931 126.676 92.6917 126.726 92.782C126.873 93.0612 127.021 93.3405 127.202 93.6033C127.547 94.1042 127.933 94.6052 128.393 95.1389C128.541 95.3114 128.565 95.5578 128.459 95.7549C128.352 95.952 128.13 96.0669 127.908 96.0341C125.321 95.681 122.996 95.0979 120.836 94.3013C120.59 94.211 120.335 94.1206 120.097 94.0221C118.158 93.2009 121.658 89.7189 123.259 87.247C130.282 76.4479 131.736 64.0802 131.794 51.5647C131.851 39.4681 130.545 27.5357 128.138 15.7593V15.7429C126.569 5.87173 125.239 2.168 124.401 0.796558C124.22 0.435219 124.023 0.205276 123.818 0.0985162C123.588 -0.0575166 123.465 0.0163937 123.465 0.0163937C123.013 0.0328182 122.495 0.435219 121.871 1.08399C119.251 3.83509 119.399 7.11178 120.122 10.5363C123.432 26.0903 125.921 41.7346 124.787 57.7157C124.007 68.7365 121.953 79.3468 114.248 87.9779C113.789 88.4952 113.287 88.9798 112.786 89.4725C112.211 90.0391 111.316 91.1396 110.651 90.6797C109.764 90.0638 110.552 88.7991 110.831 88.1421C115.341 77.5729 116.639 66.5275 115.949 55.1453C115.932 54.8825 115.908 54.6197 115.891 54.3569V54.3405C115.883 54.1269 115.858 53.9298 115.842 53.7245C115.727 52.2217 115.587 50.7189 115.398 49.2242C113.46 31.1655 111.127 29.9911 111.127 29.9911C110.971 29.8515 110.782 29.7448 110.528 29.6955C109.304 29.4409 108.638 30.5167 108.096 31.3297C105.648 34.9924 106.733 38.8932 107.521 42.753C110.289 56.2703 110.33 69.6645 105.583 82.8124C105.147 84.0113 104.63 85.1775 104.08 86.3272C103.496 87.5508 103.119 89.0783 101.131 88.4213C99.2662 87.8054 99.7918 86.3929 100.03 85.1036C100.654 81.8269 101.155 78.542 101.467 75.2489V75.2653C101.509 74.9368 101.525 74.6247 101.55 74.3127C101.599 73.746 101.632 73.1712 101.665 72.6045C101.689 72.1282 101.714 71.6601 101.739 71.2002C101.747 70.9621 101.763 70.7321 101.763 70.494C102.141 60.0562 100.383 55.3095 99.7179 53.9052C99.644 53.7328 99.5619 53.5767 99.4715 53.4371C98.7815 52.4024 97.6398 52.5256 96.6541 53.5028C94.8388 55.2931 93.8367 57.4118 94.2967 60.0808C95.6438 67.8496 94.8552 75.5445 93.4096 83.1983C93.2124 84.2249 92.7524 86.0973 90.5593 85.6127C89.0644 85.2842 88.7194 84.6437 88.6372 83.3461C88.6537 82.3689 88.6372 81.3916 88.6044 80.4144C88.6044 80.3897 88.6044 80.3651 88.6044 80.3405C88.6044 80.2009 88.588 80.0612 88.588 79.9299C88.588 79.8559 88.5797 79.7902 88.5715 79.7245C88.5058 78.3942 88.399 77.0556 88.2347 75.717C88.2183 75.5856 88.1937 75.4624 88.1773 75.331C87.3394 67.7921 86.247 67.0612 86.247 67.0612C85.5488 66.1497 84.4563 66.3057 83.5117 67.2419C81.6964 69.0322 80.7764 71.1427 81.1543 73.8199C81.4336 75.7745 81.3596 75.175 81.5568 76.8831C81.7128 77.7618 81.8771 79.3632 81.8935 79.8724C81.8525 80.324 81.7375 80.7182 81.4582 81.0139C80.53 82.0076 79.0351 80.9892 77.9015 80.5211C55.9209 71.4302 37.1108 58.6683 20.691 42.523C14.2513 35.945 3.25273 22.6329 3.25273 22.6329C2.84203 22.1566 2.33276 21.8856 1.55243 22.2223C0.114982 22.8383 0.156052 24.6778 0.0246278 26.2217C-0.23822 29.3177 1.42101 31.5597 3.21987 33.662C28.0179 62.5856 58.2783 83.3708 94.8059 93.7675L101.377 95.5085C101.451 95.5249 101.533 95.5496 101.607 95.566C101.624 95.566 101.632 95.566 101.64 95.5742L107.299 97.077L107.456 97.1181C107.267 97.1756 107.061 97.2167 106.839 97.2577C100.613 98.4895 88.2923 96.223 78.3944 93.9153C73.4988 92.8888 68.6854 91.6405 63.9788 90.1541C63.7653 90.0884 63.642 90.0556 63.642 90.0556C45.3577 84.2331 28.6093 74.7972 13.9556 60.4093C12.5674 59.0461 11.286 57.5761 10.0211 56.0897C8.86289 54.71 6.47262 51.8275 5.643 50.8338C5.55265 50.7024 5.45408 50.5875 5.35551 50.4807C5.10909 50.2261 4.80517 50.0619 4.36983 50.1604C3.3513 50.3986 3.05559 51.4498 2.86667 52.3367C2.1192 55.9008 3.25273 58.8983 5.65122 61.5755C20.6582 78.3942 39.4929 89.1358 60.6439 96.1819C72.6528 100.181 85.0067 102.612 97.6069 104.164C90.0911 106.595 82.3617 107.334 74.5667 107.137C59.4775 106.759 45.3248 103.138 32.0264 96.6746C27.1226 94.1535 22.5556 91.3449 21.3564 90.5894C20.6664 90.1213 19.9518 89.8338 19.2454 90.3758C17.9229 91.4024 18.8347 93.2009 19.2618 94.6051C20.075 97.307 21.956 99.1712 24.3956 100.46C46.0641 111.917 68.9401 116.499 93.2946 112.434C95.7588 112.023 98.0998 111.572 100.679 110.701C96.6048 114.224 91.89 116.524 86.9369 118.339C71.6835 123.915 56.5287 123.693 41.4314 119.915C36.5851 118.618 30.9668 116.507 30.9668 116.507C30.1536 116.154 29.3486 116.031 28.7243 116.926C27.6237 118.503 28.5847 120.145 29.5375 121.632C31.7882 125.138 36.1416 125.483 39.5832 126.674C40.7578 127.052 37.5544 129.187 36.5276 129.975C31.5335 133.794 26.6462 137.284 21.6767 140.98L18.424 143.378C17.8654 143.764 17.3726 144.199 17.6272 145.004C17.9229 145.915 18.8675 146.08 19.7875 146.268C23.3442 147.008 26.3833 145.825 29.1925 143.723C35.2134 139.214 41.3493 134.837 47.2387 130.156C49.4811 128.374 51.5182 128.522 54.582 129.31C46.9183 135.083 39.7475 140.495 32.5685 145.899C25.2827 151.376 17.9969 156.854 10.711 162.323L5.89764 165.888C5.82371 165.937 5.758 165.986 5.69229 166.044L5.61836 166.093C5.20766 166.421 4.90374 166.791 4.9941 167.267C5.19123 168.351 6.4644 168.622 7.50758 168.803C11.8117 169.542 14.4813 167.924 17.4219 165.715C32.1496 154.661 46.9266 143.682 61.5721 132.521C64.8577 130.016 68.2337 128.604 72.9731 129.138C68.9401 132.152 65.0631 135.051 61.2436 137.908L50.8611 145.587C50.7871 145.636 50.7132 145.694 50.6475 145.751C50.0972 146.186 49.7111 146.695 49.9247 147.451C50.3189 148.822 51.97 148.987 53.3745 149.2C55.9537 149.586 58.1387 148.675 60.1675 147.164C61.3339 146.293 62.5085 145.439 63.6831 144.593L79.5361 132.004C79.5361 132.004 83.2817 129.327 87.6187 126.871C88.0048 126.633 88.3908 126.387 88.7851 126.148C88.9494 126.075 89.3601 125.886 89.9843 125.59C90.4525 125.352 90.9207 125.114 91.3807 124.892C92.0625 124.547 92.851 124.128 93.7381 123.644C96.2927 122.584 103.611 119.168 109.657 112.73C112.532 110.512 116.581 107.613 119.735 106.217H119.752C119.99 106.111 120.228 106.012 120.458 105.93C120.458 105.93 120.475 105.93 120.483 105.922C120.639 105.864 120.787 105.815 120.935 105.766L121.337 105.61C122.479 105.289 124.335 105.166 124.582 107.679C124.623 108.295 124.615 108.927 124.541 109.593C124.491 110.093 124.393 110.627 124.319 111.054C124.245 111.465 124.417 111.876 124.746 112.122C124.795 112.163 124.853 112.196 124.91 112.22C125.346 112.434 125.871 112.335 126.2 111.974C126.323 111.834 126.446 111.703 126.569 111.572C128.122 109.937 129.699 108.804 131.375 108.114C133.822 107.104 136.303 107.096 138.94 108.106C140.197 108.582 141.379 109.239 142.554 110.102C143.055 110.471 143.556 110.882 144.057 111.334C144.353 111.605 144.648 111.9 144.911 112.163L144.952 112.204L145.166 112.418C145.166 112.418 145.248 112.491 145.289 112.524C145.536 112.705 145.856 112.779 146.168 112.713C146.529 112.631 146.825 112.376 146.957 112.032C146.981 111.966 147.006 111.9 147.031 111.834C147.778 109.617 147.934 107.581 147.499 105.593H147.458Z",fill:"url(#paint0_linear_290_1904)"}),e("path",{d:"M120.113 94.0303C120.195 94.0632 120.269 94.096 120.351 94.1207C120.269 94.0878 120.187 94.0632 120.113 94.0303Z",fill:"#FEDBB5"}),e("path",{d:"M111.283 87.1238C111.283 87.1238 111.267 87.1567 111.267 87.1731C111.267 87.1567 111.283 87.1402 111.283 87.1238Z",fill:"#FEDBB5"}),e("path",{d:"M123.383 87.1074C123.383 87.1074 123.358 87.1487 123.341 87.1652C123.358 87.1487 123.366 87.1239 123.383 87.1074Z",fill:"#FEDBB5"}),e("path",{d:"M104.104 86.3354C103.965 86.6229 103.841 86.9267 103.71 87.2142C103.85 86.9267 103.973 86.6229 104.104 86.3354Z",fill:"#FEDBB5"}),e("path",{d:"M89.0233 84.7422C89.0233 84.7422 89.0233 84.7505 89.0316 84.7588C89.0316 84.7588 89.0316 84.7505 89.0233 84.7422Z",fill:"#FEDBB5"}),e("path",{d:"M89.0644 84.7998C89.1876 84.964 89.3437 85.1118 89.5408 85.235C89.3437 85.1118 89.1876 84.9722 89.0644 84.7998ZM89.0644 84.7833C89.0644 84.7833 89.0644 84.7833 89.0644 84.7915C89.0644 84.7915 89.0644 84.7915 89.0644 84.7833ZM89.0562 84.7751C89.0562 84.7751 89.0562 84.7751 89.0562 84.7833C89.0562 84.7833 89.0562 84.7833 89.0562 84.7751ZM88.6947 83.3626C88.6947 83.3626 88.6947 83.3708 88.6947 83.379C88.6947 83.379 88.6947 83.3708 88.6947 83.3626ZM79.1665 81.0878C79.1665 81.0878 79.1829 81.0878 79.1829 81.096C79.6429 81.2931 80.1029 81.4492 80.53 81.4492C80.7107 81.4492 80.8832 81.4245 81.0393 81.3588C80.875 81.4245 80.7025 81.4492 80.53 81.4492C80.0947 81.4492 79.6265 81.2849 79.1665 81.0878ZM88.629 79.6507C88.629 79.6507 88.629 79.6507 88.629 79.6589C88.629 79.6589 88.629 79.6589 88.629 79.6507Z",fill:"#E5B4A6"}),e("path",{d:"M120.36 94.1206C120.36 94.1206 120.434 94.1535 120.475 94.1617C120.475 94.1617 120.401 94.1289 120.36 94.1206ZM110.273 89.8749C110.273 90.187 110.38 90.4662 110.684 90.6797C110.79 90.7536 110.905 90.7865 111.029 90.7865C111.209 90.7865 111.398 90.7126 111.595 90.5894C111.406 90.7126 111.218 90.7865 111.029 90.7865C110.905 90.7865 110.79 90.7536 110.684 90.6797C110.38 90.4744 110.273 90.187 110.273 89.8749ZM110.914 88.0189C110.914 88.0189 110.881 88.1011 110.864 88.1421C110.881 88.1011 110.897 88.06 110.914 88.0189ZM111.226 87.2798C111.127 87.5262 111.02 87.7726 110.914 88.0189C111.02 87.7726 111.119 87.5262 111.226 87.2798ZM111.267 87.1731C111.267 87.1731 111.234 87.2388 111.226 87.2798C111.242 87.247 111.259 87.2141 111.267 87.1731ZM123.341 87.1731C123.341 87.1731 123.341 87.1813 123.333 87.1895C123.333 87.1895 123.333 87.1813 123.341 87.1731ZM123.391 87.0992C123.391 87.0992 123.391 87.1074 123.382 87.1156C123.382 87.1156 123.382 87.1074 123.391 87.0992ZM111.308 87.0992C111.308 87.0992 111.3 87.132 111.291 87.1402C111.291 87.1238 111.3 87.1074 111.308 87.0992ZM99.8001 86.7707C99.8001 87.4769 100.079 88.0928 101.155 88.446C101.484 88.5527 101.771 88.602 102.026 88.602C102.93 88.602 103.365 87.9615 103.71 87.2306C103.357 87.9697 102.921 88.602 102.026 88.602C101.78 88.602 101.492 88.5527 101.155 88.446C100.088 88.0928 99.8001 87.4769 99.8001 86.7707ZM92.7689 84.9886C92.4486 85.4074 91.9722 85.7195 91.2575 85.7195C91.1836 85.7195 91.1097 85.7195 91.0358 85.7113C91.1097 85.7113 91.1836 85.7195 91.2575 85.7195C91.9722 85.7195 92.4486 85.4157 92.7689 84.9886ZM106.651 79.7081C106.651 79.7081 106.651 79.7081 106.642 79.7081C106.322 80.7511 105.985 81.8023 105.616 82.8452C105.993 81.8023 106.338 80.7593 106.659 79.7081M94.1571 79.1251C93.9846 80.2748 93.7875 81.4163 93.5739 82.566C93.7875 81.4245 93.9846 80.2748 94.1571 79.1251ZM122.191 73.6311C120.623 78.7884 118.175 83.65 114.29 88.0025C113.83 88.5199 113.329 89.0044 112.828 89.4972C113.329 89.0126 113.821 88.5199 114.29 88.0025C118.175 83.65 120.623 78.7884 122.2 73.6311",fill:"#E5B4A6"}),e("path",{opacity:"0.4",d:"M2.20136 22.0745C2.00423 22.0745 1.79066 22.1238 1.55246 22.2223C0.53392 22.6658 0.254644 23.7252 0.139648 24.8503C5.61017 32.0196 27.213 58.4548 61.1943 76.5875C61.1943 76.5875 94.4692 94.1453 127.933 96.0423C125.346 95.6892 123.021 95.1061 120.861 94.3095C120.729 94.2602 120.606 94.2192 120.475 94.1699C108.318 91.542 97.9519 88.2571 90.6168 85.6292C90.7565 85.662 90.8961 85.6784 91.0193 85.6949C90.8879 85.6867 90.7401 85.662 90.5922 85.6292C90.1486 85.5306 89.8037 85.4074 89.5408 85.2432C83.7417 83.1244 80.0454 81.4984 79.1583 81.096C78.7312 80.9153 78.3123 80.6936 77.9344 80.5376C55.9538 71.4466 37.1437 58.6848 20.7239 42.5395C14.2513 35.945 3.25275 22.633 3.25275 22.633C2.97348 22.3045 2.6367 22.0745 2.20136 22.0745Z",fill:"url(#paint1_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M4.62448 50.1358C4.55056 50.1358 4.46842 50.144 4.37806 50.1687C3.35953 50.4068 3.06382 51.458 2.8749 52.3449C2.84204 52.5009 2.80919 52.6652 2.78455 52.8212C19.7711 75.832 42.5732 85.235 42.5732 85.235C65.3341 95.952 84.0128 98.12 95.3892 98.12C100.096 98.12 103.554 97.7505 105.533 97.463C104.63 97.5616 103.636 97.6109 102.568 97.6109C95.8984 97.6109 86.362 95.7795 78.4026 93.9235C73.5071 92.897 68.6937 91.6488 63.987 90.1623C63.7735 90.0966 63.6503 90.0638 63.6503 90.0638C45.3659 84.2413 28.6176 74.8054 13.9638 60.4175C12.5756 59.0543 11.2942 57.5843 10.0293 56.0979C8.87112 54.7182 6.48084 51.8357 5.65123 50.8421C5.56088 50.7107 5.46231 50.5957 5.36374 50.4889C5.16661 50.2836 4.9284 50.1358 4.62448 50.1358Z",fill:"url(#paint2_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M20.0669 90.1049C19.7958 90.1049 19.5247 90.187 19.2537 90.4005C18.1037 91.2874 18.6458 92.7738 19.0812 94.0632C27.5991 99.2287 47.132 109.289 70.2626 109.289C79.0023 109.289 88.243 107.86 97.607 104.189C90.8469 106.382 83.9061 107.195 76.9077 107.195C76.1274 107.195 75.3471 107.186 74.5667 107.162C59.4776 106.784 45.3249 103.162 32.0264 96.6993C27.1227 94.1781 22.5557 91.3695 21.3565 90.614C20.9293 90.3266 20.5022 90.1049 20.0669 90.1049Z",fill:"url(#paint3_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M99.1759 111.949C95.4632 114.791 91.2987 116.762 86.937 118.355C78.7559 121.344 70.5994 122.666 62.4675 122.666C55.4363 122.666 48.4298 121.681 41.4315 119.932C36.5852 118.634 30.9668 116.524 30.9668 116.524C30.6136 116.368 30.2604 116.261 29.9237 116.261C29.4883 116.261 29.0776 116.442 28.7326 116.951C28.2234 117.682 28.1577 118.429 28.3219 119.168C33.6939 121.665 45.2181 126.099 59.2723 126.099C71.4536 126.099 85.5406 122.765 99.1759 111.949Z",fill:"url(#paint4_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M62.9356 129.368C49.7358 129.368 39.7557 126.699 38.4908 126.346C38.8604 126.452 39.2218 126.567 39.5833 126.69C40.7579 127.068 37.5544 129.203 36.5276 129.992C32.8396 132.817 29.2008 135.461 25.5537 138.138H36.7576C40.2897 135.527 43.8052 132.907 47.2387 130.172C48.5119 129.154 49.7275 128.768 51.0993 128.768C52.1342 128.768 53.2678 128.99 54.582 129.335C46.9184 135.108 39.7475 140.52 32.5685 145.924C28.3711 149.077 24.1738 152.231 19.9764 155.384H31.246C41.3821 147.804 51.51 140.216 61.5721 132.546C63.8967 130.78 66.2623 129.557 69.1208 129.179C67.0016 129.318 64.9316 129.376 62.9439 129.376L62.9356 129.368Z",fill:"url(#paint5_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M60.5782 138.409H71.47L79.5115 132.02C79.5115 132.02 83.2571 129.343 87.5941 126.888C87.9801 126.649 88.3662 126.403 88.7605 126.165C88.9248 126.091 89.3354 125.902 89.9597 125.606C90.4279 125.368 90.8961 125.13 91.3561 124.908C92.0625 124.547 92.8921 124.112 93.8121 123.603C86.0499 126.855 78.0987 128.44 70.739 129.056C70.8375 129.056 70.9443 129.056 71.0429 129.056C71.6589 129.056 72.2996 129.088 72.965 129.162C68.9319 132.176 65.0549 135.075 61.2354 137.933L60.5782 138.418V138.409Z",fill:"url(#paint6_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M88.6701 83.3544C88.6865 82.3771 88.6701 81.3999 88.6373 80.4226V80.3487C88.6373 80.2091 88.6208 80.0695 88.6208 79.9381L88.6044 79.7328C88.5633 78.9115 88.4976 78.0903 88.4237 77.2609C85.8281 76.1687 83.3803 74.7726 81.1215 73.1301C81.1379 73.3601 81.1461 73.59 81.179 73.8364C81.4582 75.7909 81.3843 75.1914 81.5814 76.8995C81.7375 77.7783 81.9018 79.3797 81.9182 79.8888C81.8771 80.3405 81.7621 80.7347 81.4829 81.0303C81.1954 81.3342 80.8586 81.4491 80.4972 81.4491C80.0619 81.4491 79.5937 81.2849 79.1337 81.0878C79.9961 81.4738 83.7007 83.108 89.5408 85.2432C88.9165 84.8572 88.7194 84.2742 88.6619 83.3626L88.6701 83.3544Z",fill:"url(#paint7_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M131.022 64.885C128.59 68.2685 125.6 71.2331 122.175 73.6146C120.606 78.7719 118.158 83.6336 114.273 87.9861C113.813 88.5035 113.312 88.988 112.811 89.4807C112.326 89.9488 111.628 90.8029 111.02 90.8029C110.897 90.8029 110.782 90.77 110.675 90.6961C109.788 90.0802 110.577 88.8155 110.856 88.1585C112.31 84.7505 113.427 81.2931 114.257 77.7865C111.825 78.698 109.271 79.3386 106.634 79.6999C106.314 80.7429 105.977 81.794 105.607 82.837C105.172 84.036 104.655 85.2021 104.104 86.3518C103.62 87.3702 103.275 88.602 102.018 88.602C101.771 88.602 101.484 88.5527 101.147 88.446C99.2827 87.83 99.8084 86.4175 100.047 85.1282C100.367 83.4201 100.663 81.7119 100.909 79.9956C98.5927 79.9217 96.3256 79.626 94.1325 79.1168C93.9271 80.4883 93.6889 81.8515 93.4261 83.2148C93.2536 84.1263 92.8675 85.7113 91.2412 85.7113C91.044 85.7113 90.8305 85.6867 90.6005 85.6374C97.9356 88.2735 108.293 91.5584 120.458 94.1863C120.335 94.1371 120.22 94.096 120.105 94.0467C118.167 93.2255 121.666 89.7435 123.268 87.2716C127.777 80.3323 129.987 72.7523 131.005 64.8932L131.022 64.885Z",fill:"url(#paint8_linear_290_1904)"}),e("path",{opacity:"0.5",d:"M129.206 102.497C127.687 102.497 126.151 102.645 124.647 102.916C124.36 102.965 124.081 102.99 123.818 102.99C123.391 102.99 122.988 102.924 122.61 102.809C122.668 102.883 122.734 102.957 122.791 103.039C123.448 103.959 123.793 104.961 123.925 106.004C124.089 106.184 124.229 106.406 124.344 106.694C124.344 106.694 124.344 106.694 124.344 106.71C124.344 106.71 124.344 106.71 124.344 106.718C124.344 106.718 124.344 106.718 124.344 106.726C124.344 106.726 124.344 106.726 124.344 106.735C124.344 106.735 124.344 106.735 124.344 106.743C124.344 106.743 124.344 106.743 124.344 106.751C124.344 106.751 124.344 106.751 124.344 106.759C124.344 106.759 124.344 106.759 124.344 106.768V106.784C124.344 106.784 124.344 106.784 124.344 106.792C124.344 106.792 124.344 106.792 124.344 106.8C124.344 106.8 124.344 106.8 124.344 106.809C124.344 106.809 124.344 106.809 124.344 106.817C124.344 106.817 124.344 106.817 124.344 106.825C124.344 106.825 124.344 106.833 124.344 106.841C124.344 106.841 124.344 106.841 124.344 106.858C124.344 106.858 124.344 106.858 124.344 106.866C124.344 106.866 124.344 106.866 124.344 106.874C124.344 106.874 124.344 106.874 124.344 106.882C124.344 106.882 124.344 106.883 124.344 106.891C124.344 106.891 124.344 106.891 124.344 106.899C124.344 106.899 124.344 106.899 124.344 106.907C124.344 106.907 124.344 106.907 124.344 106.915C124.344 106.915 124.344 106.915 124.344 106.924C124.344 106.924 124.344 106.924 124.344 106.932C124.344 106.932 124.344 106.932 124.344 106.94C124.344 106.94 124.344 106.94 124.344 106.948C124.344 106.948 124.344 106.948 124.344 106.965C124.344 106.965 124.344 106.973 124.344 106.981C124.344 106.981 124.344 106.989 124.344 106.997V107.014C124.344 107.014 124.344 107.022 124.344 107.03C124.344 107.03 124.344 107.039 124.344 107.047C124.344 107.047 124.344 107.055 124.344 107.063C124.344 107.063 124.344 107.071 124.344 107.08C124.344 107.08 124.344 107.088 124.344 107.096C124.344 107.096 124.344 107.104 124.344 107.112C124.344 107.112 124.344 107.121 124.344 107.129C124.344 107.145 124.344 107.162 124.344 107.178C124.344 107.178 124.344 107.186 124.344 107.195C124.344 107.195 124.344 107.227 124.344 107.244C124.344 107.244 124.344 107.252 124.344 107.26V107.277C124.344 107.277 124.344 107.301 124.344 107.31C124.344 107.31 124.344 107.318 124.344 107.326V107.342V107.359C124.36 107.597 124.368 107.843 124.368 108.09C124.368 108.476 124.344 108.87 124.302 109.272C124.253 109.773 124.155 110.307 124.081 110.734C124.072 110.8 124.064 110.865 124.064 110.923C124.064 111.268 124.229 111.588 124.508 111.793L124.672 111.892C124.828 111.966 124.992 112.007 125.157 112.007C125.461 112.007 125.748 111.884 125.962 111.654C126.085 111.514 126.208 111.383 126.331 111.251C127.884 109.617 129.461 108.484 131.136 107.794C132.369 107.285 133.601 107.03 134.857 107.03C136.114 107.03 137.387 107.285 138.702 107.786C139.958 108.262 141.141 108.919 142.316 109.781C142.817 110.151 143.318 110.562 143.819 111.013C144.115 111.284 144.41 111.58 144.673 111.843L144.714 111.884L144.928 112.097L145.051 112.204C145.232 112.335 145.453 112.409 145.675 112.418C144.632 110.192 143.318 108.123 141.461 106.513C137.946 103.466 133.51 102.177 129.001 102.177",fill:"url(#paint9_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M128.779 87.6905L128.582 87.7069C128.114 87.7972 127.752 88.175 127.695 88.6513C127.654 89.0208 127.654 89.415 127.703 89.8174C127.72 89.9488 127.687 90.072 127.629 90.1706C129.51 92.9627 133.584 97.9065 139.769 99.7789C139.769 99.7789 149.331 104.78 146.916 112.032L146.99 111.834C147.737 109.617 147.893 107.581 147.458 105.593C147.022 103.63 146.029 101.824 144.492 100.222C143.901 99.6064 143.244 99.0234 142.529 98.4978C142.184 98.2432 141.815 98.0051 141.437 97.7669C140.969 97.4713 140.484 97.192 139.95 96.921C137.995 95.9191 136.328 94.909 134.866 93.825C134.274 93.3898 133.699 92.9299 133.157 92.4536C131.851 91.3121 130.972 90.3348 130.315 89.3001C130.102 88.9716 129.913 88.6102 129.732 88.2653C129.658 88.1175 129.543 87.9943 129.412 87.8958C129.231 87.7562 129.001 87.6823 128.763 87.6823",fill:"url(#paint10_linear_290_1904)"}),e("path",{opacity:"0.5",d:"M116.647 107.893L118.586 106.768L126.734 95.8535C126.734 95.8535 122.274 95.0076 120.122 94.0303C120.122 94.0303 117.887 104.222 109.632 112.738L112.672 110.488C113.887 109.634 114.988 108.903 116.647 107.893Z",fill:"url(#paint11_linear_290_1904)"}),e("path",{d:"M209.416 49.9962H230.197C245.221 49.9962 252.104 57.7157 252.104 73.5818V81.4409C252.104 97.307 245.221 105.027 230.197 105.027H218.123V148.264H209.416V49.9962ZM230.197 97.0196C239.323 97.0196 243.397 92.9463 243.397 81.8598V73.0152C243.397 62.0682 239.323 57.8553 230.197 57.8553H218.123V97.0196H230.197Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M284.114 49.9962H292.821V93.0941H319.64V49.9962H328.346V148.256H319.64V100.953H292.821V148.256H284.114V49.9962Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M362.451 125.656V72.5963C362.451 57.0177 370.312 48.5919 384.497 48.5919C398.683 48.5919 406.544 57.0177 406.544 72.5963V125.656C406.544 141.234 398.683 149.66 384.497 149.66C370.312 149.66 362.451 141.234 362.451 125.656ZM397.829 126.214V72.0297C397.829 61.5016 393.056 56.451 384.489 56.451C375.922 56.451 371.15 61.5016 371.15 72.0297V126.214C371.15 136.742 375.922 141.653 384.489 141.653C393.056 141.653 397.829 136.742 397.829 126.214Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M440.796 49.9962H480.108V57.8553H449.503V93.0859H474.638V100.945H449.503V140.249H480.108V148.248H440.796V49.9962Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M511.56 49.9962H523.076L548.629 125.935V49.9962H556.769V148.256H547.504L519.56 64.458V148.256H511.56V49.9962Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M592.007 49.9962H600.714V148.256H592.007V49.9962Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M651.674 98.1447L632.437 49.9962H641.702L657.144 89.0209L672.726 49.9962H681.154L661.917 98.1447L681.992 148.256H672.726L656.438 106.989L640.01 148.256H631.591L651.666 98.1447H651.674Z",fill:"var(--ac-global-text-color-900)"})]}),s("defs",{children:[s("linearGradient",{id:"paint0_linear_290_1904",x1:"22.0956",y1:"10.3474",x2:"97.4433",y2:"140.879",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#14BAB6"}),e("stop",{offset:"0.5",stopColor:"#00ADEE"}),e("stop",{offset:"1",stopColor:"#0095C4"})]}),s("linearGradient",{id:"paint1_linear_290_1904",x1:"95.422",y1:"114.807",x2:"31.8741",y2:"4.70214",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint2_linear_290_1904",x1:"76.6695",y1:"114.126",x2:"30.8746",y2:"34.7951",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint3_linear_290_1904",x1:"70.3612",y1:"119.915",x2:"44.7991",y2:"75.6384",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint4_linear_290_1904",x1:"71.4208",y1:"128.85",x2:"55.5071",y2:"101.279",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint5_linear_290_1904",x1:"44.5363",y1:"126.346",x2:"44.5363",y2:"155.384",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"0.03",stopColor:"#231F20",stopOpacity:"0.9"}),e("stop",{offset:"0.22",stopColor:"#231F20",stopOpacity:"0.4"}),e("stop",{offset:"0.42",stopColor:"#231F20",stopOpacity:"0.1"}),e("stop",{offset:"0.65",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint6_linear_290_1904",x1:"77.1952",y1:"123.603",x2:"77.1952",y2:"138.409",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"1",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint7_linear_290_1904",x1:"84.3413",y1:"85.235",x2:"84.3413",y2:"73.1301",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"0.03",stopColor:"#231F20",stopOpacity:"0.95"}),e("stop",{offset:"0.51",stopColor:"#231F20",stopOpacity:"0.26"}),e("stop",{offset:"0.81",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint8_linear_290_1904",x1:"110.815",y1:"94.1699",x2:"110.815",y2:"64.885",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"0.18",stopColor:"#231F20",stopOpacity:"0.48"}),e("stop",{offset:"0.38",stopColor:"#231F20",stopOpacity:"0.12"}),e("stop",{offset:"0.58",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint9_linear_290_1904",x1:"138.077",y1:"117.246",x2:"127.969",y2:"99.7278",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"1",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint10_linear_290_1904",x1:"146.226",y1:"112.434",x2:"131.084",y2:"86.1931",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint11_linear_290_1904",x1:"106.889",y1:"107.999",x2:"128.941",y2:"95.2581",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"0.31",stopColor:"#231F20",stopOpacity:"0.5"}),e("stop",{offset:"0.67",stopColor:"#231F20",stopOpacity:"0.13"}),e("stop",{offset:"1",stopColor:"#231F20",stopOpacity:"0"})]}),e("clipPath",{id:"clip0_290_1904",children:e("rect",{width:"682",height:"169",fill:"white"})})]})]})}function Hm(){return s("main",{css:C`
|
|
3401
|
+
`,children:e(N,{variant:"primary",loading:i,onClick:c(r),children:"Login"})})]})]})}function mm(){return s("svg",{width:"253",height:"63",viewBox:"0 0 682 169",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s("g",{clipPath:"url(#clip0_290_1904)",children:[e("path",{d:"M147.458 105.593C147.022 103.63 146.028 101.824 144.492 100.222C143.901 99.6064 143.244 99.0233 142.529 98.4978C142.184 98.2432 141.815 98.005 141.437 97.7669C140.969 97.4712 140.484 97.192 139.95 96.921C137.995 95.9191 136.328 94.909 134.866 93.825C134.274 93.3897 133.699 92.9299 133.157 92.4535C131.851 91.312 130.972 90.3348 130.315 89.3C130.102 88.9715 129.913 88.6102 129.732 88.2653C129.658 88.1175 129.543 87.9943 129.412 87.8957C129.173 87.7233 128.869 87.6494 128.565 87.6986C128.097 87.789 127.736 88.1667 127.678 88.6431C127.637 89.0126 127.637 89.4068 127.687 89.8092C127.719 90.0474 127.588 90.2773 127.366 90.3758C127.317 90.4005 127.259 90.4087 127.21 90.4169C126.898 90.4498 126.619 90.6222 126.438 90.885C126.257 91.1478 126.208 91.4681 126.282 91.7719C126.348 92.0347 126.438 92.2236 126.512 92.3714L126.578 92.5028C126.627 92.5931 126.676 92.6917 126.726 92.782C126.873 93.0612 127.021 93.3405 127.202 93.6033C127.547 94.1042 127.933 94.6052 128.393 95.1389C128.541 95.3114 128.565 95.5578 128.459 95.7549C128.352 95.952 128.13 96.0669 127.908 96.0341C125.321 95.681 122.996 95.0979 120.836 94.3013C120.59 94.211 120.335 94.1206 120.097 94.0221C118.158 93.2009 121.658 89.7189 123.259 87.247C130.282 76.4479 131.736 64.0802 131.794 51.5647C131.851 39.4681 130.545 27.5357 128.138 15.7593V15.7429C126.569 5.87173 125.239 2.168 124.401 0.796558C124.22 0.435219 124.023 0.205276 123.818 0.0985162C123.588 -0.0575166 123.465 0.0163937 123.465 0.0163937C123.013 0.0328182 122.495 0.435219 121.871 1.08399C119.251 3.83509 119.399 7.11178 120.122 10.5363C123.432 26.0903 125.921 41.7346 124.787 57.7157C124.007 68.7365 121.953 79.3468 114.248 87.9779C113.789 88.4952 113.287 88.9798 112.786 89.4725C112.211 90.0391 111.316 91.1396 110.651 90.6797C109.764 90.0638 110.552 88.7991 110.831 88.1421C115.341 77.5729 116.639 66.5275 115.949 55.1453C115.932 54.8825 115.908 54.6197 115.891 54.3569V54.3405C115.883 54.1269 115.858 53.9298 115.842 53.7245C115.727 52.2217 115.587 50.7189 115.398 49.2242C113.46 31.1655 111.127 29.9911 111.127 29.9911C110.971 29.8515 110.782 29.7448 110.528 29.6955C109.304 29.4409 108.638 30.5167 108.096 31.3297C105.648 34.9924 106.733 38.8932 107.521 42.753C110.289 56.2703 110.33 69.6645 105.583 82.8124C105.147 84.0113 104.63 85.1775 104.08 86.3272C103.496 87.5508 103.119 89.0783 101.131 88.4213C99.2662 87.8054 99.7918 86.3929 100.03 85.1036C100.654 81.8269 101.155 78.542 101.467 75.2489V75.2653C101.509 74.9368 101.525 74.6247 101.55 74.3127C101.599 73.746 101.632 73.1712 101.665 72.6045C101.689 72.1282 101.714 71.6601 101.739 71.2002C101.747 70.9621 101.763 70.7321 101.763 70.494C102.141 60.0562 100.383 55.3095 99.7179 53.9052C99.644 53.7328 99.5619 53.5767 99.4715 53.4371C98.7815 52.4024 97.6398 52.5256 96.6541 53.5028C94.8388 55.2931 93.8367 57.4118 94.2967 60.0808C95.6438 67.8496 94.8552 75.5445 93.4096 83.1983C93.2124 84.2249 92.7524 86.0973 90.5593 85.6127C89.0644 85.2842 88.7194 84.6437 88.6372 83.3461C88.6537 82.3689 88.6372 81.3916 88.6044 80.4144C88.6044 80.3897 88.6044 80.3651 88.6044 80.3405C88.6044 80.2009 88.588 80.0612 88.588 79.9299C88.588 79.8559 88.5797 79.7902 88.5715 79.7245C88.5058 78.3942 88.399 77.0556 88.2347 75.717C88.2183 75.5856 88.1937 75.4624 88.1773 75.331C87.3394 67.7921 86.247 67.0612 86.247 67.0612C85.5488 66.1497 84.4563 66.3057 83.5117 67.2419C81.6964 69.0322 80.7764 71.1427 81.1543 73.8199C81.4336 75.7745 81.3596 75.175 81.5568 76.8831C81.7128 77.7618 81.8771 79.3632 81.8935 79.8724C81.8525 80.324 81.7375 80.7182 81.4582 81.0139C80.53 82.0076 79.0351 80.9892 77.9015 80.5211C55.9209 71.4302 37.1108 58.6683 20.691 42.523C14.2513 35.945 3.25273 22.6329 3.25273 22.6329C2.84203 22.1566 2.33276 21.8856 1.55243 22.2223C0.114982 22.8383 0.156052 24.6778 0.0246278 26.2217C-0.23822 29.3177 1.42101 31.5597 3.21987 33.662C28.0179 62.5856 58.2783 83.3708 94.8059 93.7675L101.377 95.5085C101.451 95.5249 101.533 95.5496 101.607 95.566C101.624 95.566 101.632 95.566 101.64 95.5742L107.299 97.077L107.456 97.1181C107.267 97.1756 107.061 97.2167 106.839 97.2577C100.613 98.4895 88.2923 96.223 78.3944 93.9153C73.4988 92.8888 68.6854 91.6405 63.9788 90.1541C63.7653 90.0884 63.642 90.0556 63.642 90.0556C45.3577 84.2331 28.6093 74.7972 13.9556 60.4093C12.5674 59.0461 11.286 57.5761 10.0211 56.0897C8.86289 54.71 6.47262 51.8275 5.643 50.8338C5.55265 50.7024 5.45408 50.5875 5.35551 50.4807C5.10909 50.2261 4.80517 50.0619 4.36983 50.1604C3.3513 50.3986 3.05559 51.4498 2.86667 52.3367C2.1192 55.9008 3.25273 58.8983 5.65122 61.5755C20.6582 78.3942 39.4929 89.1358 60.6439 96.1819C72.6528 100.181 85.0067 102.612 97.6069 104.164C90.0911 106.595 82.3617 107.334 74.5667 107.137C59.4775 106.759 45.3248 103.138 32.0264 96.6746C27.1226 94.1535 22.5556 91.3449 21.3564 90.5894C20.6664 90.1213 19.9518 89.8338 19.2454 90.3758C17.9229 91.4024 18.8347 93.2009 19.2618 94.6051C20.075 97.307 21.956 99.1712 24.3956 100.46C46.0641 111.917 68.9401 116.499 93.2946 112.434C95.7588 112.023 98.0998 111.572 100.679 110.701C96.6048 114.224 91.89 116.524 86.9369 118.339C71.6835 123.915 56.5287 123.693 41.4314 119.915C36.5851 118.618 30.9668 116.507 30.9668 116.507C30.1536 116.154 29.3486 116.031 28.7243 116.926C27.6237 118.503 28.5847 120.145 29.5375 121.632C31.7882 125.138 36.1416 125.483 39.5832 126.674C40.7578 127.052 37.5544 129.187 36.5276 129.975C31.5335 133.794 26.6462 137.284 21.6767 140.98L18.424 143.378C17.8654 143.764 17.3726 144.199 17.6272 145.004C17.9229 145.915 18.8675 146.08 19.7875 146.268C23.3442 147.008 26.3833 145.825 29.1925 143.723C35.2134 139.214 41.3493 134.837 47.2387 130.156C49.4811 128.374 51.5182 128.522 54.582 129.31C46.9183 135.083 39.7475 140.495 32.5685 145.899C25.2827 151.376 17.9969 156.854 10.711 162.323L5.89764 165.888C5.82371 165.937 5.758 165.986 5.69229 166.044L5.61836 166.093C5.20766 166.421 4.90374 166.791 4.9941 167.267C5.19123 168.351 6.4644 168.622 7.50758 168.803C11.8117 169.542 14.4813 167.924 17.4219 165.715C32.1496 154.661 46.9266 143.682 61.5721 132.521C64.8577 130.016 68.2337 128.604 72.9731 129.138C68.9401 132.152 65.0631 135.051 61.2436 137.908L50.8611 145.587C50.7871 145.636 50.7132 145.694 50.6475 145.751C50.0972 146.186 49.7111 146.695 49.9247 147.451C50.3189 148.822 51.97 148.987 53.3745 149.2C55.9537 149.586 58.1387 148.675 60.1675 147.164C61.3339 146.293 62.5085 145.439 63.6831 144.593L79.5361 132.004C79.5361 132.004 83.2817 129.327 87.6187 126.871C88.0048 126.633 88.3908 126.387 88.7851 126.148C88.9494 126.075 89.3601 125.886 89.9843 125.59C90.4525 125.352 90.9207 125.114 91.3807 124.892C92.0625 124.547 92.851 124.128 93.7381 123.644C96.2927 122.584 103.611 119.168 109.657 112.73C112.532 110.512 116.581 107.613 119.735 106.217H119.752C119.99 106.111 120.228 106.012 120.458 105.93C120.458 105.93 120.475 105.93 120.483 105.922C120.639 105.864 120.787 105.815 120.935 105.766L121.337 105.61C122.479 105.289 124.335 105.166 124.582 107.679C124.623 108.295 124.615 108.927 124.541 109.593C124.491 110.093 124.393 110.627 124.319 111.054C124.245 111.465 124.417 111.876 124.746 112.122C124.795 112.163 124.853 112.196 124.91 112.22C125.346 112.434 125.871 112.335 126.2 111.974C126.323 111.834 126.446 111.703 126.569 111.572C128.122 109.937 129.699 108.804 131.375 108.114C133.822 107.104 136.303 107.096 138.94 108.106C140.197 108.582 141.379 109.239 142.554 110.102C143.055 110.471 143.556 110.882 144.057 111.334C144.353 111.605 144.648 111.9 144.911 112.163L144.952 112.204L145.166 112.418C145.166 112.418 145.248 112.491 145.289 112.524C145.536 112.705 145.856 112.779 146.168 112.713C146.529 112.631 146.825 112.376 146.957 112.032C146.981 111.966 147.006 111.9 147.031 111.834C147.778 109.617 147.934 107.581 147.499 105.593H147.458Z",fill:"url(#paint0_linear_290_1904)"}),e("path",{d:"M120.113 94.0303C120.195 94.0632 120.269 94.096 120.351 94.1207C120.269 94.0878 120.187 94.0632 120.113 94.0303Z",fill:"#FEDBB5"}),e("path",{d:"M111.283 87.1238C111.283 87.1238 111.267 87.1567 111.267 87.1731C111.267 87.1567 111.283 87.1402 111.283 87.1238Z",fill:"#FEDBB5"}),e("path",{d:"M123.383 87.1074C123.383 87.1074 123.358 87.1487 123.341 87.1652C123.358 87.1487 123.366 87.1239 123.383 87.1074Z",fill:"#FEDBB5"}),e("path",{d:"M104.104 86.3354C103.965 86.6229 103.841 86.9267 103.71 87.2142C103.85 86.9267 103.973 86.6229 104.104 86.3354Z",fill:"#FEDBB5"}),e("path",{d:"M89.0233 84.7422C89.0233 84.7422 89.0233 84.7505 89.0316 84.7588C89.0316 84.7588 89.0316 84.7505 89.0233 84.7422Z",fill:"#FEDBB5"}),e("path",{d:"M89.0644 84.7998C89.1876 84.964 89.3437 85.1118 89.5408 85.235C89.3437 85.1118 89.1876 84.9722 89.0644 84.7998ZM89.0644 84.7833C89.0644 84.7833 89.0644 84.7833 89.0644 84.7915C89.0644 84.7915 89.0644 84.7915 89.0644 84.7833ZM89.0562 84.7751C89.0562 84.7751 89.0562 84.7751 89.0562 84.7833C89.0562 84.7833 89.0562 84.7833 89.0562 84.7751ZM88.6947 83.3626C88.6947 83.3626 88.6947 83.3708 88.6947 83.379C88.6947 83.379 88.6947 83.3708 88.6947 83.3626ZM79.1665 81.0878C79.1665 81.0878 79.1829 81.0878 79.1829 81.096C79.6429 81.2931 80.1029 81.4492 80.53 81.4492C80.7107 81.4492 80.8832 81.4245 81.0393 81.3588C80.875 81.4245 80.7025 81.4492 80.53 81.4492C80.0947 81.4492 79.6265 81.2849 79.1665 81.0878ZM88.629 79.6507C88.629 79.6507 88.629 79.6507 88.629 79.6589C88.629 79.6589 88.629 79.6589 88.629 79.6507Z",fill:"#E5B4A6"}),e("path",{d:"M120.36 94.1206C120.36 94.1206 120.434 94.1535 120.475 94.1617C120.475 94.1617 120.401 94.1289 120.36 94.1206ZM110.273 89.8749C110.273 90.187 110.38 90.4662 110.684 90.6797C110.79 90.7536 110.905 90.7865 111.029 90.7865C111.209 90.7865 111.398 90.7126 111.595 90.5894C111.406 90.7126 111.218 90.7865 111.029 90.7865C110.905 90.7865 110.79 90.7536 110.684 90.6797C110.38 90.4744 110.273 90.187 110.273 89.8749ZM110.914 88.0189C110.914 88.0189 110.881 88.1011 110.864 88.1421C110.881 88.1011 110.897 88.06 110.914 88.0189ZM111.226 87.2798C111.127 87.5262 111.02 87.7726 110.914 88.0189C111.02 87.7726 111.119 87.5262 111.226 87.2798ZM111.267 87.1731C111.267 87.1731 111.234 87.2388 111.226 87.2798C111.242 87.247 111.259 87.2141 111.267 87.1731ZM123.341 87.1731C123.341 87.1731 123.341 87.1813 123.333 87.1895C123.333 87.1895 123.333 87.1813 123.341 87.1731ZM123.391 87.0992C123.391 87.0992 123.391 87.1074 123.382 87.1156C123.382 87.1156 123.382 87.1074 123.391 87.0992ZM111.308 87.0992C111.308 87.0992 111.3 87.132 111.291 87.1402C111.291 87.1238 111.3 87.1074 111.308 87.0992ZM99.8001 86.7707C99.8001 87.4769 100.079 88.0928 101.155 88.446C101.484 88.5527 101.771 88.602 102.026 88.602C102.93 88.602 103.365 87.9615 103.71 87.2306C103.357 87.9697 102.921 88.602 102.026 88.602C101.78 88.602 101.492 88.5527 101.155 88.446C100.088 88.0928 99.8001 87.4769 99.8001 86.7707ZM92.7689 84.9886C92.4486 85.4074 91.9722 85.7195 91.2575 85.7195C91.1836 85.7195 91.1097 85.7195 91.0358 85.7113C91.1097 85.7113 91.1836 85.7195 91.2575 85.7195C91.9722 85.7195 92.4486 85.4157 92.7689 84.9886ZM106.651 79.7081C106.651 79.7081 106.651 79.7081 106.642 79.7081C106.322 80.7511 105.985 81.8023 105.616 82.8452C105.993 81.8023 106.338 80.7593 106.659 79.7081M94.1571 79.1251C93.9846 80.2748 93.7875 81.4163 93.5739 82.566C93.7875 81.4245 93.9846 80.2748 94.1571 79.1251ZM122.191 73.6311C120.623 78.7884 118.175 83.65 114.29 88.0025C113.83 88.5199 113.329 89.0044 112.828 89.4972C113.329 89.0126 113.821 88.5199 114.29 88.0025C118.175 83.65 120.623 78.7884 122.2 73.6311",fill:"#E5B4A6"}),e("path",{opacity:"0.4",d:"M2.20136 22.0745C2.00423 22.0745 1.79066 22.1238 1.55246 22.2223C0.53392 22.6658 0.254644 23.7252 0.139648 24.8503C5.61017 32.0196 27.213 58.4548 61.1943 76.5875C61.1943 76.5875 94.4692 94.1453 127.933 96.0423C125.346 95.6892 123.021 95.1061 120.861 94.3095C120.729 94.2602 120.606 94.2192 120.475 94.1699C108.318 91.542 97.9519 88.2571 90.6168 85.6292C90.7565 85.662 90.8961 85.6784 91.0193 85.6949C90.8879 85.6867 90.7401 85.662 90.5922 85.6292C90.1486 85.5306 89.8037 85.4074 89.5408 85.2432C83.7417 83.1244 80.0454 81.4984 79.1583 81.096C78.7312 80.9153 78.3123 80.6936 77.9344 80.5376C55.9538 71.4466 37.1437 58.6848 20.7239 42.5395C14.2513 35.945 3.25275 22.633 3.25275 22.633C2.97348 22.3045 2.6367 22.0745 2.20136 22.0745Z",fill:"url(#paint1_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M4.62448 50.1358C4.55056 50.1358 4.46842 50.144 4.37806 50.1687C3.35953 50.4068 3.06382 51.458 2.8749 52.3449C2.84204 52.5009 2.80919 52.6652 2.78455 52.8212C19.7711 75.832 42.5732 85.235 42.5732 85.235C65.3341 95.952 84.0128 98.12 95.3892 98.12C100.096 98.12 103.554 97.7505 105.533 97.463C104.63 97.5616 103.636 97.6109 102.568 97.6109C95.8984 97.6109 86.362 95.7795 78.4026 93.9235C73.5071 92.897 68.6937 91.6488 63.987 90.1623C63.7735 90.0966 63.6503 90.0638 63.6503 90.0638C45.3659 84.2413 28.6176 74.8054 13.9638 60.4175C12.5756 59.0543 11.2942 57.5843 10.0293 56.0979C8.87112 54.7182 6.48084 51.8357 5.65123 50.8421C5.56088 50.7107 5.46231 50.5957 5.36374 50.4889C5.16661 50.2836 4.9284 50.1358 4.62448 50.1358Z",fill:"url(#paint2_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M20.0669 90.1049C19.7958 90.1049 19.5247 90.187 19.2537 90.4005C18.1037 91.2874 18.6458 92.7738 19.0812 94.0632C27.5991 99.2287 47.132 109.289 70.2626 109.289C79.0023 109.289 88.243 107.86 97.607 104.189C90.8469 106.382 83.9061 107.195 76.9077 107.195C76.1274 107.195 75.3471 107.186 74.5667 107.162C59.4776 106.784 45.3249 103.162 32.0264 96.6993C27.1227 94.1781 22.5557 91.3695 21.3565 90.614C20.9293 90.3266 20.5022 90.1049 20.0669 90.1049Z",fill:"url(#paint3_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M99.1759 111.949C95.4632 114.791 91.2987 116.762 86.937 118.355C78.7559 121.344 70.5994 122.666 62.4675 122.666C55.4363 122.666 48.4298 121.681 41.4315 119.932C36.5852 118.634 30.9668 116.524 30.9668 116.524C30.6136 116.368 30.2604 116.261 29.9237 116.261C29.4883 116.261 29.0776 116.442 28.7326 116.951C28.2234 117.682 28.1577 118.429 28.3219 119.168C33.6939 121.665 45.2181 126.099 59.2723 126.099C71.4536 126.099 85.5406 122.765 99.1759 111.949Z",fill:"url(#paint4_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M62.9356 129.368C49.7358 129.368 39.7557 126.699 38.4908 126.346C38.8604 126.452 39.2218 126.567 39.5833 126.69C40.7579 127.068 37.5544 129.203 36.5276 129.992C32.8396 132.817 29.2008 135.461 25.5537 138.138H36.7576C40.2897 135.527 43.8052 132.907 47.2387 130.172C48.5119 129.154 49.7275 128.768 51.0993 128.768C52.1342 128.768 53.2678 128.99 54.582 129.335C46.9184 135.108 39.7475 140.52 32.5685 145.924C28.3711 149.077 24.1738 152.231 19.9764 155.384H31.246C41.3821 147.804 51.51 140.216 61.5721 132.546C63.8967 130.78 66.2623 129.557 69.1208 129.179C67.0016 129.318 64.9316 129.376 62.9439 129.376L62.9356 129.368Z",fill:"url(#paint5_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M60.5782 138.409H71.47L79.5115 132.02C79.5115 132.02 83.2571 129.343 87.5941 126.888C87.9801 126.649 88.3662 126.403 88.7605 126.165C88.9248 126.091 89.3354 125.902 89.9597 125.606C90.4279 125.368 90.8961 125.13 91.3561 124.908C92.0625 124.547 92.8921 124.112 93.8121 123.603C86.0499 126.855 78.0987 128.44 70.739 129.056C70.8375 129.056 70.9443 129.056 71.0429 129.056C71.6589 129.056 72.2996 129.088 72.965 129.162C68.9319 132.176 65.0549 135.075 61.2354 137.933L60.5782 138.418V138.409Z",fill:"url(#paint6_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M88.6701 83.3544C88.6865 82.3771 88.6701 81.3999 88.6373 80.4226V80.3487C88.6373 80.2091 88.6208 80.0695 88.6208 79.9381L88.6044 79.7328C88.5633 78.9115 88.4976 78.0903 88.4237 77.2609C85.8281 76.1687 83.3803 74.7726 81.1215 73.1301C81.1379 73.3601 81.1461 73.59 81.179 73.8364C81.4582 75.7909 81.3843 75.1914 81.5814 76.8995C81.7375 77.7783 81.9018 79.3797 81.9182 79.8888C81.8771 80.3405 81.7621 80.7347 81.4829 81.0303C81.1954 81.3342 80.8586 81.4491 80.4972 81.4491C80.0619 81.4491 79.5937 81.2849 79.1337 81.0878C79.9961 81.4738 83.7007 83.108 89.5408 85.2432C88.9165 84.8572 88.7194 84.2742 88.6619 83.3626L88.6701 83.3544Z",fill:"url(#paint7_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M131.022 64.885C128.59 68.2685 125.6 71.2331 122.175 73.6146C120.606 78.7719 118.158 83.6336 114.273 87.9861C113.813 88.5035 113.312 88.988 112.811 89.4807C112.326 89.9488 111.628 90.8029 111.02 90.8029C110.897 90.8029 110.782 90.77 110.675 90.6961C109.788 90.0802 110.577 88.8155 110.856 88.1585C112.31 84.7505 113.427 81.2931 114.257 77.7865C111.825 78.698 109.271 79.3386 106.634 79.6999C106.314 80.7429 105.977 81.794 105.607 82.837C105.172 84.036 104.655 85.2021 104.104 86.3518C103.62 87.3702 103.275 88.602 102.018 88.602C101.771 88.602 101.484 88.5527 101.147 88.446C99.2827 87.83 99.8084 86.4175 100.047 85.1282C100.367 83.4201 100.663 81.7119 100.909 79.9956C98.5927 79.9217 96.3256 79.626 94.1325 79.1168C93.9271 80.4883 93.6889 81.8515 93.4261 83.2148C93.2536 84.1263 92.8675 85.7113 91.2412 85.7113C91.044 85.7113 90.8305 85.6867 90.6005 85.6374C97.9356 88.2735 108.293 91.5584 120.458 94.1863C120.335 94.1371 120.22 94.096 120.105 94.0467C118.167 93.2255 121.666 89.7435 123.268 87.2716C127.777 80.3323 129.987 72.7523 131.005 64.8932L131.022 64.885Z",fill:"url(#paint8_linear_290_1904)"}),e("path",{opacity:"0.5",d:"M129.206 102.497C127.687 102.497 126.151 102.645 124.647 102.916C124.36 102.965 124.081 102.99 123.818 102.99C123.391 102.99 122.988 102.924 122.61 102.809C122.668 102.883 122.734 102.957 122.791 103.039C123.448 103.959 123.793 104.961 123.925 106.004C124.089 106.184 124.229 106.406 124.344 106.694C124.344 106.694 124.344 106.694 124.344 106.71C124.344 106.71 124.344 106.71 124.344 106.718C124.344 106.718 124.344 106.718 124.344 106.726C124.344 106.726 124.344 106.726 124.344 106.735C124.344 106.735 124.344 106.735 124.344 106.743C124.344 106.743 124.344 106.743 124.344 106.751C124.344 106.751 124.344 106.751 124.344 106.759C124.344 106.759 124.344 106.759 124.344 106.768V106.784C124.344 106.784 124.344 106.784 124.344 106.792C124.344 106.792 124.344 106.792 124.344 106.8C124.344 106.8 124.344 106.8 124.344 106.809C124.344 106.809 124.344 106.809 124.344 106.817C124.344 106.817 124.344 106.817 124.344 106.825C124.344 106.825 124.344 106.833 124.344 106.841C124.344 106.841 124.344 106.841 124.344 106.858C124.344 106.858 124.344 106.858 124.344 106.866C124.344 106.866 124.344 106.866 124.344 106.874C124.344 106.874 124.344 106.874 124.344 106.882C124.344 106.882 124.344 106.883 124.344 106.891C124.344 106.891 124.344 106.891 124.344 106.899C124.344 106.899 124.344 106.899 124.344 106.907C124.344 106.907 124.344 106.907 124.344 106.915C124.344 106.915 124.344 106.915 124.344 106.924C124.344 106.924 124.344 106.924 124.344 106.932C124.344 106.932 124.344 106.932 124.344 106.94C124.344 106.94 124.344 106.94 124.344 106.948C124.344 106.948 124.344 106.948 124.344 106.965C124.344 106.965 124.344 106.973 124.344 106.981C124.344 106.981 124.344 106.989 124.344 106.997V107.014C124.344 107.014 124.344 107.022 124.344 107.03C124.344 107.03 124.344 107.039 124.344 107.047C124.344 107.047 124.344 107.055 124.344 107.063C124.344 107.063 124.344 107.071 124.344 107.08C124.344 107.08 124.344 107.088 124.344 107.096C124.344 107.096 124.344 107.104 124.344 107.112C124.344 107.112 124.344 107.121 124.344 107.129C124.344 107.145 124.344 107.162 124.344 107.178C124.344 107.178 124.344 107.186 124.344 107.195C124.344 107.195 124.344 107.227 124.344 107.244C124.344 107.244 124.344 107.252 124.344 107.26V107.277C124.344 107.277 124.344 107.301 124.344 107.31C124.344 107.31 124.344 107.318 124.344 107.326V107.342V107.359C124.36 107.597 124.368 107.843 124.368 108.09C124.368 108.476 124.344 108.87 124.302 109.272C124.253 109.773 124.155 110.307 124.081 110.734C124.072 110.8 124.064 110.865 124.064 110.923C124.064 111.268 124.229 111.588 124.508 111.793L124.672 111.892C124.828 111.966 124.992 112.007 125.157 112.007C125.461 112.007 125.748 111.884 125.962 111.654C126.085 111.514 126.208 111.383 126.331 111.251C127.884 109.617 129.461 108.484 131.136 107.794C132.369 107.285 133.601 107.03 134.857 107.03C136.114 107.03 137.387 107.285 138.702 107.786C139.958 108.262 141.141 108.919 142.316 109.781C142.817 110.151 143.318 110.562 143.819 111.013C144.115 111.284 144.41 111.58 144.673 111.843L144.714 111.884L144.928 112.097L145.051 112.204C145.232 112.335 145.453 112.409 145.675 112.418C144.632 110.192 143.318 108.123 141.461 106.513C137.946 103.466 133.51 102.177 129.001 102.177",fill:"url(#paint9_linear_290_1904)"}),e("path",{opacity:"0.4",d:"M128.779 87.6905L128.582 87.7069C128.114 87.7972 127.752 88.175 127.695 88.6513C127.654 89.0208 127.654 89.415 127.703 89.8174C127.72 89.9488 127.687 90.072 127.629 90.1706C129.51 92.9627 133.584 97.9065 139.769 99.7789C139.769 99.7789 149.331 104.78 146.916 112.032L146.99 111.834C147.737 109.617 147.893 107.581 147.458 105.593C147.022 103.63 146.029 101.824 144.492 100.222C143.901 99.6064 143.244 99.0234 142.529 98.4978C142.184 98.2432 141.815 98.0051 141.437 97.7669C140.969 97.4713 140.484 97.192 139.95 96.921C137.995 95.9191 136.328 94.909 134.866 93.825C134.274 93.3898 133.699 92.9299 133.157 92.4536C131.851 91.3121 130.972 90.3348 130.315 89.3001C130.102 88.9716 129.913 88.6102 129.732 88.2653C129.658 88.1175 129.543 87.9943 129.412 87.8958C129.231 87.7562 129.001 87.6823 128.763 87.6823",fill:"url(#paint10_linear_290_1904)"}),e("path",{opacity:"0.5",d:"M116.647 107.893L118.586 106.768L126.734 95.8535C126.734 95.8535 122.274 95.0076 120.122 94.0303C120.122 94.0303 117.887 104.222 109.632 112.738L112.672 110.488C113.887 109.634 114.988 108.903 116.647 107.893Z",fill:"url(#paint11_linear_290_1904)"}),e("path",{d:"M209.416 49.9962H230.197C245.221 49.9962 252.104 57.7157 252.104 73.5818V81.4409C252.104 97.307 245.221 105.027 230.197 105.027H218.123V148.264H209.416V49.9962ZM230.197 97.0196C239.323 97.0196 243.397 92.9463 243.397 81.8598V73.0152C243.397 62.0682 239.323 57.8553 230.197 57.8553H218.123V97.0196H230.197Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M284.114 49.9962H292.821V93.0941H319.64V49.9962H328.346V148.256H319.64V100.953H292.821V148.256H284.114V49.9962Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M362.451 125.656V72.5963C362.451 57.0177 370.312 48.5919 384.497 48.5919C398.683 48.5919 406.544 57.0177 406.544 72.5963V125.656C406.544 141.234 398.683 149.66 384.497 149.66C370.312 149.66 362.451 141.234 362.451 125.656ZM397.829 126.214V72.0297C397.829 61.5016 393.056 56.451 384.489 56.451C375.922 56.451 371.15 61.5016 371.15 72.0297V126.214C371.15 136.742 375.922 141.653 384.489 141.653C393.056 141.653 397.829 136.742 397.829 126.214Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M440.796 49.9962H480.108V57.8553H449.503V93.0859H474.638V100.945H449.503V140.249H480.108V148.248H440.796V49.9962Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M511.56 49.9962H523.076L548.629 125.935V49.9962H556.769V148.256H547.504L519.56 64.458V148.256H511.56V49.9962Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M592.007 49.9962H600.714V148.256H592.007V49.9962Z",fill:"var(--ac-global-text-color-900)"}),e("path",{d:"M651.674 98.1447L632.437 49.9962H641.702L657.144 89.0209L672.726 49.9962H681.154L661.917 98.1447L681.992 148.256H672.726L656.438 106.989L640.01 148.256H631.591L651.666 98.1447H651.674Z",fill:"var(--ac-global-text-color-900)"})]}),s("defs",{children:[s("linearGradient",{id:"paint0_linear_290_1904",x1:"22.0956",y1:"10.3474",x2:"97.4433",y2:"140.879",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#14BAB6"}),e("stop",{offset:"0.5",stopColor:"#00ADEE"}),e("stop",{offset:"1",stopColor:"#0095C4"})]}),s("linearGradient",{id:"paint1_linear_290_1904",x1:"95.422",y1:"114.807",x2:"31.8741",y2:"4.70214",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint2_linear_290_1904",x1:"76.6695",y1:"114.126",x2:"30.8746",y2:"34.7951",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint3_linear_290_1904",x1:"70.3612",y1:"119.915",x2:"44.7991",y2:"75.6384",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint4_linear_290_1904",x1:"71.4208",y1:"128.85",x2:"55.5071",y2:"101.279",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint5_linear_290_1904",x1:"44.5363",y1:"126.346",x2:"44.5363",y2:"155.384",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"0.03",stopColor:"#231F20",stopOpacity:"0.9"}),e("stop",{offset:"0.22",stopColor:"#231F20",stopOpacity:"0.4"}),e("stop",{offset:"0.42",stopColor:"#231F20",stopOpacity:"0.1"}),e("stop",{offset:"0.65",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint6_linear_290_1904",x1:"77.1952",y1:"123.603",x2:"77.1952",y2:"138.409",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"1",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint7_linear_290_1904",x1:"84.3413",y1:"85.235",x2:"84.3413",y2:"73.1301",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"0.03",stopColor:"#231F20",stopOpacity:"0.95"}),e("stop",{offset:"0.51",stopColor:"#231F20",stopOpacity:"0.26"}),e("stop",{offset:"0.81",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint8_linear_290_1904",x1:"110.815",y1:"94.1699",x2:"110.815",y2:"64.885",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"0.18",stopColor:"#231F20",stopOpacity:"0.48"}),e("stop",{offset:"0.38",stopColor:"#231F20",stopOpacity:"0.12"}),e("stop",{offset:"0.58",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint9_linear_290_1904",x1:"138.077",y1:"117.246",x2:"127.969",y2:"99.7278",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"1",stopColor:"#231F20",stopOpacity:"0"})]}),s("linearGradient",{id:"paint10_linear_290_1904",x1:"146.226",y1:"112.434",x2:"131.084",y2:"86.1931",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#FDFDFE",stopOpacity:"0"}),e("stop",{offset:"0.11",stopColor:"#FDFDFE",stopOpacity:"0.17"}),e("stop",{offset:"0.3",stopColor:"#FDFDFE",stopOpacity:"0.42"}),e("stop",{offset:"0.47",stopColor:"#FDFDFE",stopOpacity:"0.63"}),e("stop",{offset:"0.64",stopColor:"#FDFDFE",stopOpacity:"0.79"}),e("stop",{offset:"0.78",stopColor:"#FDFDFE",stopOpacity:"0.9"}),e("stop",{offset:"0.91",stopColor:"#FDFDFE",stopOpacity:"0.97"}),e("stop",{offset:"1",stopColor:"#FDFDFE"})]}),s("linearGradient",{id:"paint11_linear_290_1904",x1:"106.889",y1:"107.999",x2:"128.941",y2:"95.2581",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#231F20"}),e("stop",{offset:"0.31",stopColor:"#231F20",stopOpacity:"0.5"}),e("stop",{offset:"0.67",stopColor:"#231F20",stopOpacity:"0.13"}),e("stop",{offset:"1",stopColor:"#231F20",stopOpacity:"0"})]}),e("clipPath",{id:"clip0_290_1904",children:e("rect",{width:"682",height:"169",fill:"white"})})]})]})}function Wm(){return s("main",{css:C`
|
|
3378
3402
|
padding-top: 200px;
|
|
3379
3403
|
width: 100%;
|
|
3380
3404
|
height: 100vh;
|
|
@@ -3388,7 +3412,7 @@ fragment UsersTable_users on Query {
|
|
|
3388
3412
|
flex-direction: column;
|
|
3389
3413
|
justify-content: space-between;
|
|
3390
3414
|
box-sizing: border-box;
|
|
3391
|
-
`,children:[s(x,{borderColor:"light",borderWidth:"thin",width:"size-5000",padding:"size-400",backgroundColor:"dark",marginStart:"auto",marginEnd:"auto",borderRadius:"medium",children:[e(h,{direction:"column",gap:"size-200",alignItems:"center",children:e(x,{paddingBottom:"size-200",children:e(
|
|
3415
|
+
`,children:[s(x,{borderColor:"light",borderWidth:"thin",width:"size-5000",padding:"size-400",backgroundColor:"dark",marginStart:"auto",marginEnd:"auto",borderRadius:"medium",children:[e(h,{direction:"column",gap:"size-200",alignItems:"center",children:e(x,{paddingBottom:"size-200",children:e(mm,{})})}),e(um,{})]}),s("footer",{css:C`
|
|
3392
3416
|
display: flex;
|
|
3393
3417
|
justify-content: center;
|
|
3394
3418
|
padding: var(--ac-global-dimension-size-400);
|
|
@@ -3402,12 +3426,12 @@ fragment UsersTable_users on Query {
|
|
|
3402
3426
|
text-decoration: underline;
|
|
3403
3427
|
}
|
|
3404
3428
|
}
|
|
3405
|
-
`,children:[e("a",{href:"https://docs.arize.com/phoenix",children:"Documentation"}),"|",e("a",{href:"https://join.slack.com/t/arize-ai/shared_invite/zt-1px8dcmlf-fmThhDFD_V_48oU7ALan4Q",children:"Community"}),"|",e("a",{href:"https://twitter.com/ArizePhoenix",children:"Social"}),"|",e("a",{href:"https://github.com/Arize-ai/phoenix",children:"GitHub"}),"|",e("a",{href:"https://github.com/Arize-ai/phoenix/releases",children:`arize-phoenix v${window.Config.platformVersion}`})]})]})}const
|
|
3429
|
+
`,children:[e("a",{href:"https://docs.arize.com/phoenix",children:"Documentation"}),"|",e("a",{href:"https://join.slack.com/t/arize-ai/shared_invite/zt-1px8dcmlf-fmThhDFD_V_48oU7ALan4Q",children:"Community"}),"|",e("a",{href:"https://twitter.com/ArizePhoenix",children:"Social"}),"|",e("a",{href:"https://github.com/Arize-ai/phoenix",children:"GitHub"}),"|",e("a",{href:"https://github.com/Arize-ai/phoenix/releases",children:`arize-phoenix v${window.Config.platformVersion}`})]})]})}const Lr=function(){var n=[{alias:null,args:null,kind:"ScalarField",name:"logout",storageKey:null}];return{fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"LogoutButtonMutation",selections:n,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"LogoutButtonMutation",selections:n},params:{cacheID:"9d746e0ae12cb3b7a88ea0a0d4da7727",id:null,metadata:{},name:"LogoutButtonMutation",operationKind:"mutation",text:`mutation LogoutButtonMutation {
|
|
3406
3430
|
logout
|
|
3407
3431
|
}
|
|
3408
|
-
`}}}();
|
|
3432
|
+
`}}}();Lr.hash="573156900cd932369859cbc65bdd1ffa";function gm(){const n=ae(),[a,l]=T.useMutation(Lr);return e(N,{onClick:()=>{a({variables:{},onCompleted:()=>{n("/login")}})},variant:"default",size:"compact",icon:e(P,{svg:e(E.LogOut,{})}),children:l?"Logging out...":"Log out"})}const pm=C`
|
|
3409
3433
|
overflow-y: auto;
|
|
3410
|
-
`,
|
|
3434
|
+
`,ym=C`
|
|
3411
3435
|
padding: var(--ac-global-dimension-size-400);
|
|
3412
3436
|
max-width: 800px;
|
|
3413
3437
|
min-width: 500px;
|
|
@@ -3415,4 +3439,4 @@ fragment UsersTable_users on Query {
|
|
|
3415
3439
|
width: 100%;
|
|
3416
3440
|
margin-left: auto;
|
|
3417
3441
|
margin-right: auto;
|
|
3418
|
-
`;function
|
|
3442
|
+
`;function Jm(){return e("main",{css:pm,children:e("div",{css:ym,children:e(z,{title:"Profile",extra:e(gm,{}),variant:"compact",children:"Profile goes here"})})})}export{Um as A,Dm as D,Em as E,vm as F,Wm as L,wm as M,Jm as P,Gm as S,Rm as T,Am as a,Fm as b,Km as c,Tm as d,xm as e,Pm as f,Mm as g,Cm as h,Lm as i,Im as j,Nm as k,$m as l,Vm as m,qm as n,jm as o,_m as p,Om as q,Qm as r,zm as s,Hm as t,Us as u,Bm as v};
|