I ran the following commands
torch-model-archiver --model-name "bert" --version 1.0 --serialized-file ./bert_model/pytorch_model.bin --extra-files "./bert_model/config.json,./bert_model/vocab.txt" --handler "./handler.py"
I created all the files and then I created a new directory and copied the model into it.
Then I executed the following command:
torchserve --start --model-store model_store --models bert=bert.mar
It then displayed a slew of errors.
Here is my error text. It is too long and repetitive; hence, I posted it on paste bin.
I would suggest lowering down the number of workers per model (Default workers per model: 12) now you get the maximum number that your can handle
How? Go to config.properties file and add (the first line indicates the workers to 2):
Then when you will do the torchserve add this (ts-config option to point on the location of you config.properties file):
Let me know if this solves the error.
Note : you can add other parameters as well in the config.properties file such as :