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

Method GetDeltaModelVersion

serving/processor/storage/model_store.cc:115–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115Status ModelStore::GetDeltaModelVersion(Version& version) {
116 delta_model_dir_ = io::JoinPath(checkpoint_dir_, ".incremental_checkpoint");
117 TF_RETURN_IF_ERROR(file_system_->IsDirectory(delta_model_dir_));
118
119 std::vector<string> file_names;
120 TF_RETURN_IF_ERROR(file_system_->GetChildren(delta_model_dir_,
121 &file_names));
122
123 for (auto fname : file_names) {
124 if (!IsMetaFileName(fname)) {
125 continue;
126 }
127 auto v = ParseMetaFileName(fname);
128 if (v > version.delta_ckpt_version &&
129 v > version.full_ckpt_version) {
130 version.delta_ckpt_name = ParseCkptFileName(delta_model_dir_, fname);
131 version.delta_ckpt_version = v;
132 }
133 }
134 return Status::OK();
135}
136
137Status ModelStore::DetectLatestCheckpointDir() {
138 TF_RETURN_IF_ERROR(file_system_->IsDirectory(checkpoint_parent_dir_));

Callers

nothing calls this directly

Calls 6

IsMetaFileNameFunction · 0.85
ParseMetaFileNameFunction · 0.85
ParseCkptFileNameFunction · 0.85
JoinPathFunction · 0.50
IsDirectoryMethod · 0.45
GetChildrenMethod · 0.45

Tested by

no test coverage detected