Link calibration rows to QA evidence map
This commit is contained in:
@@ -79,6 +79,7 @@ interface DetectionLabProps {
|
||||
onRunQa: () => void
|
||||
onSetCalibrationThresholdText: (value: string) => void
|
||||
onRunCalibration: () => void
|
||||
onOpenCalibrationEvidence: (qualityCheckId: string) => void
|
||||
}
|
||||
|
||||
export function DetectionLab({
|
||||
@@ -133,6 +134,7 @@ export function DetectionLab({
|
||||
onRunQa,
|
||||
onSetCalibrationThresholdText,
|
||||
onRunCalibration,
|
||||
onOpenCalibrationEvidence,
|
||||
}: DetectionLabProps): JSX.Element {
|
||||
const selectedDetectionModel = detectionModels.find((model) => model.model_id === selectedDetectionModelId) ?? null
|
||||
const selectedModelAsset = modelAssets.find((asset) => asset.model_asset_id === selectedModelAssetId) ?? null
|
||||
@@ -583,6 +585,7 @@ export function DetectionLab({
|
||||
<th>F1</th>
|
||||
<th>False positives</th>
|
||||
<th>False negatives</th>
|
||||
<th>Evidence</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -596,6 +599,17 @@ export function DetectionLab({
|
||||
<td>{formatNullableNumber(row.f1_score ?? null, 3)}</td>
|
||||
<td>{row.false_positives ?? 'n/a'}</td>
|
||||
<td>{row.false_negatives ?? 'n/a'}</td>
|
||||
<td>
|
||||
<button
|
||||
className="secondary-action table-action"
|
||||
type="button"
|
||||
onClick={() => row.quality_check_id ? onOpenCalibrationEvidence(row.quality_check_id) : undefined}
|
||||
disabled={!row.quality_check_id || row.status !== 'success'}
|
||||
aria-label={`Open evidence map for threshold ${row.threshold.toFixed(2)}`}
|
||||
>
|
||||
Open evidence map
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user