MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / ParseMetrics

Function ParseMetrics

python-package/compile/src/io/config.cpp:69–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69void ParseMetrics(const std::string& value, std::vector<std::string>* out_metric) {
70 std::unordered_set<std::string> metric_sets;
71 out_metric->clear();
72 std::vector<std::string> metrics = Common::Split(value.c_str(), ',');
73 for (auto& met : metrics) {
74 auto type = ParseMetricAlias(met);
75 if (metric_sets.count(type) <= 0) {
76 out_metric->push_back(type);
77 metric_sets.insert(type);
78 }
79 }
80}
81
82void GetObjectiveType(const std::unordered_map<std::string, std::string>& params, std::string* objective) {
83 std::string value;

Callers 1

GetMetricTypeFunction · 0.70

Calls 6

push_backMethod · 0.80
SplitFunction · 0.50
ParseMetricAliasFunction · 0.50
clearMethod · 0.45
countMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected