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

Fine tune taxonomy #3785

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

pnaik1
Copy link
Contributor

@pnaik1 pnaik1 commented Feb 20, 2025

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

Description

Added taxonomy section

Screenshot 2025-02-20 at 8 35 11 PM Screenshot 2025-02-20 at 8 47 31 PM Screenshot 2025-02-20 at 8 35 34 PM

How Has This Been Tested?

Test whether the submit button is disabled/enabled between sshkey type and username and token type
Test whether submitting it will create secrets

Test Impact

added unit test and cypress test

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

Copy link
Contributor

openshift-ci bot commented Feb 20, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign manosnoam for approval. For more information see the 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

codecov bot commented Feb 20, 2025

Codecov Report

Attention: Patch coverage is 59.45946% with 30 lines in your changes missing coverage. Please review.

Project coverage is 84.59%. Comparing base (9b6b7a6) to head (e04ff59).

Files with missing lines Patch % Lines
...pages/pipelines/global/modelCustomization/utils.ts 13.79% 25 Missing ⚠️
...s/global/modelCustomization/FineTunePageFooter.tsx 25.00% 3 Missing ⚠️
...bal/modelCustomization/FineTuneTaxonomySection.tsx 92.59% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3785      +/-   ##
==========================================
- Coverage   84.63%   84.59%   -0.05%     
==========================================
  Files        1515     1517       +2     
  Lines       35100    35170      +70     
  Branches     9814     9828      +14     
==========================================
+ Hits        29707    29752      +45     
- Misses       5393     5418      +25     
Files with missing lines Coverage Δ
...mizationForm/modelCustomizationFormSchema/types.ts 100.00% <100.00%> (ø)
...rm/modelCustomizationFormSchema/validationUtils.ts 36.36% <100.00%> (+1.98%) ⬆️
...pelines/global/modelCustomization/FineTunePage.tsx 100.00% <100.00%> (ø)
...obal/modelCustomization/ModelCustomizationForm.tsx 81.25% <ø> (ø)
...pages/pipelines/global/modelCustomization/const.ts 100.00% <100.00%> (ø)
...bal/modelCustomization/FineTuneTaxonomySection.tsx 92.59% <92.59%> (ø)
...s/global/modelCustomization/FineTunePageFooter.tsx 21.27% <25.00%> (-2.64%) ⬇️
...pages/pipelines/global/modelCustomization/utils.ts 13.79% <13.79%> (ø)

... and 3 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 9b6b7a6...e04ff59. Read the comment docs.

@pnaik1 pnaik1 force-pushed the rhoaieng-19173 branch 4 times, most recently from b342eba to 8cf2323 Compare February 25, 2025 09:08
@pnaik1
Copy link
Contributor Author

pnaik1 commented Feb 25, 2025

Updated the pr with removing the default value of url in the taxonomy , referring to the latest API changes.

@@ -110,8 +114,29 @@ export const fineTunedModelDetailsSchema = z.object({
modelStorageLocation: z.string(),
});

export const fineTuneTaxonomySchema = z.object({
url: z.string().url().min(1, 'Taxonomy Git URL is required'),
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we have a regex expression here to catch URLs that do not have github in it? It seems that any link would work here.

Copy link
Contributor Author

@pnaik1 pnaik1 Feb 25, 2025

Choose a reason for hiding this comment

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

Yes, we can have a regex expression here, but I doubt the Git URL having a different format other than github (ex: gitlab and bitbucket) . We can probably use a regex expression to catch URLs that don't have .git at the end?? @Gkrumbach07 are we only supporting github url??

Copy link
Member

Choose a reason for hiding this comment

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

any repo would work. not just Github

data-testid={FineTunePageSections.TAXONOMY_DETAILS}
title={fineTunePageSectionTitles[FineTunePageSections.TAXONOMY_DETAILS]}
>
{/* TODO: add link to taxonomy */}
Copy link
Member

Choose a reason for hiding this comment

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

can you link the microcopy jira: https://issues.redhat.com/browse/RHOAIENG-19187

@@ -40,6 +40,14 @@ const ModelCustomizationForm: React.FC = () => {
version: 'myModel-v0.0.2',
inputStorageLocationUri: searchParams.get(BASE_MODEL_INPUT_STORAGE_LOCATION_URI_KEY) ?? '',
},
taxonomy: {
url: '',
Copy link
Member

Choose a reason for hiding this comment

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

where are you presetting the default url from the pipeline. we will need a

useEffect(() => {
   if(ilabPipelineLoaded) {
      setData("taxonomy", {...data.taxonomy, url: getPipelineParamDefault(ilabPipeline, "sdg_repo_url")}) 
   }
})

Copy link
Contributor Author

@pnaik1 pnaik1 Feb 26, 2025

Choose a reason for hiding this comment

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

I have done it earlier, but changed later on according to the new api changes (no default value) https://docs.google.com/spreadsheets/d/16G5r6tV1TsgKbk-WoRoe0ZW9LsCWp093rnVDfySM33s/edit?gid=1780396156#gid=1780396156

@@ -23,11 +24,10 @@ type FineTunePageFooterProps = {
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- TODO remove this line when start using `data`
Copy link
Contributor

Choose a reason for hiding this comment

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

We should remove this comment now.

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