elyra icon indicating copy to clipboard operation
elyra copied to clipboard

Invoking workflow from another workflow

Open blublinsky opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe. Based on kubeflow pipelines documentation https://www.kubeflow.org/docs/components/pipelines/sdk/connect-api/, one can use kfp client to invoke the other workflow, but needs to poll it until completion.

Describe the solution you'd like It would be nice to have an example on how to do this - ideally a code snipet, that I can reuse in my code

Describe alternatives you've considered None at the moment

Additional context Add any other context or screenshots about the feature request here.

blublinsky avatar Jun 03 '21 23:06 blublinsky

Hi @blublinsky, when you export a pipeline to Python from the Visual Pipeline Editor Elyra generates code that submits the pipeline. In https://github.com/elyra-ai/elyra/issues/1695#issuecomment-849989898 I've posted example code that polls the Kubeflow server until the pipeline run completes.

ptitzler avatar Jun 07 '21 17:06 ptitzler

Two quick updates on my latest response:

  • In an earlier release we've removed the ability to export a pipeline to Kubeflow Pipelines DSL. Only export to the static config file (YAML) format is supported.
  • The elyra-pipeline submit CLI command supports monitoring of Kubeflow Pipeline runs. You could therefore take advantage of this feature to execute a pipeline after another pipeline completed successfully. Conditional execution can be accomplished by checking the exit code, as documented. Hope this helps!

ptitzler avatar May 04 '22 18:05 ptitzler