From e3ef4b19627853e694a51ea0b1465a060caa8952 Mon Sep 17 00:00:00 2001 From: Peng Yu Date: Tue, 31 Jul 2018 16:02:15 -0400 Subject: Add extra log for failing to load variable purpose --- tensorflow/cc/saved_model/loader.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'tensorflow/cc') diff --git a/tensorflow/cc/saved_model/loader.cc b/tensorflow/cc/saved_model/loader.cc index 98be66a6ad..ca8cb8a9be 100644 --- a/tensorflow/cc/saved_model/loader.cc +++ b/tensorflow/cc/saved_model/loader.cc @@ -169,6 +169,7 @@ Status RunRestore(const RunOptions& run_options, const string& export_dir, const string variables_index_path = io::JoinPath( variables_directory, MetaFilename(kSavedModelVariablesFilename)); if (!Env::Default()->FileExists(variables_index_path).ok()) { + LOG(INFO) << "Falied to restore variables from " << variables_index_path; LOG(INFO) << "The specified SavedModel has no variables; no checkpoints " "were restored."; return Status::OK(); -- cgit v1.2.3 From 19f86cbeadb7014b9940be1f6921776ef9d2f986 Mon Sep 17 00:00:00 2001 From: Peng Yu Date: Tue, 31 Jul 2018 17:30:06 -0400 Subject: address comments --- tensorflow/cc/saved_model/loader.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tensorflow/cc') diff --git a/tensorflow/cc/saved_model/loader.cc b/tensorflow/cc/saved_model/loader.cc index ca8cb8a9be..22ad5e0162 100644 --- a/tensorflow/cc/saved_model/loader.cc +++ b/tensorflow/cc/saved_model/loader.cc @@ -169,9 +169,8 @@ Status RunRestore(const RunOptions& run_options, const string& export_dir, const string variables_index_path = io::JoinPath( variables_directory, MetaFilename(kSavedModelVariablesFilename)); if (!Env::Default()->FileExists(variables_index_path).ok()) { - LOG(INFO) << "Falied to restore variables from " << variables_index_path; LOG(INFO) << "The specified SavedModel has no variables; no checkpoints " - "were restored."; + "were restored. Failed to restore from " << variables_index_path; return Status::OK(); } const string variables_path = -- cgit v1.2.3 From 234c9a3fd3a430f25c604c42b457b72842375f30 Mon Sep 17 00:00:00 2001 From: Jonathan Hseu Date: Tue, 31 Jul 2018 14:50:55 -0700 Subject: Slightly modify error message --- tensorflow/cc/saved_model/loader.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tensorflow/cc') diff --git a/tensorflow/cc/saved_model/loader.cc b/tensorflow/cc/saved_model/loader.cc index 22ad5e0162..a5eae97f6e 100644 --- a/tensorflow/cc/saved_model/loader.cc +++ b/tensorflow/cc/saved_model/loader.cc @@ -170,7 +170,7 @@ Status RunRestore(const RunOptions& run_options, const string& export_dir, variables_directory, MetaFilename(kSavedModelVariablesFilename)); if (!Env::Default()->FileExists(variables_index_path).ok()) { LOG(INFO) << "The specified SavedModel has no variables; no checkpoints " - "were restored. Failed to restore from " << variables_index_path; + "were restored. File does not exist: " << variables_index_path; return Status::OK(); } const string variables_path = -- cgit v1.2.3 From 16c2b25e7e23fb1ac373cd2162ce18ca71e9b0a8 Mon Sep 17 00:00:00 2001 From: Peng Yu Date: Tue, 7 Aug 2018 16:04:41 -0400 Subject: make the line shorter --- tensorflow/cc/saved_model/loader.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tensorflow/cc') diff --git a/tensorflow/cc/saved_model/loader.cc b/tensorflow/cc/saved_model/loader.cc index a5eae97f6e..3830416159 100644 --- a/tensorflow/cc/saved_model/loader.cc +++ b/tensorflow/cc/saved_model/loader.cc @@ -170,7 +170,8 @@ Status RunRestore(const RunOptions& run_options, const string& export_dir, variables_directory, MetaFilename(kSavedModelVariablesFilename)); if (!Env::Default()->FileExists(variables_index_path).ok()) { LOG(INFO) << "The specified SavedModel has no variables; no checkpoints " - "were restored. File does not exist: " << variables_index_path; + "were restored. File does not exist: " + << variables_index_path; return Status::OK(); } const string variables_path = -- cgit v1.2.3