MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / GetValidSavedModelDir

Method GetValidSavedModelDir

serving/processor/storage/model_store.cc:76–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76Status 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
92Status ModelStore::GetFullModelVersion(Version& version) {
93 TF_RETURN_IF_ERROR(DetectLatestCheckpointDir());

Callers

nothing calls this directly

Calls 4

NotFoundFunction · 0.85
JoinPathFunction · 0.50
okMethod · 0.45
FileExistsMethod · 0.45

Tested by

no test coverage detected