GoogleCloudPlatform / practical-ml-vision-book

Apache License 2.0
485 stars 228 forks source link

Any resolution on sending b64 inputs to the endpoint? #8

Closed sayakpaul closed 2 years ago

sayakpaul commented 2 years ago

https://github.com/GoogleCloudPlatform/practical-ml-vision-book/blob/master/09_deploying/09d_bytes.ipynb

As per the above notebook the following payload fails:

data = {
    "signature_name": "from_bytes",  # currently bugged
    "instances": [
        {
            "img_bytes": {"b64": b64encode('/tmp/test1.jpg')}
        },
        {
            "img_bytes": {"b64": b64encode('/tmp/test2.jpg')}
        },
    ]
}

Is there any resolution around it?

sayakpaul commented 2 years ago

Seems like it's supported: https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/ml_ops/stage6/get_started_with_tf_serving_function.ipynb