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
TFX with AI Platform Serving #1108
Comments
This is because the default demonstration of Trainer code (the equivalent of taxi_utils.py), probably yours as well, is implemented in such a way that it exports the model that expects 1-D bytes Tensor with serialized tf.Examples protocol buffer [code]. If you export the model with a |
@luischinchillagarcia, |
Yes! Thanks for the quick response, and apologies, I was working through another (similar) issue I kept encountering. This definitely solved the issue and will close this issue. Thanks! |
Hi, I'm new to tensforflow as well as tfx and I ran into the same issue when the model is being served on Google AI Platform Model as part of the tfx pipeline, but the JSON doesn't accept the format. I'm following the keras tutorial the data input has to be serialized as follow code. @ucdmkt ,I've tried with the code sample that you posted, but I can't seem to get it to work. Can you please help? With the schema name error I got, do you mean to refer to the outputs of schema_gen? FYI, the data types of the data features are tf.string Error:
Code:
|
@C45513 Were you able to solve above problem? |
When using AI Platform for serving a model, the model requires a JSON in the form {"instances": [...] }.
However, when creating a TFX pipeline, the model only uses Examples as inputs and outputs. This means that in order to get predictions we have to turn every raw input into Examples, turn the Examples into a JSON, and pass them through the model via the AI Platform API client (and also extract the predictions from the output model Examples).
Is there a way to integrate TFX with AI Platform serving where the transformation from raw data to Examples is done internally or the optimal way to do this integration?
The text was updated successfully, but these errors were encountered: