42 static const std::string class_namespace =
"apollo::prediction::";
43 std::map<std::string, std::vector<Model>> m;
44 for (
auto& model_conf : evaluator_model_conf_.
model()) {
45 auto key = to_string(model_conf);
46 if (model_conf.priority() == 0) {
52 if (m.find(key) != m.end()) {
53 m[key].push_back(model_conf);
55 m[key] = std::vector<Model>{model_conf};
61 sort(m[p.first].begin(), m[p.first].end(),
62 [](
Model& a,
Model& b){return a.priority() < b.priority();});
67 auto& model_conf_vec = p.second;
68 models_[key] = std::vector<std::shared_ptr<ModelBase>>{};
69 for (
auto model_conf : model_conf_vec) {
70 std::string class_name = model_conf.type();
71 if (class_name.find(
"::") == std::string::npos) {
72 class_name = class_namespace + class_name;
77 models_[key].push_back(model_ptr);
bool GetProtoFromFile(const std::string &file_name, google::protobuf::Message *message)
Parses the content of the file specified by the file_name as a representation of protobufs,...