remove restriction on one-hot max size for CPU training
@@ -131,7 +131,8 @@ namespace NCatboostOptions {
, CounterCalcMethod("counter_calc_method", ECounterCalc::Full)
, StoreAllSimpleCtrs("store_all_simple_ctr", false, taskType)
, CtrLeafCountLimit("ctr_leaf_count_limit", Max<ui64>(), taskType)
- , TargetBorders("target_borders", TBinarizationOptions(EBorderSelectionType::MinEntropy, 1), taskType) {
+ , TargetBorders("target_borders", TBinarizationOptions(EBorderSelectionType::MinEntropy, 1), taskType)
+ , TaskType(taskType) {
TargetBorders.GetUnchecked().DisableNanModeOption();
}
@@ -160,8 +161,10 @@ namespace NCatboostOptions {
}
void Validate() const {
+ if (TaskType == ETaskType::GPU) {
CB_ENSURE(OneHotMaxSize.Get() < GetMaxBinCount(),
- "Error in one_hot_max_size: maximum value of one-hot-encoding is 255");
+ "Error in one_hot_max_size: maximum value of one-hot-encoding is 255 for GPU training");
+ }
const ui32 ctrComplexityLimit = GetMaxTreeDepth();
CB_ENSURE(MaxTensorComplexity.Get() < ctrComplexityLimit,
"Error: max ctr complexity should be less then " << ctrComplexityLimit);
@@ -187,6 +190,8 @@ namespace NCatboostOptions {
TCpuOnlyOption<ui64> CtrLeafCountLimit;
TGpuOnlyOption<TBinarizationOptions> TargetBorders;
+
+ ETaskType TaskType;
};
}
