pipelines icon indicating copy to clipboard operation
pipelines copied to clipboard

Float params auto-converted to scientific notation, render pipeline spec invalid

Open jackwhelpton opened this issue 4 years ago • 13 comments

What steps did you take:

Defined a pipeline with float parameters:

@dsl.pipeline(name="test", description="test")
def train_pipeline(
    schedule_1_learning_rate: float = 0.0002,
    schedule_2_learning_rate: float = 0.00002,
    schedule_3_learning_rate: float = 0.000002,
):

What happened:

What gets compiled is:

  arguments:
    parameters:
    - {name: schedule_1_learning_rate, value: '0.0002'}
    - {name: schedule_2_learning_rate, value: 2e-05}
    - {name: schedule_3_learning_rate, value: 2e-06}

This pipeline uploads fine, but when executing through the UI we receive:

{"error":"Failed to create a new run.: Failed to fetch workflow spec.: Invalid input error: Please provide a valid pipeline spec","message":"Failed to create a new run.: Failed to fetch workflow spec.: Invalid input error: Please provide a valid pipeline spec","code":3,"details":[{"@type":"type.googleapis.com/api.Error","error_message":"Please provide a valid pipeline spec","error_details":"Failed to create a new run.: Failed to fetch workflow spec.: Invalid input error: Please provide a valid pipeline spec"}]}

If the largest value is used for all three parameters, no conversion occurs and the pipeline executes successfully.

What did you expect to happen:

Pipeline executes successfully.

Environment:

How did you deploy Kubeflow Pipelines (KFP)?

KFP version: Build commit: 9c16e12

KFP SDK version: kfp 0.5.1 kfp-server-api 0.3.0

Anything else you would like to add:

[Miscellaneous information that will assist in solving the issue.]

/kind bug

jackwhelpton avatar May 21 '20 04:05 jackwhelpton