This demo shows how KFP SDK can be used to create the Data Science Pipeline in OpenShift AI.
IMPORTANT DISCLAIMER: Read before proceed!
- These examples are to showcase the capabilities of OpenShift AI.
- Certain components may not be supported if they are using upstream projects.
- Always check with Red Hat or your account team for supportability.
-
Tested on OpenShift 4.16/4.17 with cluster-admin
-
Tested on OpenShift AI 2.17 with Model Registry set to
Managed
inn DataScienceClusterdefault-dsc
:spec: components: modelregistry: managementState: Managed registriesNamespace: rhoai-model-registries
-
OpenShift Service Mesh is installed
-
OpenShift Severless is installed
-
Authorino is installed
This demo will be installed in the dsp-demo-creditcard-fraud
namespace.
make setup-dsp-demo
Additionally, it will install the following components:
Component | Namespace | Description |
---|---|---|
Gitea | gitea | Store our pipeline code |
OpenShift Pipeline | dsp-demo-creditcard-fraud | To build our Data Science Pipeline using KFP SDK |
Model Registry | rhoai-model-registries | To store the model meta information |
MariaDB | rhoai-model-registries | MySQL backend for model registry |
Data Science Pipeline | dsp-demo-creditcard-fraud | To run the pipeline |
Minio | dsp-demo-creditcard-fraud | To store the model and pipeline artifacts |
To teardown the entire setup. This will delete the namespace and the model registry.
make teardown-all
The credential for minio is minio/minio123
. Route for minio is:
echo "https://$(oc get routes minio-console -n dsp-demo-creditcard-fraud -o jsonpath='{.spec.host}')"
The credential for opentlc-mgr
admin user in gitea can be found in
oc get gitea/gitea -n gitea -o jsonpath='{.status.adminPassword}'
This includes a S3 browser.
make setup-odh-tec
You can trigger the pipelione build using 2 methods:
- Gitea has a webhook to trigger the Tekton pipeline.
- Run the pipeline run script
make run-pipeline
-
Tekton will be triggered to build the Data Science Pipeline
-
The Data Science Pipeline will run to train the model
-
Model will be saved to S3 bucket
-
Model will be registered with the model registry
-
Model will be deployed to KServe
After the model is registered, you can manually deploy it.
To add kube:admin to RHOAI admin group
When you use the model registry to deploy, the current latest model will always be deployed. This is due to how OVMS and KServe storage-initializer works.
OVMS requires a specific model repository structure. KServe uses the model path as the S3 path prefix to download all the files into the container.
model_config.json
was an attempt to solve this using a custom ServingRuntime
as part of the data science pipeline. However, when you deploy using the model registry, the ServingRuntime
is the default template version.
Is currently hardcoded for now.
Folks who helped me start this repo and provided guidance:
- Trevor Royer @strangiato
- Humair Khan @HumairAK
- Matteo Mortari @tarilabs
- Yuan Tang @terrytangyuan
1