static
| 31 | |
| 32 | // static |
| 33 | void VerbsUtil::GetKeyAndStepId(const string& key_with_step_id, string& key, |
| 34 | int64& step_id) { |
| 35 | StringPiece s(key_with_step_id); |
| 36 | // a key (with step_id) has exact 6 parts if split by ";" |
| 37 | // part 1: src_device; |
| 38 | // part 2: src_incarnation; |
| 39 | // part 3: dst_device; |
| 40 | // part 4: name; |
| 41 | // part 5: frame_iter.frame_id:frame_iter.iter_id |
| 42 | // part 6: step_id |
| 43 | std::vector<string> parts = str_util::Split(s, ';'); |
| 44 | CHECK(parts.size() == 6) << "Key with step_id must have 6 parts"; |
| 45 | strings::safe_strto64(parts[5], &step_id); |
| 46 | parts.pop_back(); // remove step_id |
| 47 | key.assign(absl::StrJoin(parts, ";")); // stitch them together |
| 48 | } |
| 49 | |
| 50 | } // namespace tensorflow |
nothing calls this directly
no test coverage detected