Skip to content
This repository was archived by the owner on Jul 16, 2019. It is now read-only.

Inherit from Dask Dataframe and respond to cudf update#48

Merged
mrocklin merged 5 commits into
rapidsai:masterfrom
mrocklin:dask-cudf-update
Dec 17, 2018
Merged

Inherit from Dask Dataframe and respond to cudf update#48
mrocklin merged 5 commits into
rapidsai:masterfrom
mrocklin:dask-cudf-update

Conversation

@mrocklin

Copy link
Copy Markdown
Contributor

This is a large refactor with a variety of changes:

  1. We now depend on the mainline dask dataframe codebase,
    This allows us to reuse existing code and should make it easier to bring
    over existing functionality in the future, but adds the expectation that
    cudf and pandas will look more alike in the future.

  2. We change the default scheduler to single-threaded.

    This is because some parts of cudf seem to not be threadsafe
    (we'll raise an issue for this and handle it in followup work)

  3. We xfail many of the tests in groupby and categoricals,
    which seem to be failing regardless

Supercedes #43

This is a large refactor with a variety of changes:

1.  We now depend on the mainline dask dataframe codebase,
    This allows us to reuse existing code and should make it easier to bring
    over existing functionality in the future, but adds the expectation that
    cudf and pandas will look more alike in the future.

2.  We change the default scheduler to single-threaded.

    This is because some parts of cudf seem to not be threadsafe
    (we'll raise an issue for this and handle it in followup work)

3.  We xfail many of the tests in groupby and categoricals,
    which seem to be failing regardless
Groupbys are going to fail until we get better cudf/pandas parity

Other tests have to be run in single threaded mode until
rapidsai/cudf#528 is resolved
@mrocklin

Copy link
Copy Markdown
Contributor Author

To be clear, we're losing functionality here relative to previous releases (assuming that they're pinned to previous cudf releases). I think that this is a win generally though. It will actually work with the recent cudf release, and puts us on track to move forward more quickly.

However, we are making a bet here that cudf will start to adhere more strongly to pandas semantics, which may not actually occur.

@randerzander

randerzander commented Dec 15, 2018

Copy link
Copy Markdown
Contributor

@mrocklin thanks for this PR. When trying it out with cudf/branch-0.5, I notice the following:

from dask.distributed import Client
from dask.delayed import delayed
import dask.dataframe as dd
import dask_cudf
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-2-3c55a73a0651> in <module>
      3 from dask.delayed import delayed
      4 import dask.dataframe as dd
----> 5 import dask_cudf

/conda/envs/cudf/lib/python3.5/site-packages/dask_cudf-0.0.1+218.gc3729ba-py3.5.egg/dask_cudf/__init__.py in <module>
----> 1 from .core import DataFrame, Series, from_cudf, from_dask_dataframe, concat, \
      2     from_delayed
      3 
      4 from cudf._version import get_versions
      5 __version__ = get_versions()['version']

/conda/envs/cudf/lib/python3.5/site-packages/dask_cudf-0.0.1+218.gc3729ba-py3.5.egg/dask_cudf/core.py in <module>
    918 
    919 
--> 920 @dd.core.get_parallel_type.register(cudf.DataFrame)
    921 def get_parallel_type_dataframe(_):
    922     return DataFrame

AttributeError: module 'dask.dataframe.core' has no attribute 'get_parallel_type'

I'm running Dask '0.19.2'. Is there a particular version I should use instead?

@mrocklin

mrocklin commented Dec 15, 2018 via email

Copy link
Copy Markdown
Contributor Author

@mrocklin

Copy link
Copy Markdown
Contributor Author

@randerzander I'm curious if things ended up working out for you here, or if there were other issues that you encountered.

Comment thread dask_cudf/core.py Outdated
@mrocklin

Copy link
Copy Markdown
Contributor Author

@kkraus14 can I have commit access to this repository?

@kkraus14

Copy link
Copy Markdown
Contributor

@kkraus14 can I have commit access to this repository?

Should be done, let me know if you see otherwise.

@mrocklin
mrocklin merged commit 29e5977 into rapidsai:master Dec 17, 2018
@mrocklin
mrocklin deleted the dask-cudf-update branch December 17, 2018 21:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants