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

Minor accelerator fixes #1764

Conversation

Gkrumbach07
Copy link
Member

@Gkrumbach07 Gkrumbach07 commented Sep 6, 2023

closes: #1765

Description

Minor UX and bug fixes found by testers

  • making naming in the error states of the dropdown dynamic so they can use image or servingruntime
  • improved backend logging to be more verbose and not miss any exit points
  • remove double array usage in accelerator state hook
  • remove usage of unknown when we know that there is not an accelerator for description fields and logging - replaced with None when there is no accelerator, and unknown when we use existing settings
  • prevent count from going to 0 -> same logic as other number inputs. The default and limit are now 1.
  • removed italics from dropdown None option
image image image image image

How Has This Been Tested?

  1. Migration should always give a logging on error, success, or skipping
  2. test that errors display correctly in migration (try removing crd for acceleratorprofiles so it throws a 404 error on migration)
  3. serving runtime dropdown errors should not reference an image
  4. count should always default to 1 and should not be able to go to 0

Test Impact

no tests are made for this feature yet. These will be created once the feature has gone through development

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • Commits have been squashed into descriptive, self-contained units of work (e.g. 'WIP' and 'Implements feedback' style messages have been removed)
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has added tests or explained why testing cannot be added (unit tests & storybook for related changes)

If you have UI changes:

  • Included any necessary screenshots or gifs if it was a UI change.
  • Included tags to the UX team if it was a UI/UX change (find relevant UX in the SMEs section).

There are UI changes, but they are not changes in the UX, just small bugs. I will still tag UX, however there is not much action needed.
@yannnz

After the PR is posted & before it merges:

  • The developer has tested their solution on a cluster by using the image produced by the PR to main

@Gkrumbach07 Gkrumbach07 changed the title Minor fixes Minor accelerator fixes Sep 6, 2023
@andrewballantyne andrewballantyne added the pr/no-tests-allowed Added by an official approver - this PR is allowed no tests. Omitted, a test must accompany the PR label Sep 7, 2023
@Gkrumbach07 Gkrumbach07 linked an issue Sep 7, 2023 that may be closed by this pull request
1 task
Copy link
Contributor

@lucferbux lucferbux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small nit, rest of the changes lgtm, I like the detail of the resources 👍

Screenshot 2023-09-08 at 14 28 03

e.response?.body?.message || e.message,
);
throw `A ${e.statusCode} error occurred when trying to create gpu migration configmap: ${
e.response?.body?.message || e?.response?.statusMessage
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example you are using or here

@Gkrumbach07
Copy link
Member Author

@lucferbux I migrated everything that was using || to use ??

@lucferbux lucferbux self-requested a review September 8, 2023 15:19
@@ -47,7 +47,7 @@ const ServingRuntimeDetails: React.FC<ServingRuntimeDetailsProps> = ({ obj }) =>
<DescriptionListGroup>
<DescriptionListTerm>Accelerator</DescriptionListTerm>
<DescriptionListDescription>
{accelerator.accelerator?.spec.displayName || 'unknown'}
{accelerator.accelerator?.spec.displayName || 'None'}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this cause a problem with existing Model Servers?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for exisitng model servers, the useAcceleratorState still gets called and we evaluate what accelerator they are using. In this flow exisitng serving runtimes would wither fall into the useExisiting state or the Nvidia GPU state. It wont be linked to a profile, but it would be uses the fake profile (soft migration or whatever we call it)

@@ -108,7 +108,7 @@ const NotebookServerDetails: React.FC = () => {
<DescriptionListGroup>
<DescriptionListTerm>Accelerator</DescriptionListTerm>
<DescriptionListDescription>
{accelerator.accelerator?.spec.displayName || 'unknown'}
{accelerator.accelerator?.spec.displayName || 'None'}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here -- if the value is 0 -- none makes sense... if the value > 0 -- this is odd.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should have an unknown and a none
so three cases
accelerator is defined: use displayName
accelerator is undefined AND useExisting is true: use "Unknown"
accelerator is undefined AND useExisting is false: use "None"

making image/servingruntime naming dynamic

fix count going back to 0

prevent 0 count and ux style fix

removed usage of unknown when not needed

remove double array usage

improved backend logging

fix logging undefined error

make ?? consistent

fixed "||" and fixed unknown / none details
Copy link
Member

@andrewballantyne andrewballantyne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Gkrumbach07 please update your screenshots

/hold

Remove the hold when you have done so -- it'll be easier for Yan to read next week.

@openshift-ci openshift-ci bot added the do-not-merge/hold This PR is hold for some reason label Sep 8, 2023
@openshift-ci openshift-ci bot added the lgtm label Sep 8, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 8, 2023

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Sep 8, 2023
@Gkrumbach07 Gkrumbach07 removed the do-not-merge/hold This PR is hold for some reason label Sep 8, 2023
@openshift-merge-robot openshift-merge-robot merged commit dcd23ec into opendatahub-io:f/accelerator-support Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm pr/no-tests-allowed Added by an official approver - this PR is allowed no tests. Omitted, a test must accompany the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Minor fixes to accelerator support feature
4 participants