Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dask] test that Dask automatically treats 'category' columns as categorical features #3932

Merged
merged 1 commit into from
Feb 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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