Skip to content

Commit

Permalink
feat(sdk): add tekton pipeline config into sdk client function (#1327)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomcli committed Aug 16, 2023
1 parent 1f6ed5e commit 6437740
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sdk/python/kfp_tekton/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from kfp_tekton_server_api import ApiException

from .compiler import TektonCompiler
from .compiler.pipeline_utils import TektonPipelineConf

import json
import logging
Expand Down Expand Up @@ -729,6 +730,7 @@ def create_run_from_pipeline_func(self,
run_name=None,
experiment_name=None,
pipeline_conf: kfp.dsl.PipelineConf = None,
tekton_pipeline_conf: TektonPipelineConf = None,
namespace=None):
"""Runs pipeline on Kubernetes cluster with Kubeflow Pipelines Tekton backend.
Expand All @@ -752,7 +754,10 @@ def create_run_from_pipeline_func(self,
run_name = run_name or pipeline_name + ' ' + datetime.now().strftime('%Y-%m-%d %H-%M-%S')
try:
(_, pipeline_package_path) = tempfile.mkstemp(suffix='.zip')
TektonCompiler().compile(pipeline_func, pipeline_package_path, pipeline_conf=pipeline_conf)
TektonCompiler().compile(pipeline_func,
pipeline_package_path,
pipeline_conf=pipeline_conf,
tekton_pipeline_conf=tekton_pipeline_conf)
return self.create_run_from_pipeline_package(pipeline_package_path, arguments,
run_name, experiment_name, namespace)
finally:
Expand Down

0 comments on commit 6437740

Please sign in to comment.