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] Allow empty data matrix in AFT survival #6379

Merged
merged 2 commits into from Nov 13, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/metric/survival_metric.cu
Expand Up @@ -206,10 +206,6 @@ struct EvalEWiseSurvivalBase : public Metric {
bst_float Eval(const HostDeviceVector<bst_float>& preds,
const MetaInfo& info,
bool distributed) override {
CHECK_NE(info.labels_lower_bound_.Size(), 0U)
<< "labels_lower_bound cannot be empty";
CHECK_NE(info.labels_upper_bound_.Size(), 0U)
<< "labels_upper_bound cannot be empty";
CHECK_EQ(preds.Size(), info.labels_lower_bound_.Size());
CHECK_EQ(preds.Size(), info.labels_upper_bound_.Size());

Expand Down
3 changes: 1 addition & 2 deletions tests/python/test_with_dask.py
Expand Up @@ -594,7 +594,6 @@ def test_predict_with_meta(client):


def run_aft_survival(client, dmatrix_t):
# survival doesn't handle empty dataset well.
df = dd.read_csv(os.path.join(tm.PROJECT_ROOT, 'demo', 'data',
'veterans_lung_cancer.csv'))
y_lower_bound = df['Survival_label_lower_bound']
Expand Down Expand Up @@ -632,7 +631,7 @@ def run_aft_survival(client, dmatrix_t):


def test_aft_survival():
with LocalCluster(n_workers=1) as cluster:
with LocalCluster(n_workers=kWorkers) as cluster:
with Client(cluster) as client:
run_aft_survival(client, DaskDMatrix)

Expand Down