Closed Johnson-yue closed 6 years ago
Since you run with model_config_file="./examples/model_config_file.json"
, the model names are not default
. In that case, you can not generate json with curl http://localhost:8500/v1/models/default/gen_json
.
Please try the following command to replace default
with tensorflow_template_application
.
curl http://localhost:8500/v1/models/tensorflow_template_application/gen_json
Hi, it is me again. I think I have a lot of problems. [1] : When I run
simple_tensorflow_serving --model_config_file="./examples/model_config_file.json"
. and then runcurl http://localhost:8500/v1/models/default/gen_json
the output is : Client : { <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">} Server log: {
[2] : Multiple Models Started... , and I run
client.py
. my client.py is: `#!/usr/bin/env pythonimport requests
def main(): endpoint = "http://127.0.0.1:8500" input_data = { "model_name": "tensorflow_template_application_model", "model_version": 2, "data": { "keys": [[11.0], [2.0]], "features": [[1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]] } } result = requests.post(endpoint, json=input_data) print(result.text)
if name == "main": main()`
but ,it error log: {
$ python ./client.py
{"error":"Invalid json data: b'{\"model_version\": 2, \"data\": {\"keys\": [[11.0], [2.0]], \"features\": [[1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]]}, \"model_name\": \"tensorflow_template_application_model\"}'"}
}