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

Add ilab kfp pipeline to the DSPO repo #764

Merged

Conversation

VaniHaripriya
Copy link
Contributor

@VaniHaripriya VaniHaripriya commented Dec 13, 2024

The issue resolved by this Pull Request:

Resolves #<RHOAIENG-16507>

Description of your changes:

  • Added support for provisioning the iLab pipeline as part of a DSPA deployment.
  • Introduced a new parameter, enableIlabKFPPipeline(set to false by default), which can be set to true to enable the iLab KFP pipeline in the UI.

Testing instructions

  • Deploy DSPO.
  • Deploy DSPA using the provided yaml file:
  • Scenario 1:
    Provision both the Iris and InstructLab pipelines, create pipeline runs, and ensure they complete successfully.
apiVersion: datasciencepipelinesapplications.opendatahub.io/v1
kind: DataSciencePipelinesApplication
metadata:
  name: sample
spec:
  dspVersion: v2
  apiServer:
    enableSamplePipeline: true
    enableInstructlabPipeline: true
    image: quay.io/opendatahub/ds-pipelines-api-server:pr-120
    cABundle:
      configMapKey: ca.crt
      configMapName: kube-root-ca.crt
  podToPodTLS: false
  objectStorage:
    # Need to enable this for artifact download links to work
    # i.e. for when requesting /apis/v2beta1/artifacts/{id}?share_url=true
    enableExternalRoute: true
    minio:
      deploy: true
      image: 'quay.io/opendatahub/minio:RELEASE.2019-08-14T20-37-41Z-license-compliance'
  mlpipelineUI:
    image: quay.io/opendatahub/ds-pipelines-frontend:latest

Scenario 2:
Provision the Iris pipeline, create pipeline run, and ensure it completes successfully.

apiVersion: datasciencepipelinesapplications.opendatahub.io/v1
kind: DataSciencePipelinesApplication
metadata:
  name: sample
spec:
  dspVersion: v2
  apiServer:
    enableSamplePipeline: true    
    image: quay.io/opendatahub/ds-pipelines-api-server:pr-120
    cABundle:
      configMapKey: ca.crt
      configMapName: kube-root-ca.crt
  podToPodTLS: false
  objectStorage:
    # Need to enable this for artifact download links to work
    # i.e. for when requesting /apis/v2beta1/artifacts/{id}?share_url=true
    enableExternalRoute: true
    minio:
      deploy: true
      image: 'quay.io/opendatahub/minio:RELEASE.2019-08-14T20-37-41Z-license-compliance'
  mlpipelineUI:
    image: quay.io/opendatahub/ds-pipelines-frontend:latest

Scenario 3:
Provision the Instructlab pipeline, create pipeline run, and ensure it completes successfully.

apiVersion: datasciencepipelinesapplications.opendatahub.io/v1
kind: DataSciencePipelinesApplication
metadata:
  name: sample
spec:
  dspVersion: v2
  apiServer:
    enableInstructlabPipeline: true    
    image: quay.io/opendatahub/ds-pipelines-api-server:pr-120
    cABundle:
      configMapKey: ca.crt
      configMapName: kube-root-ca.crt
  podToPodTLS: false
  objectStorage:
    # Need to enable this for artifact download links to work
    # i.e. for when requesting /apis/v2beta1/artifacts/{id}?share_url=true
    enableExternalRoute: true
    minio:
      deploy: true
      image: 'quay.io/opendatahub/minio:RELEASE.2019-08-14T20-37-41Z-license-compliance'
  mlpipelineUI:
    image: quay.io/opendatahub/ds-pipelines-frontend:latest

Checklist

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

Copy link
Contributor

openshift-ci bot commented Dec 13, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@dsp-developers
Copy link
Contributor

A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-764
An OCP cluster where you are logged in as cluster admin is required.

To use this image run the following:

cd $(mktemp -d)
git clone [email protected]:opendatahub-io/data-science-pipelines-operator.git
cd data-science-pipelines-operator/
git fetch origin pull/764/head
git checkout -b pullrequest f41faec8325da596cf8fe63d1f17333dc0e170de
oc new-project opendatahub
make deploy IMG="quay.io/opendatahub/data-science-pipelines-operator:pr-764"

More instructions here on how to deploy and test a Data Science Pipelines Application.

@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-764

3 similar comments
@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-764

@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-764

@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-764

// Include ilab KFP pipeline with the deployment of this DSP API Server. Default: false
// +kubebuilder:default:=false
// +kubebuilder:validation:Optional
EnableIlabKFPPipeline bool `json:"enableIlabKFPPipeline"`
Copy link
Member

Choose a reason for hiding this comment

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

let's rename this (and all similar variables) to EnableInstructlabPipeline. Its a has a little more clarity, and we should avoid using 'KFP' in DSP-specific functions like this one

@@ -105,6 +105,11 @@ spec:
Server. Setting Deploy to false disables operator reconciliation.
Default: true'
type: boolean
enableIlabKFPPipeline:
default: false
description: 'Include ilab KFP pipeline with the deployment of
Copy link
Member

@gmfrasca gmfrasca Dec 13, 2024

Choose a reason for hiding this comment

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

similar to above, lets remove 'KFP' and expand ilab to Instructlab. Perhaps include a little more context, like

Include instructlab multi-phase training and LLM generation pipeline with the deployment of this DSP API Server. Default: false

{{- end }}
{{- if .EnableIlabKFPPipeline }}
{
"name": "ilab-kfp-pipeline",
Copy link
Member

Choose a reason for hiding this comment

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

This is a human-readable name so lets give it a friendlier title, like [Instructlab] Multi-Phase Training Pipeline

{
"name": "ilab-kfp-pipeline",
"description": "[source code](https://github.com/opendatahub-io/ilab-on-ocp) Ilab KFP pipeline",
"file": "/pipelines/pipeline.yaml"
Copy link
Member

Choose a reason for hiding this comment

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

we should name the pipeline something a little more clear than 'pipeline.yaml', ie instructlab.yaml

@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-764

@VaniHaripriya VaniHaripriya marked this pull request as ready for review December 13, 2024 21:33
@openshift-ci openshift-ci bot requested review from DharmitD and gmfrasca December 13, 2024 21:33
@VaniHaripriya VaniHaripriya force-pushed the RHOAIENG-16507 branch 2 times, most recently from 042a446 to 6771c34 Compare December 13, 2024 21:41
@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-764

@mprahl
Copy link
Contributor

mprahl commented Dec 17, 2024

@VaniHaripriya this looks good to me (though I'm new 😅 )!

Could you please add an automated test?

It looks like there's already test utility functions to see if a pipeline exists. For example:

		pipelineID, err := TestUtil.RetrievePipelineId(t, suite.Clientmgr.httpClient, APIServerURL, pipelineDisplayName)
		require.NoError(t, err)

@VaniHaripriya
Copy link
Contributor Author

@VaniHaripriya this looks good to me (though I'm new 😅 )!

Could you please add an automated test?

It looks like there's already test utility functions to see if a pipeline exists. For example:

		pipelineID, err := TestUtil.RetrievePipelineId(t, suite.Clientmgr.httpClient, APIServerURL, pipelineDisplayName)
		require.NoError(t, err)

@mprahl Thank you for reviewing, I am adding the tests as part of this RHOAIENG-16508

@hbelmiro
Copy link
Contributor

/lgtm

@rimolive
Copy link
Contributor

/lgtm

@HumairAK
Copy link
Contributor

HumairAK commented Jan 6, 2025

@VaniHaripriya this looks good to me (though I'm new 😅 )!
Could you please add an automated test?

It looks like there's already test utility functions to see if a pipeline exists. For example:

Agree with this, @VaniHaripriya for:

I am adding the tests as part of this RHOAIENG-16508

This is for e2e tests that will go here

For this pr a simple test that verifies pipeline exists when dspa flag is enabled would be good to have. Since we are already deploying dspa twice (one with external data connections and one without) we can have just one configured to enable the provisioning, and test both enable/disable

@openshift-ci openshift-ci bot added the approved label Jan 7, 2025
@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-764

2 similar comments
@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-764

@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-764

ArgoLauncherImage string `json:"argoLauncherImage,omitempty"`
ArgoDriverImage string `json:"argoDriverImage,omitempty"`
EnableSamplePipeline bool `json:"enableSamplePipeline"`
// Include instructlab multi-phase training and LLM generation pipeline with the deployment of this DSP API Server. Default: false
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is user facing documentation in the CRD, we should fix the casing. Sorry for missing this before.

Suggested change
// Include instructlab multi-phase training and LLM generation pipeline with the deployment of this DSP API Server. Default: false
// Enable the Instructlab Multi-Phase Training pipeline with the deployment of this DSP API server. Default is false.

@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-764

@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-764

@mprahl mprahl self-requested a review January 8, 2025 14:52
ArgoLauncherImage string `json:"argoLauncherImage,omitempty"`
ArgoDriverImage string `json:"argoDriverImage,omitempty"`
EnableSamplePipeline bool `json:"enableSamplePipeline"`
// Enable the Instructlab Multi-Phase Training pipeline with the deployment of this DSP API server. Default is false
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I didn't realize the booleans above had it formatted this way.

Suggested change
// Enable the Instructlab Multi-Phase Training pipeline with the deployment of this DSP API server. Default is false
// Enable the Instructlab Multi-Phase Training pipeline with the deployment of this DSP API server. Default: false

ArgoLauncherImage string `json:"argoLauncherImage,omitempty"`
ArgoDriverImage string `json:"argoDriverImage,omitempty"`
EnableSamplePipeline bool `json:"enableSamplePipeline"`
// Enable the Instructlab Multi-Phase Training pipeline with the deployment of this DSP API server. Default is false
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Enable the Instructlab Multi-Phase Training pipeline with the deployment of this DSP API server. Default is false
// Enable the Instructlab Multi-Phase Training pipeline with the deployment of this DSP API server. Default: false

@@ -206,8 +206,8 @@ spec:
- mountPath: /etc/tls/private
name: proxy-tls
{{ end }}
{{ if or .APIServer.EnableSamplePipeline .CustomCABundle }}
{{ if .APIServer.EnableSamplePipeline }}
{{ if or .APIServer.EnableSamplePipeline .CustomCABundle .APIServer.EnableInstructLabPipeline}}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this if statement can be removed.

Copy link
Contributor

@mprahl mprahl left a comment

Choose a reason for hiding this comment

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

This looks good! Just a couple minor comments and then I'll approve it.

@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-764

@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-764

@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-764

@mprahl mprahl self-requested a review January 8, 2025 16:48
@mprahl
Copy link
Contributor

mprahl commented Jan 8, 2025

@VaniHaripriya could you please squash the commits? After that, I'll go ahead and approve it!

Signed-off-by: VaniHaripriya <[email protected]>

Co-authored-by: Matt Prahl <[email protected]>
@VaniHaripriya
Copy link
Contributor Author

@VaniHaripriya could you please squash the commits? After that, I'll go ahead and approve it!

Thank you Matt! @mprahl

@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-764

@openshift-ci openshift-ci bot added the lgtm label Jan 8, 2025
Copy link
Contributor

openshift-ci bot commented Jan 8, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mprahl

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-merge-bot openshift-merge-bot bot merged commit 22529bb into opendatahub-io:main Jan 8, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants