I'm evaluation an option to host a saved tensorflow model using the tensorflow/serving docker image.
https://github.com/tensorflow/serving/blob/master/tensorflow_serving/g3doc/docker.md
If I mount a directory with following structure:
test-model
1
saved model v1
2
saved model v2
using following command:
docker run \
-v "test-model:/models/test-model" \
-e MODEL_NAME=test-model \
tensorflow/serving
Will I be able to invoke different version of the model using different endpoint?
I tried following:
http://localhost:8501/v1/models/test-model/1 and
http://localhost:8501/v1/models/test-model/v1
but got:
{
"error": "Malformed request: POST /v1/models/test-model/v1:predict"
}
Turns out that both the http and grcp apis support invoking of different versions of the model by providing a model_spec property.
HTTP api:
GRPC api:
The version number corresponds to the model subdirectory.