From 64eaa099df0aaa56af990906b8cfcce8985680ad Mon Sep 17 00:00:00 2001 From: Sraman01-code Date: Sat, 31 Jan 2026 01:04:47 +0530 Subject: [PATCH] Improve error message for missing model base path --- .../storage_path/file_system_storage_path_source.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tensorflow_serving/sources/storage_path/file_system_storage_path_source.cc b/tensorflow_serving/sources/storage_path/file_system_storage_path_source.cc index d68f412a60f..1a4967a11a4 100644 --- a/tensorflow_serving/sources/storage_path/file_system_storage_path_source.cc +++ b/tensorflow_serving/sources/storage_path/file_system_storage_path_source.cc @@ -256,9 +256,13 @@ absl::Status PollFileSystemForServable( // returns an empty list instead of erring if the base path isn't found.) absl::Status status = Env::Default()->FileExists(servable.base_path()); if (!status.ok()) { - return errors::InvalidArgument( - "Could not find base path ", servable.base_path(), " for servable ", - servable.servable_name(), " with error ", status.ToString()); + return errors::NotFound( + "Could not find base path ", servable.base_path(), + " for servable ", servable.servable_name(), + ". TensorFlow Serving expects the following directory structure:\n" + " //saved_model.pb\n" + "Where is a numeric directory name (e.g. '1').\n" + "Underlying filesystem error: ", status.ToString()); } if (servable.servable_version_policy().policy_choice_case() ==