Skip to content

Commit

Permalink
minopr fix for the test
Browse files Browse the repository at this point in the history
  • Loading branch information
samir-nasibli committed Sep 30, 2024
1 parent 1c0933b commit 70f6ff5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions sklearnex/tests/test_memory_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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):
Expand Down Expand Up @@ -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):
Expand All @@ -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,
Expand Down

0 comments on commit 70f6ff5

Please sign in to comment.