From 5f6952bdf0c5e07e06511fd887fb39c6548eb559 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 9 Feb 2021 14:12:22 -0600 Subject: [PATCH] [dask] test that Dask automatically treats 'category' columns as categorical features --- tests/python_package_test/test_dask.py | 30 -------------------------- 1 file changed, 30 deletions(-) diff --git a/tests/python_package_test/test_dask.py b/tests/python_package_test/test_dask.py index c441466b3151..3e556314aab8 100644 --- a/tests/python_package_test/test_dask.py +++ b/tests/python_package_test/test_dask.py @@ -210,11 +210,6 @@ def test_classifier(output, centers, client, listen_port): "num_leaves": 10 } - if output == 'dataframe-with-categorical': - params["categorical_feature"] = [ - i for i, col in enumerate(dX.columns) if col.startswith('cat_') - ] - dask_classifier = lgb.DaskLGBMClassifier( client=client, time_out=5, @@ -283,11 +278,6 @@ def test_classifier_pred_contrib(output, centers, client, listen_port): "num_leaves": 10 } - if output == 'dataframe-with-categorical': - params["categorical_feature"] = [ - i for i, col in enumerate(dX.columns) if col.startswith('cat_') - ] - dask_classifier = lgb.DaskLGBMClassifier( client=client, time_out=5, @@ -379,11 +369,6 @@ def test_regressor(output, client, listen_port): "num_leaves": 10 } - if output == 'dataframe-with-categorical': - params["categorical_feature"] = [ - i for i, col in enumerate(dX.columns) if col.startswith('cat_') - ] - dask_regressor = lgb.DaskLGBMRegressor( client=client, time_out=5, @@ -460,11 +445,6 @@ def test_regressor_pred_contrib(output, client, listen_port): "num_leaves": 10 } - if output == 'dataframe-with-categorical': - params["categorical_feature"] = [ - i for i, col in enumerate(dX.columns) if col.startswith('cat_') - ] - dask_regressor = lgb.DaskLGBMRegressor( client=client, time_out=5, @@ -519,11 +499,6 @@ def test_regressor_quantile(output, client, listen_port, alpha): "num_leaves": 10 } - if output == 'dataframe-with-categorical': - params["categorical_feature"] = [ - i for i, col in enumerate(dX.columns) if col.startswith('cat_') - ] - dask_regressor = lgb.DaskLGBMRegressor( client=client, local_listen_port=listen_port, @@ -593,11 +568,6 @@ def test_ranker(output, client, listen_port, group): "min_child_samples": 1 } - if output == 'dataframe-with-categorical': - params["categorical_feature"] = [ - i for i, col in enumerate(dX.columns) if col.startswith('cat_') - ] - dask_ranker = lgb.DaskLGBMRanker( client=client, time_out=5,