Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[frontend] optional pipeline parameters #11331

Open
asaff1 opened this issue Oct 27, 2024 · 1 comment
Open

[frontend] optional pipeline parameters #11331

asaff1 opened this issue Oct 27, 2024 · 1 comment

Comments

@asaff1
Copy link

asaff1 commented Oct 27, 2024

Environment

  • How did you deploy Kubeflow Pipelines (KFP)?
    Standalone

  • KFP version:
    2.1.0

Steps to reproduce

Create a pipeline component with Optional[int] parameter. The UI will still require it, even though in the component yaml it is marked as optional. See:
image

But UI shows:
image

Also probably related, when setting default value for integer type to 0, it shows blank. (so 0 for integer is considered as no default value).

Expected result

UI pipeline form should respect optional parameter

Materials and Reference


Impacted by this bug? Give it a 👍.

@tumido
Copy link

tumido commented Nov 20, 2024

+1, we're also impacted by this.

Simple reproducer here:

from typing import Optional
from kfp import compiler, dsl


@dsl.component()
def print_param_op(int_param: Optional[int] = None):
    print(int_param)

@dsl.pipeline()
def pipeline(int_param: Optional[int] = None):
    print_param_task = print_param_op(int_param=int_param)

if __name__ == "__main__":
    compiler.Compiler().compile(pipeline, "pipeline.yaml")

KFP DSL properly translates this to:

...
root:
  dag:
    tasks:
      print-param-op:
        cachingOptions:
          enableCache: true
        componentRef:
          name: comp-print-param-op
        inputs:
          parameters:
            int_param:
              componentInputParameter: int_param
        taskInfo:
          name: print-param-op
  inputDefinitions:
    parameters:
      int_param:
        isOptional: true
        parameterType: NUMBER_INTEGER
schemaVersion: 2.1.0
sdkVersion: kfp-2.10.1

However I'm unable to run the pipeline unless the param value is set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants