question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

issue with google_cloud_pipeline_components 0.1.9 ModelUploadOp ("invalid value")

See original GitHub issue

with the v0.1.9 of ModelUploadOp I’m seeing the following error. I confirmed that things work fine in 0.1.7.

PORT is set as follows:

PORT = 8080

Then, in the pipeline definition, ModelUploadOp is configured as follows:

    model_upload_op = gcc_aip.ModelUploadOp(
        project=project,
        display_name=model_display_name,
        serving_container_image_uri=build_image_task.outputs['serving_container_uri'],
        serving_container_predict_route="/predictions/{}".format(MAR_MODEL_NAME),
        serving_container_health_route="/ping",
        serving_container_ports=[PORT]

This is the error I see (again, I do NOT see this problem with v0.1.7):

2021-11-01 13:01:17.976 PDTRuntimeError: Failed to create the resource. Error: {'code': 400, 'message': "Invalid value at 'model.container_spec.ports[0]' (type.googleapis.com/google.cloud.aiplatform.v1.Port), 8080", 'status': 'INVALID_ARGUMENT', 'details': [{'@type': 'type.googleapis.com/google.rpc.BadRequest', 'fieldViolations': [{'field': 'model.container_spec.ports[0]', 'description': "Invalid value at 'model.container_spec.ports[0]' (type.googleapis.com/google.cloud.aiplatform.v1.Port), 8080"}]}]}      

I wondered if something has changed about the expected format of this arg, but from the documentation (serving_container_ports (Optional[Sequence[int]]=None) it doesn’t seem so. Again, this code runs fine with 0.1.7.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
amygdalacommented, Nov 9, 2021

Interesting – the api spec says: serving_container_ports (Optional[Sequence[int]]=None): but maybe the docs need to be updated.

4reactions
jagadeeshi2icommented, Nov 9, 2021

@amygdala try configuring port as below - serving_container_ports=[{"containerPort" : PORT}]. The component follows k8s v1/core spec. Worked for me with above config.

Read more comments on GitHub >

github_iconTop Results From Across the Web

google_cloud_pipeline_compon...
If for a piece of data the key is not present or has an invalid value, that piece is ignored by the pipeline....
Read more >
Troubleshooting Vertex AI | Google Cloud
In many cases, the error codes are caused by problems in your training code, not by the Vertex AI service. To determine if...
Read more >
google's notebook on vertex ai throwing following error: type ...
from google_cloud_pipeline_components.types import artifact_types model ... Use 0.1.9 and switch the output from Output[Model] to ...
Read more >
google-cloud-pipeline-components - PyPI
Use the following commands to install Google Cloud Pipeline Components from GitHub. git clone https://github.com/kubeflow/pipelines.git pip install pipelines/ ...
Read more >
cannot use component outputs in importer_node.importer ...
Hi - I've created a github issue related to this, but was told to create a ... If I try building with a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found