-
Notifications
You must be signed in to change notification settings - Fork 153
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
feat: integrating NIM model UI #3156
Conversation
Hi @olavtar. Thanks for your PR. I'm waiting for a opendatahub-io member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
b9d775e
to
ebdb88a
Compare
/ok-to-test |
8d37e31
to
7746d92
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've ran out of time to do a review... but one final comment is to look into feature flags; unfortunately this is semi poorly documented. But we have arch docs & a series of flags existing today (initial defaults) -- basically you'll need to ask the forum channel of the Dashboard for help and/or follow one of the existing flags and dupe it for NIM overall.
This should allow you to control things like disabling the metrics link & in general hiding all your UI code (don't worry about the manifests) -- so the API can be available but not the UI (sometimes this is hugely beneficial to our customers).
Also, we do want to get Mocked Cypress Tests into this work asap -- but it doesn't need to be this PR. Have you had a chance to look at the existing ones around KServe?
5bdae2a
to
8c388cb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, a much more through review... testing this out on clusters not enabled with NIMs to see what happens & I'll test it out on you cluster after that.
frontend/src/pages/projects/screens/detail/overview/serverModels/PlatformSelectSection.tsx
Outdated
Show resolved
Hide resolved
frontend/src/pages/modelServing/screens/projects/NIMServiceModal/NIMPVCSizeSection.tsx
Outdated
Show resolved
Hide resolved
frontend/src/pages/modelServing/screens/projects/NIMServiceModal/NIMModelListSection.tsx
Outdated
Show resolved
Hide resolved
frontend/src/pages/modelServing/screens/projects/NIMServiceModal/NIMModelListSection.tsx
Outdated
Show resolved
Hide resolved
frontend/src/pages/modelServing/screens/projects/NIMServiceModal/DeployNIMServiceModal.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional comments we discussed in DM -- putting them in code comment threads for ease of replying.
frontend/src/pages/modelServing/screens/projects/NIMServiceModal/DeployNIMServiceModal.tsx
Show resolved
Hide resolved
frontend/src/pages/projects/screens/detail/overview/serverModels/PlatformSelectSection.tsx
Outdated
Show resolved
Hide resolved
frontend/src/pages/modelServing/screens/projects/NIMServiceModal/NIMModelListSection.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closing in -- let me do some testing and get you that flag to hide the metrics link
frontend/src/pages/modelServing/screens/projects/NIMServiceModal/NIMPVCSizeSection.tsx
Outdated
Show resolved
Hide resolved
frontend/src/pages/projects/screens/detail/overview/serverModels/PlatformSelectSection.tsx
Outdated
Show resolved
Hide resolved
...src/pages/projects/screens/detail/overview/serverModels/deployedModels/DeployedModelCard.tsx
Outdated
Show resolved
Hide resolved
frontend/src/pages/modelServing/screens/projects/ModelServingPlatform.tsx
Outdated
Show resolved
Hide resolved
f3a6920
to
136a5c3
Compare
frontend/src/pages/modelServing/screens/global/InferenceServiceTableRow.tsx
Show resolved
Hide resolved
const isNIMModelServingAvailable = useIsAreaAvailable(SupportedArea.NIM_MODEL).status; | ||
const [isNIMAPIKeyValid, setIsNIMAPIKeyValid] = useState<boolean>(false); | ||
const dashboardNamespace = useDashboardNamespace(); | ||
|
||
useEffect(() => { | ||
const checkAPIKey = async () => { | ||
try { | ||
const valid = await isNIMAPIKeyEnabled(dashboardNamespace); | ||
setIsNIMAPIKeyValid(valid); | ||
} catch (error) { | ||
setIsNIMAPIKeyValid(false); | ||
} | ||
}; | ||
checkAPIKey(); | ||
}, [dashboardNamespace]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, this is a NIT -- we may need to swing back for this as we are trying to do this today.
Please make this a custom hook so logic is repeatable and reusable.
@@ -197,6 +218,11 @@ const ModelServingPlatform: React.FC = () => { | |||
<GalleryItem> | |||
<EmptyMultiModelServingCard /> | |||
</GalleryItem> | |||
{isNIMModelServingAvailable && isNIMAPIKeyValid && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, you should have this down to isNIMAvailable
-- avoid unnecessarily unravelled logic whenever possible. Neither of these values have unique purpose on their own.
0826dbf
to
31c5287
Compare
Signed-off-by: Olga Lavtar <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is more to do here -- but this is a good foundation. Approving. We'll follow up with additional PRs next week.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andrewballantyne The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
Adding NIM UI changes.
How Has This Been Tested?
Tested locally.
Test Impact
Request review criteria:
Self checklist (all need to be checked):
If you have UI changes:
After the PR is posted & before it merges:
main