Skip to content

Commit

Permalink
[dask] test that Dask automatically treats 'category' columns as cate…
Browse files Browse the repository at this point in the history
…gorical features (#3932)
  • Loading branch information
jameslamb authored Feb 9, 2021
1 parent 06ed433 commit 18d5793
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions tests/python_package_test/test_dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 18d5793

Please sign in to comment.