TensorFlow Serving is a system designed to:
Think about what happens after a model is trained and needs to be used by applications.
TensorFlow Serving is built to deploy and serve trained models so applications can use them for predictions quickly and reliably.
Consider the command below to start TensorFlow Serving with a model named my_model located at /models/my_model/1/:
tensorflow_model_server --rest_api_port=8501 --model_name=my_model --model_base_path=/models/my_model/1/
What will happen after running this command?
Check the meaning of --rest_api_port and the model path format.
The command starts TensorFlow Serving with REST API on port 8501 serving the specified model version at the given path.
When serving models, you want to limit memory usage by keeping only the latest versions loaded. Which flag controls this behavior?
Look for a flag related to version management policy.
The --model_version_policy flag lets you specify which versions to keep loaded, such as the latest N versions.
Given the command below:
tensorflow_model_server --model_name=my_model --model_base_path=/models/my_model
The server fails to start and shows an error about missing model version. What is the likely cause?
Check the expected folder structure for model versions.
TensorFlow Serving expects the model_base_path to point to a directory containing version subdirectories (e.g., 1, 2). Without this, it cannot find a valid model version.
After deploying a model with TensorFlow Serving, you want to monitor if it is handling prediction requests correctly. Which metric should you check?
Look for a metric counting prediction requests.
The metric tensorflow_serving_predict_requests_total counts the total number of prediction requests processed, indicating active serving.
