@pytest.mark.parametrize('y', [[0, 1, 1, 0], [0, 1, 2, 0]])
def test_log_loss_scoring(y):
    X = da.random.uniform(size=(4, 2), chunks=2)
    labels = np.unique(y)
    y = da.from_array(np.array(y), chunks=2)
    a_scorer = sklearn.metrics.make_scorer(sklearn.metrics.log_loss, greater_is_better=False, needs_proba=True, labels=labels)
    b_scorer = sklearn.metrics.make_scorer(dask_ml.metrics.log_loss, greater_is_better=False, needs_proba=True, labels=labels)
    clf = dask_ml.wrappers.ParallelPostFit(sklearn.linear_model.LogisticRegression(n_jobs=1, solver='lbfgs', multi_class='auto'))
    clf.fit(*dask.compute(X, y))
    result = b_scorer(clf, X, y)
    expected = a_scorer(clf, *dask.compute(X, y))
    assert_eq(result, expected)
@pytest.mark.parametrize('y', [[0, 1, 1, 0], [0, 1, 2, 0]])
def test_log_loss_scoring(y):
    X = da.random.uniform(size=(4, 2), chunks=2)
    labels = np.unique(y)
    y = da.from_array(np.array(y), chunks=2)
    a_scorer = sklearn.metrics.make_scorer(sklearn.metrics.log_loss, greater_is_better=False, needs_proba=True, labels=labels)
    b_scorer = sklearn.metrics.make_scorer(dask_ml.metrics.log_loss, greater_is_better=False, needs_proba=True, labels=labels)
    clf = dask_ml.wrappers.ParallelPostFit(sklearn.linear_model.LogisticRegression(n_jobs=1, solver='lbfgs', multi_class='auto'))
    clf.fit(*dask.compute(X, y))
    result = b_scorer(clf, X, y)
    expected = a_scorer(clf, *dask.compute(X, y))
    assert_eq(result, expected)