-
Notifications
You must be signed in to change notification settings - Fork 141
Added Kubeflow Pipeline component for ModelKit packaging and OCI push #969
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
base: main
Are you sure you want to change the base?
Added Kubeflow Pipeline component for ModelKit packaging and OCI push #969
Conversation
Signed-off-by: Manav Sutar <[email protected]>
c980096
to
b0590d1
Compare
Could you drop a Markdown file or other notes here that we can use to create docs for this? Or create a companion docs PR? |
KFP ModelKit ComponentOverviewThis Kubeflow Pipeline (KFP) component enables packaging a ModelKit model and pushing it to an OCI (Open Container Initiative) registry. It is designed to be used as a step in automated ML pipelines, making it easy to build, package, and distribute models using ModelKit within Kubeflow. Files
Usage
Inputs & ParametersRefer to
Example Pipeline Stepimport kfp
from kfp.components import load_component_from_file
modelkit_op = load_component_from_file('component.yaml')
# Example usage in a pipeline
def my_pipeline(...):
modelkit_op(
model_path='path/to/model',
model_name='my-model',
version='1.0.0',
registry_url='oci://my-registry',
# ...other params...
) Notes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @TheCoder2010-create for the contribution! This PR appears to be incomplete at the moment, but is a good starting point for implementing something like this. We still need to install the Kit CLI into the resulting container and use the correct sequence of commands to create a ModelKit.
You note in your PR description
Supports authentication via Kubernetes secrets or IRSA/Workload Identity for cloud environments.
However I don't see this referenced in the added files; is this something that's automatically done by the libraries you are using?
# If ModelKit is only available via binary, add COPY or curl/wget here | ||
# For now, placeholder: | ||
RUN pip install --no-cache-dir ml-metadata kfp | ||
# TODO: Add ModelKit CLI installation here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can potentially reuse the standard KitOps image and copy the binary out of it into this image.
Kubeflow Pipelines lacked a reusable component for packaging trained model artifacts as ModelKits and pushing them to OCI-compliant registries. This gap made it difficult to standardize model packaging and automate model delivery to registries within Kubeflow workflows.
What Has Been Added
Reusable Kubeflow Pipeline Component: A new component that:
Extracts training parameters, pipeline run ID, experiment name, and metrics from Kubeflow ML Metadata.
Packages model artifacts using the ModelKit format.
Pushes the packaged ModelKit to any OCI-compliant registry.
Supports authentication via Kubernetes secrets or IRSA/Workload Identity for cloud environments.
Component Implementation:
component.py: Python script for metadata extraction, packaging, and push logic.
Dockerfile: Container image definition with all dependencies.
component.yaml: KFP component specification for easy integration.
This addition enables seamless, standardized, and secure model packaging and registry integration for Kubeflow users.