I have versions 1 and 2 of a model and I'm trying to assign them labels, following the instructions at https://www.tensorflow.org/serving/serving_config#assigning_string_labels_to_model_versions_to_simplify_canary_and_rollback
I have exported the two versions in /path/to/model/1 and /path/to/model/2 respectively and I'm starting the server with the following command:
tensorflow_model_server --rest_api_port=8501 --model_config_file=models.config
The following models.config file works, and results in only serving version 1 (and if the specific message is omitted, version 2 is served as expected since it corresponds to the highest number):
model_config_list {
config {
name: 'm1'
base_path: '/path/to/model/'
model_platform: 'tensorflow'
model_version_policy {
specific {
versions: 1
}
}
}
I have verified that I can use the server to send requests to the model and perform inference as expected. However if I try to add version_labels by using this config file:
model_config_list {
config {
name: 'm1'
base_path: '/path/to/model/'
model_platform: 'tensorflow'
model_version_policy {
specific {
versions: 1
}
version_labels {
key: 'current'
value: 1
}
}
}
then launching the server fails with the following error:
Failed to start server. Error: Failed precondition: Request to assign label to version 1 of model m1, which is not currently available for inference.
I've also noticed that changing the value field to a non-existent version folder yields a similar result:
Failed to start server. Error: Failed precondition: Request to assign label to version 1234 of model m1, which is not currently available for inference.
I'm using:
TensorFlow ModelServer: 1.12.0-rc0+dev.sha.87470f0
TensorFlow Library: 1.12.0
I couldn't find any SO questions on the topic of version_labels and the available tensorflow documentation seems incomplete and outdated (for instance it doesn't mention the need to pass model_platform: 'tensorflow' in the config file).
Any help would be much appreciated!