Skip to content

Some LabelEncoder tests failing #333

Closed

Description

@TomAugspurger
tests/preprocessing/test_label.py::TestLabelEncoder::test_transform[array1] FAILED                                                                   [ 25%]
tests/preprocessing/test_label.py::TestLabelEncoder::test_transform_dtypes[array2] FAILED                                                            [ 50%]
tests/preprocessing/test_label.py::TestLabelEncoder::test_inverse_transform[array1] FAILED                                                           [ 75%]
tests/preprocessing/test_label.py::TestLabelEncoder::test_use_categorical[True] FAILED                                                               [100%]

========================================================================= FAILURES =========================================================================
_________________________________________________________ TestLabelEncoder.test_transform[array1] __________________________________________________________
tests/preprocessing/test_label.py:64: in test_transform
    a.fit(array)
dask_ml/preprocessing/label.py:112: in fit
    y = self._check_array(y)
dask_ml/preprocessing/label.py:108: in _check_array
    y = da.asarray(y)
../dask/dask/array/core.py:3323: in asarray
    return from_array(a, chunks=a.shape, getitem=getter_inline)
../dask/dask/array/core.py:2335: in from_array
    chunks = normalize_chunks(chunks, x.shape, dtype=x.dtype)
../dask/dask/array/core.py:2128: in normalize_chunks
    chunks = auto_chunks(chunks, shape, limit, dtype, previous_chunks)
../dask/dask/array/core.py:2199: in auto_chunks
    "Can not use auto rechunking with object dtype. "
E   NotImplementedError: Can not use auto rechunking with object dtype. We are unable to estimate the size in bytes of object data
______________________________________________________ TestLabelEncoder.test_transform_dtypes[array2] ______________________________________________________
tests/preprocessing/test_label.py:71: in test_transform_dtypes
    result = dpp.LabelEncoder().fit_transform(array)
dask_ml/preprocessing/label.py:128: in fit_transform
    y = self._check_array(y)
dask_ml/preprocessing/label.py:108: in _check_array
    y = da.asarray(y)
../dask/dask/array/core.py:3323: in asarray
    return from_array(a, chunks=a.shape, getitem=getter_inline)
../dask/dask/array/core.py:2335: in from_array
    chunks = normalize_chunks(chunks, x.shape, dtype=x.dtype)
../dask/dask/array/core.py:2128: in normalize_chunks
    chunks = auto_chunks(chunks, shape, limit, dtype, previous_chunks)
../dask/dask/array/core.py:2199: in auto_chunks
    "Can not use auto rechunking with object dtype. "
E   NotImplementedError: Can not use auto rechunking with object dtype. We are unable to estimate the size in bytes of object data
_____________________________________________________ TestLabelEncoder.test_inverse_transform[array1] ______________________________________________________
tests/preprocessing/test_label.py:86: in test_inverse_transform
    assert_eq_ar(a.inverse_transform(a.fit_transform(array)), da.asarray(array))
dask_ml/preprocessing/label.py:128: in fit_transform
    y = self._check_array(y)
dask_ml/preprocessing/label.py:108: in _check_array
    y = da.asarray(y)
../dask/dask/array/core.py:3323: in asarray
    return from_array(a, chunks=a.shape, getitem=getter_inline)
../dask/dask/array/core.py:2335: in from_array
    chunks = normalize_chunks(chunks, x.shape, dtype=x.dtype)
../dask/dask/array/core.py:2128: in normalize_chunks
    chunks = auto_chunks(chunks, shape, limit, dtype, previous_chunks)
../dask/dask/array/core.py:2199: in auto_chunks
    "Can not use auto rechunking with object dtype. "
E   NotImplementedError: Can not use auto rechunking with object dtype. We are unable to estimate the size in bytes of object data
_______________________________________________________ TestLabelEncoder.test_use_categorical[True] ________________________________________________________
tests/preprocessing/test_label.py:138: in test_use_categorical
    a = dpp.LabelEncoder(use_categorical=False).fit(data)
dask_ml/preprocessing/label.py:112: in fit
    y = self._check_array(y)
dask_ml/preprocessing/label.py:97: in _check_array
    y = da.asarray(y)
../dask/dask/array/core.py:3323: in asarray
    return from_array(a, chunks=a.shape, getitem=getter_inline)
../dask/dask/array/core.py:2335: in from_array
    chunks = normalize_chunks(chunks, x.shape, dtype=x.dtype)
../dask/dask/array/core.py:2102: in normalize_chunks
    dtype = np.dtype(dtype)
E   TypeError: data type not understood
========================================================= 4 failed, 28 deselected in 1.11 seconds ==========================================================

haven't looked into why yet.

Activity

  1. TomAugspurger commented on Aug 18, 2018

    @TomAugspurger
    MemberAuthor

    dask/dask#3885 for the upstream issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions