Skip to content

Commit

Permalink
added changes for thr PR
Browse files Browse the repository at this point in the history
  • Loading branch information
LinoyBitan1 committed Jan 16, 2025
1 parent 9ba44f2 commit e15002e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion backend/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const blankDashboardCR: DashboardConfig = {
disableServingRuntimeParams: false,
disableConnectionTypes: false,
disableStorageClasses: false,
disableNIMModelServing: true,
disableNIMModelServing: false,
},
notebookController: {
enabled: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const MetricsPageTabs: React.FC<MetricsPageTabsProps> = ({ 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;
Expand All @@ -36,7 +36,6 @@ const MetricsPageTabs: React.FC<MetricsPageTabsProps> = ({ 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();

Expand All @@ -57,7 +56,7 @@ const MetricsPageTabs: React.FC<MetricsPageTabsProps> = ({ model }) => {
if (performanceMetricsAreaAvailable) {
return <PerformanceTab model={model} />;
}
if (nimMetricsAreaAvailable && isNimEnabled) {
if (isNimEnabled) {
return <NIMTab model={model} />;
}

Expand Down Expand Up @@ -92,7 +91,7 @@ const MetricsPageTabs: React.FC<MetricsPageTabsProps> = ({ model }) => {
)}

{/* Add NIN metrics tab */}
{nimMetricsAreaAvailable && isNimEnabled && (
{isNimEnabled && (
<Tab
eventKey={MetricsTabKeys.NIM}
title={<TabTitleText>NIM Metrics</TabTitleText>}
Expand Down

0 comments on commit e15002e

Please sign in to comment.