| 88 | } |
| 89 | |
| 90 | void GetMetricType(const std::unordered_map<std::string, std::string>& params, std::vector<std::string>* metric) { |
| 91 | std::string value; |
| 92 | if (Config::GetString(params, "metric", &value)) { |
| 93 | std::transform(value.begin(), value.end(), value.begin(), Common::tolower); |
| 94 | ParseMetrics(value, metric); |
| 95 | } |
| 96 | // add names of objective function if not providing metric |
| 97 | if (metric->empty() && value.size() == 0) { |
| 98 | if (Config::GetString(params, "objective", &value)) { |
| 99 | std::transform(value.begin(), value.end(), value.begin(), Common::tolower); |
| 100 | ParseMetrics(value, metric); |
| 101 | } |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | void GetTaskType(const std::unordered_map<std::string, std::string>& params, TaskType* task) { |
| 106 | std::string value; |