| 90 | } |
| 91 | |
| 92 | Status ModelStore::GetFullModelVersion(Version& version) { |
| 93 | TF_RETURN_IF_ERROR(DetectLatestCheckpointDir()); |
| 94 | TF_RETURN_IF_ERROR(file_system_->IsDirectory(checkpoint_dir_)); |
| 95 | |
| 96 | std::vector<string> file_names; |
| 97 | TF_RETURN_IF_ERROR(file_system_->GetChildren(checkpoint_dir_, |
| 98 | &file_names)); |
| 99 | |
| 100 | for (auto fname : file_names) { |
| 101 | if (IsIncrementalCkptPath(fname) || |
| 102 | !IsMetaFileName(fname)) { |
| 103 | continue; |
| 104 | } |
| 105 | |
| 106 | auto v = ParseMetaFileName(fname); |
| 107 | if (v > version.full_ckpt_version) { |
| 108 | version.full_ckpt_name = ParseCkptFileName(checkpoint_dir_, fname); |
| 109 | version.full_ckpt_version = v; |
| 110 | } |
| 111 | } |
| 112 | return Status::OK(); |
| 113 | } |
| 114 | |
| 115 | Status ModelStore::GetDeltaModelVersion(Version& version) { |
| 116 | delta_model_dir_ = io::JoinPath(checkpoint_dir_, ".incremental_checkpoint"); |
nothing calls this directly
no test coverage detected