MCPcopy Create free account
hub / github.com/catboost/catboost / SetGraph

Function SetGraph

catboost/libs/data/loader.cpp:195–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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,

Callers 2

SetGraphMethod · 0.85
FinalizeBuilderMethod · 0.85

Calls 6

DumpMemUsageFunction · 0.85
InitedMethod · 0.45
NeedGroupIdToIdxMapMethod · 0.45
GetGroupIdsMethod · 0.45
SetGroupIdToIdxMapMethod · 0.45
DoMethod · 0.45

Tested by

no test coverage detected