Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nim double window #3268

Merged
merged 1 commit into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { ProjectObjectType, typedEmptyImage } from '~/concepts/design/utils';
import { ProjectSectionID } from '~/pages/projects/screens/detail/types';
import ServeModelButton from '~/pages/modelServing/screens/global/ServeModelButton';
import { getDisplayNameFromK8sResource } from '~/concepts/k8s/utils';
import { isProjectNIMSupported } from '~/pages/modelServing/screens/projects/nimUtils';

const EmptyModelServing: React.FC = () => {
const navigate = useNavigate();
Expand All @@ -18,10 +19,12 @@ const EmptyModelServing: React.FC = () => {
project,
} = React.useContext(ModelServingContext);
const servingPlatformStatuses = useServingPlatformStatuses();
const isKServeNIMEnabled = project ? isProjectNIMSupported(project) : false;

if (
getProjectModelServingPlatform(project, servingPlatformStatuses).platform !==
ServingRuntimePlatform.SINGLE &&
(getProjectModelServingPlatform(project, servingPlatformStatuses).platform !==
ServingRuntimePlatform.SINGLE ||
isKServeNIMEnabled) &&
servingRuntimes.length === 0
) {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
import { ProjectObjectType, typedEmptyImage } from '~/concepts/design/utils';
import EmptyModelServingPlatform from '~/pages/modelServing/screens/projects/EmptyModelServingPlatform';
import EmptyNIMModelServingCard from '~/pages/modelServing/screens/projects/EmptyNIMModelServingCard';
import { useIsNIMAvailable } from '~/pages/modelServing/screens/projects/useIsNIMAvailable';
import { isProjectNIMSupported } from '~/pages/modelServing/screens/projects/nimUtils';
import { useDashboardNamespace } from '~/redux/selectors';
import DeployNIMServiceModal from '~/pages/modelServing/screens/projects/NIMServiceModal/DeployNIMServiceModal';
import { useDashboardNamespace } from '~/redux/selectors';
import { useIsNIMAvailable } from '~/pages/modelServing/screens/projects/useIsNIMAvailable';
import ManageServingRuntimeModal from './ServingRuntimeModal/ManageServingRuntimeModal';
import ModelMeshServingRuntimeTable from './ModelMeshSection/ServingRuntimeTable';
import ModelServingPlatformButtonAction from './ModelServingPlatformButtonAction';
Expand Down Expand Up @@ -263,23 +263,27 @@
onSubmit(submit);
}}
/>
<ManageKServeModal
isOpen={platformSelected === ServingRuntimePlatform.SINGLE}
projectContext={{
currentProject,
dataConnections,
}}
servingRuntimeTemplates={templatesEnabled.filter((template) =>
getTemplateEnabledForPlatform(template, ServingRuntimePlatform.SINGLE),
)}
onClose={(submit: boolean) => {
onSubmit(submit);
}}
/>
{isNIMAvailable && (
{!isKServeNIMEnabled ? (
<ManageKServeModal
isOpen={platformSelected === ServingRuntimePlatform.SINGLE}
projectContext={{
currentProject,
dataConnections,
}}
servingRuntimeTemplates={templatesEnabled.filter((template) =>
getTemplateEnabledForPlatform(template, ServingRuntimePlatform.SINGLE),
)}
onClose={(submit: boolean) => {
onSubmit(submit);

Check warning on line 277 in frontend/src/pages/modelServing/screens/projects/ModelServingPlatform.tsx

View check run for this annotation

Codecov / codecov/patch

frontend/src/pages/modelServing/screens/projects/ModelServingPlatform.tsx#L276-L277

Added lines #L276 - L277 were not covered by tests
}}
/>
) : (
<DeployNIMServiceModal
isOpen={platformSelected === ServingRuntimePlatform.SINGLE}
projectContext={{ currentProject, dataConnections }}
projectContext={{
currentProject,
dataConnections,
}}
onClose={(submit: boolean) => {
onSubmit(submit);
}}
Expand Down
Loading