From 70f6ff549240ba05596ea9d70971741414f18822 Mon Sep 17 00:00:00 2001 From: Samir Nasibli Date: Mon, 30 Sep 2024 08:51:57 -0700 Subject: [PATCH] minopr fix for the test --- sklearnex/tests/test_memory_usage.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sklearnex/tests/test_memory_usage.py b/sklearnex/tests/test_memory_usage.py index c2e74cfd1b..ea720d70d1 100644 --- a/sklearnex/tests/test_memory_usage.py +++ b/sklearnex/tests/test_memory_usage.py @@ -125,6 +125,7 @@ def gen_functions(functions): ORDER_DICT = {"F": np.asfortranarray, "C": np.ascontiguousarray} +DUMMY_ESTIMATOR = {} if dpctl_available: # TODO: # use from_table, to_table. @@ -149,9 +150,9 @@ def predict(self, X): returned_X = convert_one_from_table(X_table, sua_iface=sua_iface, xp=xp) return returned_X - DUMMY_ESTIMATOR_WITH_TABLE_CONVERSIONS = { - "DummyEstimatorWithTableConversions": DummyEstimatorWithTableConversions - } + DUMMY_ESTIMATOR["DummyEstimatorWithTableConversions"] = ( + DummyEstimatorWithTableConversions + ) def gen_clsf_data(n_samples, n_features): @@ -333,7 +334,7 @@ def test_gpu_memory_leaks(estimator, queue, order, data_shape): @pytest.mark.parametrize( "dataframe,queue", get_dataframes_and_queues("dpctl, dpnp", "cpu, gpu") ) -@pytest.mark.parametrize("estimator", DUMMY_ESTIMATOR_WITH_TABLE_CONVERSIONS.keys()) +@pytest.mark.parametrize("estimator", DUMMY_ESTIMATOR.keys()) @pytest.mark.parametrize("order", ["F", "C"]) @pytest.mark.parametrize("data_shape", data_shapes) def test_table_conversions_memory_leaks(estimator, dataframe, queue, order, data_shape): @@ -345,7 +346,7 @@ def test_table_conversions_memory_leaks(estimator, dataframe, queue, order, data pytest.skip("SYCL device memory leak check requires the level zero sysman") _kfold_function_template( - DUMMY_ESTIMATOR_WITH_TABLE_CONVERSIONS[estimator], + DUMMY_ESTIMATOR[estimator], dataframe, data_shape, queue,