@@ -360,7 +360,17 @@ const MetricTable = ({
360
360
metricNames . forEach ( ( metric ) => {
361
361
if ( chartData [ metric ] ?. length ) {
362
362
const label = METRIC_DISPLAY_SHORT_HEADERS [ metric ] ?? metric ;
363
- row [ label ] = chartData [ metric ] [ index ] ?. actual ?? "" ;
363
+ // Find the matching record for this metric based on workflow_id and other identifying properties
364
+ const matchingRecord = chartData [ metric ] . find (
365
+ ( record : any ) =>
366
+ record . workflow_id === entry . workflow_id &&
367
+ record . job_id === entry . job_id &&
368
+ record . model === entry . model &&
369
+ record . device === entry . device &&
370
+ record . dtype === entry . dtype
371
+ ) ;
372
+ row [ label ] =
373
+ chartData [ metric ] [ index ] ?. actual ?? matchingRecord ?. actual ?? "" ;
364
374
}
365
375
} ) ;
366
376
return row ;
@@ -437,11 +447,24 @@ const MetricTable = ({
437
447
</ TableCell >
438
448
{ metricNames
439
449
. filter ( ( metric ) => chartData [ metric ] ?. length )
440
- . map ( ( metric ) => (
441
- < TableCell key = { `${ metric } -${ index } ` } sx = { { py : 0.25 } } >
442
- { chartData [ metric ] [ index ] ?. actual ?? "" }
443
- </ TableCell >
444
- ) ) }
450
+ . map ( ( metric ) => {
451
+ // Find the matching record for this metric based on workflow_id and other identifying properties
452
+ const matchingRecord = chartData [ metric ] . find (
453
+ ( record : any ) =>
454
+ record . workflow_id === entry . workflow_id &&
455
+ record . job_id === entry . job_id &&
456
+ record . model === entry . model &&
457
+ record . device === entry . device &&
458
+ record . dtype === entry . dtype
459
+ ) ;
460
+ return (
461
+ < TableCell key = { `${ metric } -${ index } ` } sx = { { py : 0.25 } } >
462
+ { chartData [ metric ] [ index ] ?. actual ??
463
+ matchingRecord ?. actual ??
464
+ "" }
465
+ </ TableCell >
466
+ ) ;
467
+ } ) }
445
468
</ TableRow >
446
469
) ;
447
470
} ) }
0 commit comments