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

Refactor accelerator profile handling #3342

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Gkrumbach07
Copy link
Member

https://issues.redhat.com/browse/RHOAIENG-13106

Description

This pull request refactors the handling of accelerator profiles and introduces a new custom hook useAcceleratorProfileForm to improve code organization and reusability.

How Has This Been Tested?

  1. try adding, editing, removing an accelerator profile from workbenches, notebook server, deploy nims modal, serving runtime modal, kserve modal

Test Impact

none, this is a internal code clarity change

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • 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 or cypress tests 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.

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
Copy link
Member Author

/retest

1 similar comment
@Gkrumbach07
Copy link
Member Author

/retest

Copy link

codecov bot commented Oct 17, 2024

Codecov Report

Attention: Patch coverage is 79.16667% with 20 lines in your changes missing coverage. Please review.

Project coverage is 84.95%. Comparing base (7bc8caf) to head (cb6ff57).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...r/screens/server/AcceleratorProfileSelectField.tsx 57.69% 11 Missing ⚠️
...projects/NIMServiceModal/DeployNIMServiceModal.tsx 20.00% 4 Missing ⚠️
frontend/src/utilities/useReadAcceleratorState.ts 70.00% 3 Missing ⚠️
...ontroller/screens/server/NotebookServerDetails.tsx 75.00% 1 Missing ⚠️
.../notebookController/screens/server/SpawnerPage.tsx 85.71% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3342      +/-   ##
==========================================
+ Coverage   84.94%   84.95%   +0.01%     
==========================================
  Files        1335     1336       +1     
  Lines       30117    30124       +7     
  Branches     8256     8256              
==========================================
+ Hits        25582    25593      +11     
+ Misses       4535     4531       -4     
Files with missing lines Coverage Δ
frontend/src/api/k8s/inferenceServices.ts 98.80% <100.00%> (ø)
frontend/src/api/k8s/servingRuntimes.ts 98.93% <ø> (ø)
frontend/src/api/k8s/utils.ts 100.00% <ø> (ø)
...rojects/ModelMeshSection/ServingRuntimeDetails.tsx 96.42% <100.00%> (ø)
.../ServingRuntimeModal/ManageServingRuntimeModal.tsx 93.15% <100.00%> (+0.09%) ⬆️
.../ServingRuntimeModal/ServingRuntimeSizeSection.tsx 97.50% <ø> (ø)
...vingRuntimeModal/ServingRuntimeTemplateSection.tsx 95.83% <ø> (ø)
...screens/projects/kServeModal/ManageKServeModal.tsx 95.07% <100.00%> (-0.04%) ⬇️
.../projects/useServingAcceleratorProfileFormState.ts 100.00% <100.00%> (ø)
...d/src/pages/modelServing/screens/projects/utils.ts 95.96% <100.00%> (ø)
... and 14 more

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7bc8caf...cb6ff57. Read the comment docs.

@jpuzz0
Copy link
Contributor

jpuzz0 commented Oct 23, 2024

Testing out the accelerator profile dropdown for workbenches, after selecting an accelerator that isn't "None", then creating that workbench, and opening the Edit page for that created workbench afterwards, the previous selected accelerator doesn't seem selected any longer. I checked the main branch and this doesn't seem to be a problem there.

resetFormData: () => void;
};

const useAcceleratorProfileForm = (
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I know this is a long name already, but FormState seems more appropriate than just Form for this name.

@Gkrumbach07
Copy link
Member Author

@jpuzz0 I found the fix, it was not setting the select field default due to it be async to get the default

@pnaik1
Copy link
Contributor

pnaik1 commented Oct 24, 2024

  • adding accelerator profile in the workbench page I see a new option existing settings when I click on none and create the workbench and edit the created workbench I see existing settings selected instead of none

  • Same in notebook server, selecting none will automatically changes to existing settings when clicked on start server, and the accelerator is unknown after the notebook server is created

Copy link
Member

@DaoDaoNoCode DaoDaoNoCode left a comment

Choose a reason for hiding this comment

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

Tested and didn't find any issues so far. Left one small comment but that's not very important.
/lgtm

Copy link
Contributor

openshift-ci bot commented Oct 25, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: DaoDaoNoCode
Once this PR has been reviewed and has the lgtm label, please ask for approval from gkrumbach07. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

Copy link
Contributor

openshift-ci bot commented Oct 25, 2024

New changes are detected. LGTM label has been removed.

@openshift-ci openshift-ci bot removed the lgtm label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants