| 124 | |
| 125 | |
| 126 | int mode_select_features(int argc, const char* argv[]) { |
| 127 | ConfigureMalloc(); |
| 128 | |
| 129 | #if defined(USE_MPI) |
| 130 | char** args = const_cast<char**>(argv); |
| 131 | auto& mpiManager = NCudaLib::GetMpiManager(); |
| 132 | mpiManager.Start(&argc, &args); |
| 133 | CATBOOST_DEBUG_LOG << (mpiManager.IsMaster() ? "MASTER" : "SLAVE") << Endl; |
| 134 | if (!mpiManager.IsMaster()) { |
| 135 | CATBOOST_DEBUG_LOG << "Running MPI slave" << Endl; |
| 136 | RunSlave(); |
| 137 | return 0; |
| 138 | } |
| 139 | #endif |
| 140 | |
| 141 | TCatBoostOptions catBoostOptions(ETaskType::CPU /* no matter */); |
| 142 | TOutputFilesOptions outputOptions; |
| 143 | TPoolLoadParams poolLoadParams; |
| 144 | TFeaturesSelectOptions featuresSelectOptions; |
| 145 | LoadOptions( |
| 146 | argc, |
| 147 | argv, |
| 148 | &catBoostOptions, |
| 149 | &outputOptions, |
| 150 | &poolLoadParams, |
| 151 | &featuresSelectOptions |
| 152 | ); |
| 153 | |
| 154 | TSetLogging inThisScope(catBoostOptions.LoggingLevel); |
| 155 | |
| 156 | auto trainerEnv = NCB::CreateTrainerEnv(catBoostOptions); |
| 157 | |
| 158 | NPar::TLocalExecutor executor; |
| 159 | executor.RunAdditionalThreads(catBoostOptions.SystemOptions->NumThreads - 1); |
| 160 | |
| 161 | CATBOOST_INFO_LOG << "Loading pools..." << Endl; |
| 162 | auto pools = LoadPools( |
| 163 | catBoostOptions, |
| 164 | poolLoadParams, |
| 165 | &catBoostOptions.DataProcessingOptions->HasTimeFlag, |
| 166 | &executor |
| 167 | ); |
| 168 | |
| 169 | TVector<TEvalResult> evalResults(pools.Test.size()); |
| 170 | |
| 171 | const TFeaturesSelectionSummary summary = SelectFeatures( |
| 172 | catBoostOptions, |
| 173 | outputOptions, |
| 174 | &poolLoadParams, |
| 175 | featuresSelectOptions, |
| 176 | /*evalMetricDescriptor*/ Nothing(), |
| 177 | pools, |
| 178 | /*dstModel*/ nullptr, |
| 179 | /*evalResults*/ GetMutablePointers(evalResults), |
| 180 | /*metricsAndTimeHistory*/ nullptr, |
| 181 | &executor |
| 182 | ); |
| 183 | SaveSummaryToFile(summary, featuresSelectOptions.ResultPath); |
nothing calls this directly
no test coverage detected