Home > Software engineering >  Failed to start server. Error: Invalid argument
Failed to start server. Error: Invalid argument

Time:03-23

I am currently working with TensorFlow serving and while running a command I encountered an error

Step 1:- I pulled tensorflow/serving image using

docker pull tensorflow/pull

Step 2:- I made a project where I save the TF model in a directory:

C:/Code/potato-disease:

Step 3:- After running the command :-

docker run -t --rm -p 8505:8505 -v C:/Code/potato-disease:/potato-disease tensorflow/serving --rest_api_port=8505 --model_config_file=/potato-disease/models.config

Error:-

Failed to start server. Error: Invalid argument: Expected model potatoes_model to have an absolute path or URI; got base_path()=C:/Code/potato-disease/saved_models
2022-03-16 03:21:46.161233: I tensorflow_serving/core/basic_manager.cc:279] Unload all remaining servables in the manager.

My models.config file

model_config_list {
 config {
    name: 'potatoes_model'
    base_path: 'C:/Code/potato-disease/saved_models'
    model_platform: 'tensorflow'
    model_version_policy: {all: {}}
        }
}

CodePudding user response:

You should edit your models.config config and put /potato-disease/saved_models as a base_path since it'll be the docker that will interpret your code it should have propper arguments depending of it's environnement, since it's running inside docker the absolute path should be considering that.

  • Related