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

Function ModifyPathName

serving/processor/serving/model_session.cc:32–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32void ModifyPathName(std::string* path, int version) {
33 // Full ckpt: /you_path/model.ckpt-num
34 // Delta ckpt: /you_path/incremental_model.ckpt-num
35 int len = path->length(), i;
36 for (i = len - 1; len >= 0; --i) {
37 if ((*path)[i] == '-') break;
38 }
39 *path = path->substr(0, i+1);
40 *path += std::to_string(version);
41}
42
43void MaybeUpdateRealVersion(Version* version, int64_t full_version,
44 int latest_version) {

Callers 1

MaybeUpdateRealVersionFunction · 0.85

Calls 2

to_stringFunction · 0.85
lengthMethod · 0.45

Tested by

no test coverage detected