-
Notifications
You must be signed in to change notification settings - Fork 123
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
Create lightweight sample #131
Create lightweight sample #131
Conversation
Check out this pull request on You'll be able to see Jupyter notebook diff and discuss changes. Powered by ReviewNB. |
@kevinyu98 can you move the images to the images folder? also replace all the spaces in the filename to underscores or dashes? |
@@ -0,0 +1,19 @@ | |||
# Lightweight python components example | |||
This notebook demonstrates how to compile and execute the pipeline using simple python functions, also known as creating pipeline through lightweight. This notebook is originated from the kubeflow pipeline's [lighweight-component](https://github.com/kubeflow/pipelines/tree/master/samples/core/lightweight_component) example that is running on Kubeflow 0.7. We have modified this notebook to run with Kubeflow 1.x's user namespace separation with Tekton support. |
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.
This notebook demonstrates how to compile and execute the pipeline using simple python functions, also known as creating pipeline through lightweight. This notebook is originated from the kubeflow pipeline's [lighweight-component](https://github.com/kubeflow/pipelines/tree/master/samples/core/lightweight_component) example that is running on Kubeflow 0.7. We have modified this notebook to run with Kubeflow 1.x's user namespace separation with Tekton support. | |
This notebook demonstrates how to compile and execute the pipeline using simple python functions, also known as creating pipeline through lightweight. This notebook is originated from the kubeflow pipeline's [lighweight-component](https://github.com/kubeflow/pipelines/tree/master/samples/core/lightweight_component) example that is running with the KFP API. We have modified this notebook to run with the Tekton compiler and submit the pipeline directly to the Tekton engine. |
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, done.
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Here are some screenshots to show this pipeline example and result." |
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.
Since these images only available after the pipeline execution, can we move these images to the end of the notebook?
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.
ok
## Prerequisites | ||
- Install [Kubeflow 1.0.2+](https://www.kubeflow.org/docs/started/getting-started/) and connect the cluster to the current shell with `kubectl` | ||
- Install [kfp-tekton](/sdk/README.md#steps) SDK | ||
|
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.
I think they also need jupyter and other dependencies for the notebook. Can you create a fresh virtual env and make sure we install all the necessary dependencies for this notebook?
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.
I create a new environment, and the notebook can run successfully. I will add the jupyter here.
@@ -0,0 +1,359 @@ | |||
{ |
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 don't need notebook checkpoint for GitHub, can you remove this file?
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.
sure
"outputs": [], | ||
"source": [ | ||
"pipeline_name = \"lightweight-python-demo\"\n", | ||
"user_namespace = \"myproject\"" |
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.
set this to default namespace until we have Kubeflow as our default requirements.
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.
ok
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"!kubectl create clusterrolebinding $user_namespace-edit --clusterrole kubeflow-edit --serviceaccount=$user_namespace:default\n", |
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 probably don't need this because we are not using any k8s api.
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.
sure
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Assign permission to Tekton's default service account and run this pipeline" |
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.
"Assign permission to Tekton's default service account and run this pipeline" | |
"Run this pipeline" |
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.
Sorry, missed the comments. Fixed now.
Thanks @kevinyu98 |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Tomcli 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 |
Which issue is resolved by this Pull Request:
Resolves #
Description of your changes:
This Kubeflow example demonstrates how to create python functions and convert to pipeline operations.
Environment tested:
python --version
): 3.6.4tkn version
): 0.11.3kubectl version
): 1.16/etc/os-release
):