16 #include "tensorflow_serving/core/aspired_version_policy.h"
20 namespace tensorflow {
24 const std::vector<AspiredServableStateSnapshot>& all_versions) {
25 absl::optional<ServableId> highest_version_id;
26 for (
const auto& version : all_versions) {
28 if (!highest_version_id ||
29 version.id.version > highest_version_id.value().version) {
30 highest_version_id = version.id;
34 return highest_version_id;
static absl::optional< ServableId > GetHighestAspiredNewServableId(const std::vector< AspiredServableStateSnapshot > &all_versions)