diff --git a/frontend/src/components/tabs/MetricsTab.test.tsx b/frontend/src/components/tabs/MetricsTab.test.tsx index b7f5ec5a23c..ed54b981ffe 100644 --- a/frontend/src/components/tabs/MetricsTab.test.tsx +++ b/frontend/src/components/tabs/MetricsTab.test.tsx @@ -103,7 +103,7 @@ describe('MetricsTab with confidenceMetrics', () => { const execution = buildBasicExecution().setLastKnownState(Execution.State.COMPLETE); const artifactType = buildClassificationMetricsArtifactType(); const artifact = buildClassificationMetricsArtifact(); - artifact.getCustomPropertiesMap().set('name', new Value().setStringValue('metrics')); + artifact.getCustomPropertiesMap().set('display_name', new Value().setStringValue('metrics')); artifact.getCustomPropertiesMap().set( 'confidenceMetrics', new Value().setStructValue( @@ -149,7 +149,7 @@ describe('MetricsTab with confidenceMetrics', () => { const execution = buildBasicExecution().setLastKnownState(Execution.State.COMPLETE); const artifactType = buildClassificationMetricsArtifactType(); const artifact = buildClassificationMetricsArtifact(); - artifact.getCustomPropertiesMap().set('name', new Value().setStringValue('metrics')); + artifact.getCustomPropertiesMap().set('display_name', new Value().setStringValue('metrics')); artifact.getCustomPropertiesMap().set( 'confidenceMetrics', new Value().setStructValue( @@ -189,7 +189,7 @@ describe('MetricsTab with confidenceMetrics', () => { const execution = buildBasicExecution().setLastKnownState(Execution.State.COMPLETE); const artifactType = buildClassificationMetricsArtifactType(); const artifact = buildClassificationMetricsArtifact(); - artifact.getCustomPropertiesMap().set('name', new Value().setStringValue('metrics')); + artifact.getCustomPropertiesMap().set('display_name', new Value().setStringValue('metrics')); artifact.getCustomPropertiesMap().set( 'confidenceMetrics', new Value().setStructValue( @@ -220,7 +220,7 @@ describe('MetricsTab with confusionMatrix', () => { const execution = buildBasicExecution().setLastKnownState(Execution.State.COMPLETE); const artifactType = buildClassificationMetricsArtifactType(); const artifact = buildClassificationMetricsArtifact(); - artifact.getCustomPropertiesMap().set('name', new Value().setStringValue('metrics')); + artifact.getCustomPropertiesMap().set('display_name', new Value().setStringValue('metrics')); artifact.getCustomPropertiesMap().set( 'confusionMatrix', new Value().setStructValue( @@ -254,7 +254,7 @@ describe('MetricsTab with confusionMatrix', () => { const execution = buildBasicExecution().setLastKnownState(Execution.State.COMPLETE); const artifactType = buildClassificationMetricsArtifactType(); const artifact = buildClassificationMetricsArtifact(); - artifact.getCustomPropertiesMap().set('name', new Value().setStringValue('metrics')); + artifact.getCustomPropertiesMap().set('display_name', new Value().setStringValue('metrics')); artifact.getCustomPropertiesMap().set( 'confusionMatrix', new Value().setStructValue( @@ -290,7 +290,7 @@ describe('MetricsTab with confusionMatrix', () => { const execution = buildBasicExecution().setLastKnownState(Execution.State.COMPLETE); const artifactType = buildClassificationMetricsArtifactType(); const artifact = buildClassificationMetricsArtifact(); - artifact.getCustomPropertiesMap().set('name', new Value().setStringValue('metrics')); + artifact.getCustomPropertiesMap().set('display_name', new Value().setStringValue('metrics')); artifact.getCustomPropertiesMap().set( 'confusionMatrix', new Value().setStructValue( @@ -323,7 +323,7 @@ describe('MetricsTab with Scalar Metrics', () => { it('shows Scalar Metrics', async () => { const execution = buildBasicExecution().setLastKnownState(Execution.State.COMPLETE); const artifact = buildMetricsArtifact(); - artifact.getCustomPropertiesMap().set('name', new Value().setStringValue('metrics')); + artifact.getCustomPropertiesMap().set('display_name', new Value().setStringValue('metrics')); artifact.getCustomPropertiesMap().set('double', new Value().setDoubleValue(123.456)); artifact.getCustomPropertiesMap().set('int', new Value().setIntValue(123)); artifact.getCustomPropertiesMap().set( diff --git a/frontend/src/components/viewers/MetricsVisualizations.tsx b/frontend/src/components/viewers/MetricsVisualizations.tsx index 5c6289c3388..d17c870993d 100644 --- a/frontend/src/components/viewers/MetricsVisualizations.tsx +++ b/frontend/src/components/viewers/MetricsVisualizations.tsx @@ -145,7 +145,7 @@ function getVerifiedClassificationMetricsArtifacts( .map(artifact => ({ name: artifact .getCustomPropertiesMap() - .get('name') + .get('display_name') ?.getStringValue(), customProperties: artifact.getCustomPropertiesMap(), artifact: artifact, @@ -180,7 +180,7 @@ function getVerifiedMetricsArtifacts( return metricsArtifacts.filter(x => x .getCustomPropertiesMap() - .get('name') + .get('display_name') ?.getStringValue(), ); } @@ -231,7 +231,7 @@ interface ConfidenceMetricsSectionProps { function ConfidenceMetricsSection({ artifact }: ConfidenceMetricsSectionProps) { const customProperties = artifact.getCustomPropertiesMap(); - const name = customProperties.get('name')?.getStringValue(); + const name = customProperties.get('display_name')?.getStringValue(); const confidenceMetrics = customProperties .get('confidenceMetrics') @@ -318,7 +318,7 @@ const CONFUSION_MATRIX_DEFINITION = function ConfusionMatrixSection({ artifact }: ConfusionMatrixProps) { const customProperties = artifact.getCustomPropertiesMap(); - const name = customProperties.get('name')?.getStringValue(); + const name = customProperties.get('display_name')?.getStringValue(); const confusionMatrix = customProperties .get('confusionMatrix') @@ -403,14 +403,14 @@ interface ScalarMetricsSectionProps { } function ScalarMetricsSection({ artifact }: ScalarMetricsSectionProps) { const customProperties = artifact.getCustomPropertiesMap(); - const name = customProperties.get('name')?.getStringValue(); + const name = customProperties.get('display_name')?.getStringValue(); const data = customProperties .getEntryList() .map(([key]) => ({ key, value: JSON.stringify(getMetadataValue(customProperties.get(key))), })) - .filter(metric => metric.key !== 'name'); + .filter(metric => metric.key !== 'display_name'); if (data.length === 0) { return null;