From e15002e6062b0264c8e37519a4595d4d634bbbdc Mon Sep 17 00:00:00 2001 From: LinoyBitan1 Date: Thu, 16 Jan 2025 19:12:14 +0200 Subject: [PATCH] added changes for thr PR --- backend/src/utils/constants.ts | 2 +- .../cypress/tests/mocked/modelServing/modelMetrics.cy.ts | 4 ++-- .../pages/modelServing/screens/metrics/MetricsPageTabs.tsx | 7 +++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/backend/src/utils/constants.ts b/backend/src/utils/constants.ts index 1f87eaae4b..4307ecb085 100644 --- a/backend/src/utils/constants.ts +++ b/backend/src/utils/constants.ts @@ -70,7 +70,7 @@ export const blankDashboardCR: DashboardConfig = { disableServingRuntimeParams: false, disableConnectionTypes: false, disableStorageClasses: false, - disableNIMModelServing: true, + disableNIMModelServing: false, }, notebookController: { enabled: true, diff --git a/frontend/src/__tests__/cypress/cypress/tests/mocked/modelServing/modelMetrics.cy.ts b/frontend/src/__tests__/cypress/cypress/tests/mocked/modelServing/modelMetrics.cy.ts index fb4fd1ed57..b630a5da90 100644 --- a/frontend/src/__tests__/cypress/cypress/tests/mocked/modelServing/modelMetrics.cy.ts +++ b/frontend/src/__tests__/cypress/cypress/tests/mocked/modelServing/modelMetrics.cy.ts @@ -980,8 +980,8 @@ describe('KServe NIM metrics', () => { modelMetricsKserveNim.getMetricsChart('GPU cache usage over time').shouldHaveNoData(); modelMetricsKserveNim.getMetricsChart('Tokens count').shouldHaveNoData(); modelMetricsKserveNim - .getMetricsChart('Current running, waiting, and max requests count') - .shouldHaveNoData(); + .getMetricsChart('Current running, waiting, and max requests count') + .shouldHaveNoData(); }); it('charts should not error out if a query is missing and there is no data QUERY_3', () => { diff --git a/frontend/src/pages/modelServing/screens/metrics/MetricsPageTabs.tsx b/frontend/src/pages/modelServing/screens/metrics/MetricsPageTabs.tsx index 65d87decbb..9c249c5660 100644 --- a/frontend/src/pages/modelServing/screens/metrics/MetricsPageTabs.tsx +++ b/frontend/src/pages/modelServing/screens/metrics/MetricsPageTabs.tsx @@ -26,7 +26,7 @@ const MetricsPageTabs: React.FC = ({ model }) => { const servingPlatformStatuses = useServingPlatformStatuses(); const isNIMAvailable = servingPlatformStatuses.kServeNIM.enabled; const { projects } = React.useContext(ProjectsContext); - const project = projects.find(byName(model.metadata.namespace)) ?? null; + const project = projects.find(byName(model.metadata.namespace)); const enabledTabs = useMetricsPageEnabledTabs(); const isKServeNIMEnabled = project ? isProjectNIMSupported(project) : false; const isNimEnabled = isNIMAvailable && isKServeNIMEnabled; @@ -36,7 +36,6 @@ const MetricsPageTabs: React.FC = ({ model }) => { SupportedArea.PERFORMANCE_METRICS, ).status; //check availability of NIM metrics - const nimMetricsAreaAvailable = useIsAreaAvailable(SupportedArea.NIM_MODEL).status; const { tab } = useParams<{ tab: MetricsTabKeys }>(); const navigate = useNavigate(); @@ -57,7 +56,7 @@ const MetricsPageTabs: React.FC = ({ model }) => { if (performanceMetricsAreaAvailable) { return ; } - if (nimMetricsAreaAvailable && isNimEnabled) { + if (isNimEnabled) { return ; } @@ -92,7 +91,7 @@ const MetricsPageTabs: React.FC = ({ model }) => { )} {/* Add NIN metrics tab */} - {nimMetricsAreaAvailable && isNimEnabled && ( + {isNimEnabled && ( NIM Metrics}