From 60cbae3b555d4de2abcfab365a734e002696a449 Mon Sep 17 00:00:00 2001 From: Yulia Krimerman Date: Thu, 12 Dec 2024 12:55:30 -0500 Subject: [PATCH 1/3] Support 'undeploy' in model registry (don't hide the Edit/Delete kebab when rendering deployments table in MR) (#3571) * saving * finalize * simplify --- .../ModelVersionRegisteredDeploymentsView.tsx | 11 +++++------ .../src/pages/modelServing/screens/global/data.ts | 1 + 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/pages/modelRegistry/screens/ModelVersionDetails/ModelVersionRegisteredDeploymentsView.tsx b/frontend/src/pages/modelRegistry/screens/ModelVersionDetails/ModelVersionRegisteredDeploymentsView.tsx index 844b7bd2b7..b6d44c2c87 100644 --- a/frontend/src/pages/modelRegistry/screens/ModelVersionDetails/ModelVersionRegisteredDeploymentsView.tsx +++ b/frontend/src/pages/modelRegistry/screens/ModelVersionDetails/ModelVersionRegisteredDeploymentsView.tsx @@ -1,13 +1,11 @@ import React from 'react'; import { Link } from 'react-router-dom'; - import { Alert, Stack } from '@patternfly/react-core'; - -import EmptyModelRegistryState from '~/pages/modelRegistry/screens/components/EmptyModelRegistryState'; import InferenceServiceTable from '~/pages/modelServing/screens/global/InferenceServiceTable'; import { getVersionDetailsInferenceServiceColumns } from '~/pages/modelServing/screens/global/data'; -import { typedEmptyImage, ProjectObjectType } from '~/concepts/design/utils'; -import ModelVersionDetailsTabs from './ModelVersionDetailsTabs'; +import ModelVersionDetailsTabs from '~/pages/modelRegistry/screens/ModelVersionDetails/ModelVersionDetailsTabs'; +import { ProjectObjectType, typedEmptyImage } from '~/concepts/design/utils'; +import EmptyModelRegistryState from '~/pages/modelRegistry/screens/components/EmptyModelRegistryState'; type ModelVersionRegisteredDeploymentsViewProps = Pick< React.ComponentProps, @@ -45,7 +43,7 @@ const ModelVersionRegisteredDeploymentsView: React.FC< getVersionDetailsInferenceServiceColumns(projects)} + getColumns={getVersionDetailsInferenceServiceColumns} inferenceServices={inferenceServices.data} servingRuntimes={servingRuntimes.data} isLoading={isLoading} @@ -53,4 +51,5 @@ const ModelVersionRegisteredDeploymentsView: React.FC< ); }; + export default ModelVersionRegisteredDeploymentsView; diff --git a/frontend/src/pages/modelServing/screens/global/data.ts b/frontend/src/pages/modelServing/screens/global/data.ts index b17542f37a..37656b20b3 100644 --- a/frontend/src/pages/modelServing/screens/global/data.ts +++ b/frontend/src/pages/modelServing/screens/global/data.ts @@ -103,6 +103,7 @@ export const getVersionDetailsInferenceServiceColumns = ( COL_ENDPOINT, COL_API_PROTOCOL, COL_STATUS, + COL_KEBAB, ]; export const getProjectInferenceServiceColumns = (): SortableData[] => [ From f155ba2e428a02a27c4ef423e1162667925cffdd Mon Sep 17 00:00:00 2001 From: Yulia Krimerman Date: Thu, 12 Dec 2024 17:11:22 -0500 Subject: [PATCH 2/3] Home Page MR card in the "Manage models" section (#3537) * waiting for recons * fixed test * addressed comments --- .../tests/mocked/home/homeAIFlows.cy.ts | 5 +- .../home/aiFlows/DeployAndMonitorGallery.tsx | 63 ++++++++++++++----- .../src/pages/home/aiFlows/useAIFlows.tsx | 8 ++- 3 files changed, 55 insertions(+), 21 deletions(-) diff --git a/frontend/src/__tests__/cypress/cypress/tests/mocked/home/homeAIFlows.cy.ts b/frontend/src/__tests__/cypress/cypress/tests/mocked/home/homeAIFlows.cy.ts index 3da816e1e2..6bb7c02239 100644 --- a/frontend/src/__tests__/cypress/cypress/tests/mocked/home/homeAIFlows.cy.ts +++ b/frontend/src/__tests__/cypress/cypress/tests/mocked/home/homeAIFlows.cy.ts @@ -57,7 +57,10 @@ describe('Home page AI Flows', () => { homeAISection.getProjectCard().find().should('not.exist'); - homePage.initHomeIntercepts({ disableModelServing: true }); + homePage.initHomeIntercepts({ + disableModelServing: true, + disableModelRegistry: true, + }); homePage.visit(); homeAISection.getModelsFlowCard().find().should('not.exist'); diff --git a/frontend/src/pages/home/aiFlows/DeployAndMonitorGallery.tsx b/frontend/src/pages/home/aiFlows/DeployAndMonitorGallery.tsx index 2627a21195..d99a59a59a 100644 --- a/frontend/src/pages/home/aiFlows/DeployAndMonitorGallery.tsx +++ b/frontend/src/pages/home/aiFlows/DeployAndMonitorGallery.tsx @@ -3,14 +3,40 @@ import { Content } from '@patternfly/react-core'; import { ProjectObjectType, SectionType } from '~/concepts/design/utils'; import InfoGalleryItem from '~/concepts/design/InfoGalleryItem'; import useServingPlatformStatuses from '~/pages/modelServing/useServingPlatformStatuses'; +import useIsAreaAvailable from '~/concepts/areas/useIsAreaAvailable'; +import { SupportedArea } from '~/concepts/areas'; import InfoGallery from './InfoGallery'; const DeployAndMonitorGallery: React.FC<{ onClose: () => void }> = ({ onClose }) => { const servingPlatformStatuses = useServingPlatformStatuses(); + const { status: modelRegistryAvailable } = useIsAreaAvailable(SupportedArea.MODEL_REGISTRY); const modelMeshEnabled = servingPlatformStatuses.modelMesh.enabled; + const kServeEnabled = servingPlatformStatuses.kServe.enabled; const infoItems = []; + if (modelRegistryAvailable) { + infoItems.push( + + + Model registries provide a structured and organized way to store, version, deploy, and + track models, ensuring that they are easily accessible and manageable throughout their + lifecycle. + + + } + isOpen + />, + ); + } + if (modelMeshEnabled) { infoItems.push( void }> = ({ onClose }) ); } - infoItems.push( - - - Deploy models to test them and integrate them into applications. Deploying a model makes - it accessible via an API, enabling you to return predictions based on data inputs. + if (modelMeshEnabled || kServeEnabled) { + infoItems.push( + + + Deploy models to test them and integrate them into applications. Deploying a model + makes it accessible via an API, enabling you to return predictions based on data + inputs. + - - } - isOpen - />, - ); + } + isOpen + />, + ); + } return ( { const { status: pipelinesAvailable } = useIsAreaAvailable(SupportedArea.DS_PIPELINES); const { status: projectsAvailable } = useIsAreaAvailable(SupportedArea.DS_PROJECTS_VIEW); const { status: modelServingAvailable } = useIsAreaAvailable(SupportedArea.MODEL_SERVING); + const { status: modelRegistryAvailable } = useIsAreaAvailable(SupportedArea.MODEL_REGISTRY); const [selected, setSelected] = React.useState(); return React.useMemo(() => { @@ -55,12 +56,12 @@ export const useAIFlows = (): React.ReactNode => { />, ); } - if (modelServingAvailable) { + if (modelServingAvailable || modelRegistryAvailable) { cards.push(