diff --git a/frontend/src/api/trustyai/rawTypes.ts b/frontend/src/api/trustyai/rawTypes.ts index 00b6588f89..d3e3aa9107 100644 --- a/frontend/src/api/trustyai/rawTypes.ts +++ b/frontend/src/api/trustyai/rawTypes.ts @@ -21,7 +21,7 @@ export type BaseMetric = { protectedAttribute: string; outcomeName: string; modelId: string; - requestName: string; + requestName?: string; thresholdDelta?: number; batchSize?: number; }; diff --git a/frontend/src/concepts/trustyai/utils.ts b/frontend/src/concepts/trustyai/utils.ts index b3cba0eba2..2070e4183c 100644 --- a/frontend/src/concepts/trustyai/utils.ts +++ b/frontend/src/concepts/trustyai/utils.ts @@ -16,7 +16,7 @@ export const formatListResponse = (x: BaseMetricListResponse): BiasMetricConfig[ id: m.id, metricType: m.request.metricName, modelId: m.request.modelId, - name: m.request.requestName, + name: m.request.requestName ?? `${m.request.metricName}-${m.request.modelId}`, outcomeName: m.request.outcomeName, privilegedAttribute: m.request.privilegedAttribute.value, protectedAttribute: m.request.protectedAttribute,