@@ -261,6 +261,44 @@ def _preprocess_task_arguments(task_args):
261261 if isinstance (task_args ["selection_value" ], (int , float )):
262262 task_args ["selection_value" ] = str (task_args ["selection_value" ])
263263
264+ # Warn the simple deprecations for Khiops 11
265+ simple_khiops_11_deprecations = [
266+ ("max_groups" , "the upcoming 'max_parts' parameter" , 0 ),
267+ ("max_intervals" , "the upcoming 'max_parts' parameter" , 0 ),
268+ ("min_group_frequency" , None , 0 ),
269+ ("min_interval_frequency" , None , 0 ),
270+ ("results_prefix" , None , "" ),
271+ ("snb_predictor" , None , True ),
272+ ("univariate_predictor_number" , None , 0 ),
273+ ]
274+ for param , replacement_param , param_default_value in simple_khiops_11_deprecations :
275+ if param in task_args and task_args [param ] != param_default_value :
276+ warnings .warn (
277+ deprecation_message (
278+ f"'{ param } '" , "11.0.0" , replacement = replacement_param , quote = False
279+ )
280+ )
281+
282+ # Warn the grouping/interval supervised method deprecation values for Khiops 11
283+ if "target_variable" in task_args and task_args ["target_variable" ] != "" :
284+ if "grouping_method" in task_args and task_args ["grouping_method" ] != "MODL" :
285+ warnings .warn (
286+ deprecation_message (
287+ "'grouping_method' on supervised learning" , "11.0.0" , quote = False
288+ )
289+ )
290+ if (
291+ "discretization_method" in task_args
292+ and task_args ["discretization_method" ] != "MODL"
293+ ):
294+ warnings .warn (
295+ deprecation_message (
296+ f"'discretization_method' on supervised learning" ,
297+ "11.0.0" ,
298+ quote = False ,
299+ )
300+ )
301+
264302 return task_called_with_domain
265303
266304
0 commit comments