tf-serve | Serve TensforFlow Estimator with SavedModel | Machine Learning library
kandi X-RAY | tf-serve Summary
kandi X-RAY | tf-serve Summary
Serve TensforFlow Estimator with SavedModel
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Create examples from inputs .
- Assemble the result .
- Return the path to the export directory .
- Return a dataframe of test inputs .
- Create dataset .
- Creates a tf . dataset .
tf-serve Key Features
tf-serve Examples and Code Snippets
Community Discussions
Trending Discussions on tf-serve
QUESTION
I have spent several hours trying to set up Tensorflow serving of the Tensorflow-hub module, "Universal Sentence Encoder." There is a similar question here:
How to make the tensorflow hub embeddings servable using tensorflow serving?
I have been doing this on a Windows machine.
This is the code I used to build the model:
...ANSWER
Answered 2019-Nov-18 at 15:26I was finally able to figure things out. I'll post what I did here in case someone else is trying to do the same thing.
My issue with the saved_model_cli run command was with the quotes (using Windows command prompt). Change 'text=["what this is"]'
to "text=['what this is']"
The issue with the POST request was two-fold. One, I noticed that the model's name is model, so should have been http://localhost:8501/v1/models/model:predict
Secondly, the input format was not correct. I used Postman, and the body of the request looks like this:
{"inputs": {"text": ["Hello"]}}
QUESTION
I can build my branch locally without any problem but when I try to build in via team foundation i get 2 errors. The errors are generated on a project i recently added to the solution.
The errors are:
EnvoyClient.cs(3,7): error CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?) [c:\TF-Agents\Agent2017-002\_work\2\s\System\Envoy.Connector\Envoy.Connector.csproj]
EnvoyClient.cs(4,7): error CS0246: The type or namespace name 'RestSharp' could not be found (are you missing a using directive or an assembly reference?) [c:\TF-Agents\Agent2017-002\_work\2\s\System\Envoy.Connector\Envoy.Connector.csproj]
I have tried to remove the nuget packages and re-adding them in my local branch, and then pull requesting them again to the branch i want to build on tf-server, but to no avail.
...ANSWER
Answered 2019-Oct-01 at 08:57Update from OP:
So the problem was the nuget packages were not being loaded in, because this project was not part of the solution.
I had to add my new project (with these 2 references) to that solution and then it builded perfectly.
EnvoyClient.cs(3,7): error CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?)
For this kind of issue, if your local build is successful and just the TFS build is failing then it is usually due to dll reference path issue. Make sure that the Dll is referenced as a relative path in the project file (.csproj).
To add a relative reference in a separate directory, do the following:
Add the reference in Visual Studio by right clicking the project in Solution Explorer and selecting Add Reference.
Find the *.csproj where this reference exist and open it in a text editor. Lets say your .csproj location is c:\tfs_get\sources\myfolder\myproject\myproj.csproj
Edit the < HintPath > to be equal to
QUESTION
I'd tried to run simple TensorFlow estimators example: official Iris classification problem and saved model using this code implemented by this tutorial.
TensorFlow provides a command line tool to inspect the exported model like the following:
...ANSWER
Answered 2019-Apr-11 at 12:00I have tried to reproduce your error and I got the similar error for Curl Predict.
But when I have used Classify, I got the output.
Code is shown below:
QUESTION
I have trained a classification model in Keras (latest version of Keras and TF as per this writing) which is similar in input and output as CIFAR10. To serve this model I export it to a classification model (see the type) using the following code:
...ANSWER
Answered 2018-Aug-03 at 09:32Try using prediction_service_pb2_grpc.PredictionServiceStub(channel)
instead of prediction_service_pb2.beta_create_PredictionService_stub(channel)
. Apparently this was recently moved from beta. You can refer to this example.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install tf-serve
You can use tf-serve like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page