pipelines: Pipeline get stuck with string with \u character

Environment

  • How did you deploy Kubeflow Pipelines (KFP)?

Local Deployment - K3s on Windows Subsystem for Linux (WSL)

  • KFP version: 1.8.5

  • KFP SDK version:

kfp                      1.8.19
kfp-pipeline-spec        0.1.16
kfp-server-api           1.8.5

Steps to reproduce

from typing import NamedTuple
from collections import namedtuple
import kfp
import kfp.dsl as dsl
from kfp.v2.dsl import component

@component
def product_name(text: str) -> str:
    return text

@component(packages_to_install=["emoji"])
def emoji(text: str) -> NamedTuple('Outputs', [('emoji_text', str),('emoji', str)]):

    import emoji
    from collections import namedtuple
    
    emoji_text = text
    emoji_str = emoji.emojize(':' + emoji_text + ':', language="alias") # "\u2728"
    print("output one: {}; output_two: {}".format(emoji_text, emoji_str))

    emoji_output = namedtuple('Outputs', ['emoji_text', 'emoji'])
    return emoji_output(emoji_text, emoji_str)

@component
def build_sentence(product: str, emoji: str, emojitext: str) -> str:
    print("We completed the pipeline, hooray!")
    end_str = product + " is "
    if len(emoji) > 0:
        end_str += emoji
    else:
        end_str += emojitext
    return end_str

@dsl.pipeline(name="hello-world", description="An intro pipeline")
# You can change the `text` and `emoji_str` parameters here to update the pipeline output
def intro_pipeline(text: str = "Vertex Pipelines", emoji_str: str = "sparkles"):
    product_task = product_name(text)
    emoji_task = emoji(emoji_str)
    consumer_task = build_sentence(
        product_task.output,
        emoji_task.outputs['emoji'],
        emoji_task.outputs['emoji_text']
    )

kfp_endpoint = "http://localhost:8080/pipeline"

kfp.Client(host=kfp_endpoint).create_run_from_pipeline_func(
    intro_pipeline, arguments={}, mode=kfp.dsl.PipelineExecutionMode.V2_COMPATIBLE)

This also happens if the value is returned directly so the emoji library is not the issue

 return emoji_output(emoji_text, "\u2728")

if the \u character is removed from the string the pipeline works well

Expected result

Finish execution of the pipeline and output: Vertex pipelines is ✨

Materials and Reference


Impacted by this bug? Give it a 👍.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

Thanks, @eavelardev. The Vertex Pipelines team will investigate this.