@@ -118,10 +118,9 @@ def test_incremental_linear_regression_fit_spmd_gold(
118118@pytest .mark .parametrize ("num_blocks" , [1 , 2 ])
119119@pytest .mark .parametrize ("macro_block" , [None , 1024 ])
120120@pytest .mark .parametrize ("dtype" , [np .float32 , np .float64 ])
121- @pytest .mark .parametrize ("use_raw_input" , [True , False ])
122121@pytest .mark .mpi
123122def test_incremental_linear_regression_partial_fit_spmd_gold (
124- dataframe , queue , fit_intercept , num_blocks , macro_block , dtype , use_raw_input
123+ dataframe , queue , fit_intercept , num_blocks , macro_block , dtype
125124):
126125 # Import spmd and non-SPMD algo
127126 from sklearnex .linear_model import IncrementalLinearRegression
@@ -179,9 +178,7 @@ def test_incremental_linear_regression_partial_fit_spmd_gold(
179178 local_dpt_y = _convert_to_dataframe (
180179 split_local_y [i ], sycl_queue = queue , target_df = dataframe
181180 )
182- # Configure raw input status for spmd estimator
183- with config_context (use_raw_input = use_raw_input ):
184- inclin_spmd .partial_fit (local_dpt_X , local_dpt_y )
181+ inclin_spmd .partial_fit (local_dpt_X , local_dpt_y )
185182
186183 inclin .fit (dpt_X , dpt_y )
187184
@@ -272,6 +269,7 @@ def test_incremental_linear_regression_fit_spmd_random(
272269@pytest .mark .parametrize ("num_features" , [5 , 10 ])
273270@pytest .mark .parametrize ("macro_block" , [None , 1024 ])
274271@pytest .mark .parametrize ("dtype" , [np .float32 , np .float64 ])
272+ @pytest .mark .parametrize ("use_raw_input" , [True , False ])
275273@pytest .mark .mpi
276274def test_incremental_linear_regression_partial_fit_spmd_random (
277275 dataframe ,
@@ -282,6 +280,7 @@ def test_incremental_linear_regression_partial_fit_spmd_random(
282280 num_features ,
283281 macro_block ,
284282 dtype ,
283+ use_raw_input ,
285284):
286285 # Import spmd and non-SPMD algo
287286 from sklearnex .linear_model import IncrementalLinearRegression
@@ -328,7 +327,9 @@ def test_incremental_linear_regression_partial_fit_spmd_random(
328327 dpt_X = _convert_to_dataframe (X_split [i ], sycl_queue = queue , target_df = dataframe )
329328 dpt_y = _convert_to_dataframe (y_split [i ], sycl_queue = queue , target_df = dataframe )
330329
331- inclin_spmd .partial_fit (local_dpt_X , local_dpt_y )
330+ # Configure raw input status for spmd estimator
331+ with config_context (use_raw_input = use_raw_input ):
332+ inclin_spmd .partial_fit (local_dpt_X , local_dpt_y )
332333 inclin .partial_fit (dpt_X , dpt_y )
333334
334335 assert_allclose (_as_numpy (inclin .coef_ ), _as_numpy (inclin_spmd .coef_ ), atol = tol )
@@ -337,7 +338,8 @@ def test_incremental_linear_regression_partial_fit_spmd_random(
337338 _as_numpy (inclin .intercept_ ), _as_numpy (inclin_spmd .intercept_ ), atol = tol
338339 )
339340
340- y_pred_spmd = inclin_spmd .predict (dpt_X_test )
341+ with config_context (use_raw_input = use_raw_input ):
342+ y_pred_spmd = inclin_spmd .predict (dpt_X_test )
341343 y_pred = inclin .predict (dpt_X_test )
342344
343345 assert_allclose (_as_numpy (y_pred_spmd ), _as_numpy (y_pred ), atol = tol )
0 commit comments