def my_pipeline():

    exit_task = print_op('Exit handler has worked!')

    with dsl.ExitHandler(exit_task):
        print_op('Hello World!')
        fail_op('Task failed.')
Ejemplo n.º 2
0
def my_pipeline(message: str = 'Hello World!'):

    exit_task = print_op(message='Exit handler has worked!')

    with dsl.ExitHandler(exit_task):
        print_op(message=message)
        fail_op(message='Task failed.')
Ejemplo n.º 3
0
    def download_and_print(url='gs://ml-pipeline/shakespeare/shakespeare1.txt'):
      """A sample pipeline showing exit handler."""

      exit_task = echo_op('exit!')

      with dsl.ExitHandler(exit_task):
        download_task = gcs_download_op(url)
        echo_task = echo_op(download_task.outputs['result'])
def my_pipeline(message: str = 'Hello World!'):
    exit_task = exit_op(user_input=message)

    with dsl.ExitHandler(exit_task, name='my-pipeline'):
        print_op(message=message)