Skip to content

Instantly share code, notes, and snippets.

@lethee
Created February 7, 2024 07:00
Show Gist options
  • Save lethee/8395b738a1fcc8994ee08b5d46284879 to your computer and use it in GitHub Desktop.
Save lethee/8395b738a1fcc8994ee08b5d46284879 to your computer and use it in GitHub Desktop.
run a pipeline inside the pipeline
import kfp
exp_name = "anonymous-1"
pipe_name = "ad-tpl-test"
params = {
"git_ref":'master',
"model":'',
"data":'',
}
cli = kfp.Client()
exp_id = cli.get_experiment(experiment_name=exp_name).id
print(exp_id, "exp ", exp_name)
pipe_id = cli.get_pipeline_id(pipe_name)
print(pipe_id, "pipe", pipe_name)
res = cli.run_pipeline(exp_id, "run from api", params=params, pipeline_id=pipe_id)
print(res)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment