| 193 | } |
| 194 | |
| 195 | void SetGraph(const TPathWithScheme& graphPath, TDatasetSubset loadSubset, IDatasetVisitor* visitor) { |
| 196 | DumpMemUsage("Before data read graphPath"); |
| 197 | if (graphPath.Inited()) { |
| 198 | auto pairsDataLoader = GetProcessor<IPairsDataLoader>( |
| 199 | graphPath, |
| 200 | TPairsDataLoaderArgs{graphPath, loadSubset} |
| 201 | ); |
| 202 | pairsDataLoader->IsPairs = false; |
| 203 | if (pairsDataLoader->NeedGroupIdToIdxMap()) { |
| 204 | auto maybeGroupIds = visitor->GetGroupIds(); |
| 205 | CB_ENSURE(maybeGroupIds, "Cannot load graph data with group ids for a dataset without groups"); |
| 206 | pairsDataLoader->SetGroupIdToIdxMap(*maybeGroupIds); |
| 207 | } |
| 208 | pairsDataLoader->Do(visitor); |
| 209 | } |
| 210 | } |
| 211 | |
| 212 | void SetGroupWeights( |
| 213 | const TPathWithScheme& groupWeightsPath, |
no test coverage detected