| 199 | } |
| 200 | |
| 201 | TDataProviders ReadTrainDatasets( |
| 202 | TMaybe<ETaskType> taskType, |
| 203 | const NCatboostOptions::TPoolLoadParams& loadOptions, |
| 204 | EObjectsOrder objectsOrder, |
| 205 | bool readTestData, |
| 206 | TDatasetSubset learnDatasetSubset, |
| 207 | TConstArrayRef<TDatasetSubset> testDatasetSubsets, |
| 208 | bool forceUnitAutoPairWeights, |
| 209 | TMaybe<TVector<NJson::TJsonValue>*> classLabels, |
| 210 | NPar::ILocalExecutor* const executor, |
| 211 | TProfileInfo* const profile |
| 212 | ) { |
| 213 | if (readTestData) { |
| 214 | loadOptions.Validate(); |
| 215 | } else { |
| 216 | loadOptions.ValidateLearn(); |
| 217 | } |
| 218 | |
| 219 | TDataProviders dataProviders; |
| 220 | |
| 221 | if (loadOptions.LearnSetPath.Inited()) { |
| 222 | CATBOOST_DEBUG_LOG << "Loading features..." << Endl; |
| 223 | auto start = Now(); |
| 224 | dataProviders.Learn = ReadDataset( |
| 225 | taskType, |
| 226 | loadOptions.LearnSetPath, |
| 227 | loadOptions.PairsFilePath, |
| 228 | loadOptions.GraphFilePath, |
| 229 | loadOptions.GroupWeightsFilePath, |
| 230 | loadOptions.TimestampsFilePath, |
| 231 | loadOptions.BaselineFilePath, |
| 232 | loadOptions.FeatureNamesPath, |
| 233 | loadOptions.PoolMetaInfoPath, |
| 234 | loadOptions.ColumnarPoolFormatParams, |
| 235 | loadOptions.IgnoredFeatures, |
| 236 | objectsOrder, |
| 237 | learnDatasetSubset, |
| 238 | /*loadSampleIds*/ false, |
| 239 | forceUnitAutoPairWeights, |
| 240 | classLabels, |
| 241 | executor |
| 242 | ); |
| 243 | CATBOOST_DEBUG_LOG << "Loading features time: " << (Now() - start).Seconds() << Endl; |
| 244 | if (profile) { |
| 245 | profile->AddOperation("Build learn pool"); |
| 246 | } |
| 247 | } |
| 248 | dataProviders.Test.resize(0); |
| 249 | |
| 250 | if (readTestData) { |
| 251 | CATBOOST_DEBUG_LOG << "Loading test..." << Endl; |
| 252 | for (int testIdx = 0; testIdx < loadOptions.TestSetPaths.ysize(); ++testIdx) { |
| 253 | const NCB::TPathWithScheme& testSetPath = loadOptions.TestSetPaths[testIdx]; |
| 254 | const NCB::TPathWithScheme& testPairsFilePath = |
| 255 | testIdx == 0 ? loadOptions.TestPairsFilePath : NCB::TPathWithScheme(); |
| 256 | const NCB::TPathWithScheme& testGraphFilePath = |
| 257 | testIdx == 0 ? loadOptions.TestGraphFilePath : NCB::TPathWithScheme(); |
| 258 | const NCB::TPathWithScheme& testGroupWeightsFilePath = |
no test coverage detected