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

Function UpdateGpuSpecificDefaults

catboost/cuda/train_lib/train.cpp:100–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98 }
99
100 inline void UpdateGpuSpecificDefaults(NCatboostOptions::TCatBoostOptions& options,
101 TBinarizedFeaturesManager& featuresManager) {
102 //don't make several permutations in matrixnet-like mode if we don't have ctrs
103 if (!HasPermutationFeatures(featuresManager) && options.BoostingOptions->BoostingType == EBoostingType::Plain) {
104 if (options.BoostingOptions->PermutationCount > 1) {
105 CATBOOST_DEBUG_LOG << "No catFeatures for ctrs found and don't look ahead is disabled. Fallback to one permutation" << Endl;
106 }
107 options.BoostingOptions->PermutationCount = 1;
108 } else {
109 if (options.BoostingOptions->PermutationCount > 1) {
110 if (options.ObliviousTreeOptions->LeavesEstimationMethod.IsDefault() &&
111 options.ObliviousTreeOptions->LeavesEstimationMethod == ELeavesEstimation::Simple)
112 {
113 options.ObliviousTreeOptions->LeavesEstimationMethod.SetDefault(ELeavesEstimation::Newton);
114 }
115 }
116 }
117
118 NCatboostOptions::TOption<ui32>& blockSizeOption = options.BoostingOptions->PermutationBlockSize;
119 if (!blockSizeOption.IsSet() || blockSizeOption == 0u) {
120 blockSizeOption.Set(64);
121 }
122 }
123
124 static inline bool NeedPriorEstimation(const TVector<NCatboostOptions::TCtrDescription>& descriptions) {
125 for (const auto& description : descriptions) {

Callers 1

Calls 5

HasPermutationFeaturesFunction · 0.85
IsDefaultMethod · 0.45
SetDefaultMethod · 0.45
IsSetMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected