| 30 | } |
| 31 | |
| 32 | void 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 | |
| 43 | void MaybeUpdateRealVersion(Version* version, int64_t full_version, |
| 44 | int latest_version) { |
no test coverage detected