-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[bug] Cannot find how to type pipeline parameters for JsonArray or JsonObject #7719
Comments
I recognize this isn't a bug, however I do not know what else to describe it as, nor where to find this information. I've tried the KFP documentation and the myriad of oddly organized and incomplete GCP documentation on Vertex AI Pipelines. |
For anyone who comes across this, |
Python's
The |
I don't know what to say other than using |
The |
Thanks, changing my PipelineParam type hint from |
I have a question: how can we use the for loop for |
This PR enables the user to pass different `bool`, `lists` and `dict` to a component. Kubeflow typically handles those arguments by serializing them as a string . For this reason, they need to be de-serialized again within the component in order for them to be properly handled. This might go away once we move to V2. References to the issue: kubeflow/pipelines#7457 kubeflow/pipelines#7719
What steps did you take
I'm trying to utilize the ModelBatchPredictOp from the GCP Components. There are two fields, one with a type of
JsonObject
and the other with the typeJsonArray
. The pipeline accepts the fields for this operator as input parameters to the pipeline and passes them to the operator in the constructor. Since they're in the pipeline params, they must be typed. However, I am unable to find any type configuration that coerces toJsonArray
orJsonObject
, and I cannot find any documentation on how to do this.How do I pass these values?
For example,
gcs_source_uris
is supposed to be aJsonArray
. When passing this through as a pipeline param typed toList[str]
it fails to compile with this error:I understand the error, and I've exhausted any other potential types I could think of. I've also tried to find any references to
JsonObject
orJsonArray
in the SDK and none of them reference any Python classes I can import to type these parameters as. I'm gathering this is some kind of protobuf type, but when trying to use that, it still fails.Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.
The text was updated successfully, but these errors were encountered: