| 74 | } |
| 75 | |
| 76 | Status ModelStore::GetValidSavedModelDir(Version& version) { |
| 77 | const string saved_model_pb_path = |
| 78 | io::JoinPath(savedmodel_dir_, kSavedModelFilenamePb); |
| 79 | const string saved_model_pbtxt_path = |
| 80 | io::JoinPath(savedmodel_dir_, kSavedModelFilenamePbTxt); |
| 81 | if (file_system_->FileExists(saved_model_pb_path).ok() || |
| 82 | file_system_->FileExists(saved_model_pbtxt_path).ok()) { |
| 83 | version.savedmodel_dir = savedmodel_dir_; |
| 84 | return Status::OK(); |
| 85 | } |
| 86 | |
| 87 | TF_RETURN_IF_ERROR(file_system_->FileExists(saved_model_pb_path)); |
| 88 | TF_RETURN_IF_ERROR(file_system_->FileExists(saved_model_pbtxt_path)); |
| 89 | return errors::NotFound(saved_model_pb_path, " unknow error."); |
| 90 | } |
| 91 | |
| 92 | Status ModelStore::GetFullModelVersion(Version& version) { |
| 93 | TF_RETURN_IF_ERROR(DetectLatestCheckpointDir()); |
nothing calls this directly
no test coverage detected