pipelines: [sdk] KFP v2 pipeline with error

Environment

  • KFP version: Kubeflow 1.5
  • KFP SDK version: KFP v2.0.0b10
  • All dependencies version: kfp 2.0.0b10 kfp-pipeline-spec 0.1.17 kfp-server-api 2.0.0a6

Steps to reproduce

Tried upgrading from KFP 1.8 to 2.0 for higher version kubernetes sdk support. Tried copying the example from here

import kfp
from kfp import compiler
from kfp import dsl

@dsl.component
def addition_component(num1: int, num2: int) -> int:
  return num1 + num2

@dsl.pipeline(name='addition-pipeline')
def my_pipeline(a: int=1, b: int=2, c: int = 10):
  add_task_1 = addition_component(num1=a, num2=b)
  add_task_2 = addition_component(num1=add_task_1.output, num2=c)

cmplr = compiler.Compiler()
cmplr.compile(my_pipeline, package_path='my_pipeline.yaml')

client=kfp.Client()
client.create_run_from_pipeline_package('my_pipeline.yaml',arguments={"a":1,"b":2})

When I give it arguments I get the error ApiException: (400) Reason: Bad Request HTTP response headers: HTTPHeaderDict({'content-type': 'application/json', 'date': 'Mon, 16 Jan 2023 18:20:24 GMT', 'content-length': '190', 'x-envoy-upstream-service-time': '0', 'server': 'envoy'}) HTTP response body: {"error":"json: cannot unmarshal number into Go value of type map[string]json.RawMessage","code":3,"message":"json: cannot unmarshal number into Go value of type map[string]json.RawMessage"}

And without arguments I get the error ApiException: (400) Reason: Bad Request HTTP response headers: HTTPHeaderDict({'content-type': 'application/json', 'date': 'Mon, 16 Jan 2023 18:30:38 GMT', 'content-length': '548', 'x-envoy-upstream-service-time': '1', 'server': 'envoy'}) HTTP response body: {"error":"Validate create run request failed.: InvalidInputError: Invalid IR spec format.: invalid character 'c' looking for beginning of value","code":3,"message":"Validate create run request failed.: InvalidInputError: Invalid IR spec format.: invalid character 'c' looking for beginning of value","details":[{"@type":"type.googleapis.com/api.Error","error_message":"Invalid IR spec format.","error_details":"Validate create run request failed.: InvalidInputError: Invalid IR spec format.: invalid character 'c' looking for beginning of value"}]}

Expected result

Pipeline compiles and runs.

Impacted by this bug? Give it a 👍.

About this issue

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

Most upvoted comments

well for me it works fine image

@connor-mccarthy yes. There’s no error on kfp 2.0 beta.