@@ -148,7 +148,6 @@ impl LLMEvalResults {
148
148
& 10 ,
149
149
false ,
150
150
) ?;
151
-
152
151
self . histograms = Some ( histograms) ;
153
152
}
154
153
}
@@ -197,7 +196,12 @@ impl LLMEvalResults {
197
196
let x = reduced. column ( 0 ) . to_vec ( ) ;
198
197
let y = reduced. column ( 1 ) . to_vec ( ) ;
199
198
200
- self . cluster_data = Some ( ClusterData :: new ( x, y, dataset. clusters . clone ( ) ) ) ;
199
+ self . cluster_data = Some ( ClusterData :: new (
200
+ x,
201
+ y,
202
+ dataset. clusters . clone ( ) ,
203
+ dataset. idx_map . clone ( ) ,
204
+ ) ) ;
201
205
}
202
206
203
207
Ok ( ( ) )
@@ -213,11 +217,22 @@ pub struct ClusterData {
213
217
pub y : Vec < f64 > ,
214
218
#[ pyo3( get) ]
215
219
pub clusters : Vec < i32 > ,
220
+ pub idx_map : HashMap < usize , String > ,
216
221
}
217
222
218
223
impl ClusterData {
219
- pub fn new ( x : Vec < f64 > , y : Vec < f64 > , clusters : Vec < i32 > ) -> Self {
220
- ClusterData { x, y, clusters }
224
+ pub fn new (
225
+ x : Vec < f64 > ,
226
+ y : Vec < f64 > ,
227
+ clusters : Vec < i32 > ,
228
+ idx_map : HashMap < usize , String > ,
229
+ ) -> Self {
230
+ ClusterData {
231
+ x,
232
+ y,
233
+ clusters,
234
+ idx_map,
235
+ }
221
236
}
222
237
}
223
238
@@ -340,6 +355,7 @@ pub struct LLMEvalTaskResult {
340
355
pub metrics : BTreeMap < String , Score > ,
341
356
342
357
#[ pyo3( get) ]
358
+ #[ serde( skip) ]
343
359
pub embedding : BTreeMap < String , Vec < f32 > > ,
344
360
345
361
#[ pyo3( get) ]
0 commit comments