-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Parsing failure when uploading a pipeline with kfp cli(or SDK) #2764
Comments
FYI: I tried to create a pipeline in the web UI, and captured RPC response using chrome inspector. It shows same problem. (However it doesn't make any problem with web UI) Response: {"id":"a2e50e0a-7a71-4829-898a-62e3348ae280","name":"eee","default_version":{"id":"a2e50e0a-7a71-4829-898a-62e3348ae280","name":"eee","created_at":{"seconds":1576825669},"resource_references":[{"key":{"type":3,"id":"a2e50e0a-7a71-4829-898a-62e3348ae280"},"relationship":1}]},"created_at":"2019-12-20T07:07:49Z"} |
It looks like that this behavior is coming from special http handling of a pipeline upload in https://github.com/kubeflow/pipelines/blob/master/backend/src/apiserver/server/pipeline_upload_server.go . Because this code is manually transforming outer-most How about using jsonpb for json encoding? It should be more concise while handling all the fields in the structure. This is my simple proof of concept snippet. p := &api.Pipeline {
CreatedAt: ×tamp.Timestamp{Seconds: 1539211232},
DefaultVersion: &api.PipelineVersion{
CreatedAt: ×tamp.Timestamp{Seconds: 1439241123},
},
}
fmt.Println(p)
m, _ := (&jsonpb.Marshaler{OrigName: true}).MarshalToString(p)
fmt.Println(m) This prints
|
@jingzhang36 This seems to be related to the recently introduced pipeline versions feature. Can you please take a look? |
I'm sorry but is there any update? |
would you share me the pipeline zip file, may ping me directly and OK not share here |
Hi Jiyong, we have a recent change to our API methods as we introduced version concept into our system (FE, BE and SDK). In particular, BE change starts from 0.1.37 and FE change starts from 0.1.38. From the response you posted, I feel the pipeline is created successfully because it responds with a pipeline UUID, i.e., ec299e6a-b994-4b2c-9060-65ff48039e50 (among other information of this created pipeline, e.g., default version, pipeline name, creation time, etc.). In other words, the response seems expected to me. Is your script trying to parse the response and find it is different from previous response? If so, that is expected. As I said before, our pipeline object now has versions in it. |
Thank you for the response. Yes, the pipeline was created successfully, but error occurs when parsing the response from the server. I'm using kfp SDK to parse the response. I've tested with kfp server version 0.1.37, and client version 0.1.37 and 0.1.40 which all fails. IIUC, the FYI, this is the stack trace(of the client side) in version 0.1.37.
|
Correct me if I'm wrong, but as far as I remember there were not supposed to be any breaking change for the existing APIs. |
* Make created_at value of default_version in UploadPiplineResponse follow RFC3339 time format. It returned `created_at` value as a json dictionary, for example `"created_at":{"seconds":1576824474}`, and broke SDK parser. `jsonpb` will be used to take care of all json marshaling including time format conversion. See #2764 for the detail. * Make created_at value of default_version in UploadPiplineResponse follow RFC3339 time format. It returned `created_at` value as a json dictionary, for example `"created_at":{"seconds":1576824474}`, and broke SDK parser. `jsonpb` will be used to take care of all json marshaling including time format conversion. See #2764 for the detail. * Set jsonpb marshaler to output ints for enums. * Parse json response to check formatting of the `created_at` field. * Lint: reformatted comments.
Is any one working on this, I have done some digging and it seams the one timestamp is unix code but the the type is dateime. See dict below, my knowledge here is however limited when digging in the go code. {'id': '42927185-5d13-442a-826f-9069dadef063',
'name': 'pipeline_test.zip_71bd614f-46a7-4d7c-a31d-9dcc41908c78',
'created_at': {'seconds': 1583953778},
'parameters': [{'name': 'filename',
'value': 'gs://ml-pipeline-playground/shakespeare1.txt'}],
'resource_references': [{'key': {'type': 3,
'id': '42927185-5d13-442a-826f-9069dadef063'},
'relationship': 1}]} |
I think that this issue is resolved in the latest version of KFP. 😄 Please report again if the error still exists. |
@jiyongjung0, I am running kfp==0.2.5 and kfp-server-api==0.2.5 but the kubeflow deployment was setup before this release if that would matter. |
I think that the version of kubeflow deployment matters in this case because the server emits ill-formed response in this case. |
Can you specify what I need to upgrade, I am running 1.0 and can't see any more recent release ? |
Sorry, I meant kubeflow pipeline installation specifically. You can get a hint from the KFP installation guide or here. The most recent release looks like 0.3.0. |
+1 to @jiyongjung0 's reply. Kubeflow full-fledge deployment is not picking the latest version of KFP. |
And there is no normal way to upgrade it. |
* Make created_at value of default_version in UploadPiplineResponse follow RFC3339 time format. It returned `created_at` value as a json dictionary, for example `"created_at":{"seconds":1576824474}`, and broke SDK parser. `jsonpb` will be used to take care of all json marshaling including time format conversion. See kubeflow#2764 for the detail. * Make created_at value of default_version in UploadPiplineResponse follow RFC3339 time format. It returned `created_at` value as a json dictionary, for example `"created_at":{"seconds":1576824474}`, and broke SDK parser. `jsonpb` will be used to take care of all json marshaling including time format conversion. See kubeflow#2764 for the detail. * Set jsonpb marshaler to output ints for enums. * Parse json response to check formatting of the `created_at` field. * Lint: reformatted comments.
What happened:
When I tried to upload a pipeline with a gzip-ed yaml file, kfp cli returned following error after successfully uploading the pipeline
I debugged a little and found that the returned RPC response message from the server is a little bit odd.
created_at
field in thedefault_version
node is not a string, but"created_at":{"seconds":1576824474}
which results in a parse error.Interesting point is that
created_at
at the root node is having string value. FYI$ kfp pipeline list
works without any problem. 😅What did you expect to happen:
created_at
field should have ISO8601 string format, and kfp CLI should success.What steps did you take:
I tested in GCP with KFP Build commit:
b3171f0
for the server.Client version is 0.1.37
Anything else you would like to add:
I actually was testing TFX which uses KFP Python SDK, and had the same problem. So it looks like a problem not only for CLI.
The text was updated successfully, but these errors were encountered: