-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
SDK - Compiler - Make it possible to create more portable pipelines #2271
Merged
k8s-ci-robot
merged 2 commits into
kubeflow:master
from
Ark-kun:SDK---Compiler---Allow-creating-portable-pipelines
Oct 3, 2019
Merged
SDK - Compiler - Make it possible to create more portable pipelines #2271
k8s-ci-robot
merged 2 commits into
kubeflow:master
from
Ark-kun:SDK---Compiler---Allow-creating-portable-pipelines
Oct 3, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This change allows directly passing the PipelineConf instance to compiler or launcher which makes it easier to create portable pipelines by allowing the environment-specific configuration to be directly passed to the environment-specific launcher. Background: PipelineConf holds all pipeline-level configuration including `op_transformers`, `image_pull_secrets` etc. Some of these are specific to particular execution environment (e.g. GCP secret or Argo artifact location or Kubernetes-specific options). Previously, the only way to modify `PipelineConf` was to do it inside the piepline function. That tied the pipeline function to specific execution environment (e.g. GCP, Argo or Kubernetes) Solution: This change allows directly passing the PipelineConf instance to compiler or launcher. This allows writing portable enlauncher and environment agnostic pipeline functions. All environment-specific configurations can be moved to launching stage. Before: ```python # Defining pipeline def my_pipeline(): # portable pipeline code dsl.get_pipeline_conf().add_op_transformer(gcp.use_gcp_secret('user-gcp-sa')) # Launching pipeline kfp.Clinet().create_run_from_pipeline_func(my_pipeline, arguments={}) ``` After: ```python # Defining pipeline def my_pipeline(): # portable pipeline code # Launching pipeline pipeline_conf = dsl.PipelineConf() pipeline_conf.add_op_transformer(gcp.use_gcp_secret('user-gcp-sa')) kfp.Clinet().create_run_from_pipeline_func(my_pipeline, arguments={}, pipeline_conf=pipeline_conf) ``` After 2 *(launching same portable pipeline using different launchers): ```python # Loading portable pipeline from portable_pipeline import my_pipeline # Launching pipeline on Kubeflow pipeline_conf = dsl.PipelineConf() pipeline_conf.add_op_transformer(gcp.use_gcp_secret('user-gcp-sa')) kfp.Clinet().create_run_from_pipeline_func(my_pipeline, arguments={}, pipeline_conf=pipeline_conf) # Launching pipeline on locally (not implemented yet) kfp.run_pipeline_func_locally(my_pipeline, arguments={}) ```
numerology
reviewed
Oct 3, 2019
/retest |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Ark-kun 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 |
magdalenakuhn17
pushed a commit
to magdalenakuhn17/pipelines
that referenced
this pull request
Oct 22, 2023
Signed-off-by: Tommy Li <Tommy.chaoping.li@ibm.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change allows directly passing the PipelineConf instance to compiler or launcher which makes it easier to create portable pipelines by allowing the environment-specific configuration to be directly passed to the environment-specific launcher.
Background:
PipelineConf holds all pipeline-level configuration including
op_transformers
,image_pull_secrets
etc. Some of these are specific to particular execution environment (e.g. GCP secret or Argo artifact location or Kubernetes-specific options).Previously, the only way to modify
PipelineConf
was to do it inside the piepline function. That tied the pipeline function to specific execution environment (e.g. GCP, Argo or Kubernetes)Solution: This change allows directly passing the PipelineConf instance to compiler or launcher. This allows writing portable enlauncher and environment agnostic pipeline functions. All environment-specific configurations can be moved to launching stage.
Before:
After:
After 2 *(launching same portable pipeline using different launchers):
This change is