| 181 | } |
| 182 | |
| 183 | TDataProviderPtr ShuffleLearnDataIfNeeded( |
| 184 | const NCatboostOptions::TCatBoostOptions& catBoostOptions, |
| 185 | TDataProviderPtr learnData, |
| 186 | NPar::ILocalExecutor* localExecutor, |
| 187 | TRestorableFastRng64* rand) { |
| 188 | |
| 189 | if (NeedShuffle( |
| 190 | learnData->MetaInfo.FeaturesLayout->GetCatFeatureCount(), |
| 191 | learnData->ObjectsData->GetObjectCount(), |
| 192 | catBoostOptions |
| 193 | )) { |
| 194 | auto objectsGroupingSubset = NCB::Shuffle(learnData->ObjectsGrouping, 1, rand); |
| 195 | return learnData->GetSubset( |
| 196 | objectsGroupingSubset, |
| 197 | ParseMemorySizeDescription(catBoostOptions.SystemOptions->CpuUsedRamLimit.Get()), |
| 198 | localExecutor |
| 199 | ); |
| 200 | } |
| 201 | return learnData; |
| 202 | } |
no test coverage detected