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

Function ReadDatasetForSampler

catboost/libs/data/sampler.cpp:44–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42
43
44static TDataProviderPtr ReadDatasetForSampler(
45 const TDataProviderSampleParams& params,
46 bool loadSampleIds,
47 THolder<ILineDataReader>&& lineDataReader
48) {
49 const auto& datasetReadingParams = params.DatasetReadingParams;
50
51 TVector<TColumn> columnsDescription;
52 TMaybe<size_t> sampleIdColumnIdx;
53
54 ReadCDForSampler(
55 datasetReadingParams.ColumnarPoolFormatParams.CdFilePath,
56 params.OnlyFeaturesData,
57 loadSampleIds,
58 &columnsDescription,
59 &sampleIdColumnIdx
60 );
61
62 TVector<NJson::TJsonValue> classLabels = datasetReadingParams.ClassLabels;
63
64 return ReadDataset(
65 std::move(lineDataReader),
66 /*pairsFilePath*/ TPathWithScheme(),
67 /*graphFilePath*/ TPathWithScheme(),
68 /*groupWeightsFilePath*/ TPathWithScheme(),
69 /*timestampsFilePath*/ TPathWithScheme(),
70 /*baselineFilePath*/ TPathWithScheme(),
71 datasetReadingParams.FeatureNamesPath,
72 datasetReadingParams.PoolMetaInfoPath,
73 datasetReadingParams.ColumnarPoolFormatParams.DsvFormat,
74 columnsDescription,
75 /*ignoredFeatures*/ {}, //TODO(akhropov): get unused features from the model
76 EObjectsOrder::Ordered,
77 loadSampleIds,
78 /*forceUnitAutoPairWeights*/ false,
79 &classLabels,
80 params.LocalExecutor
81 );
82}
83
84void DegroupDataset(TDataProvider* dataset) {
85 auto& metaInfo = dataset->MetaInfo;

Callers 1

Calls 3

ReadDatasetFunction · 0.85
TPathWithSchemeClass · 0.70
moveFunction · 0.50

Tested by

no test coverage detected