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

Lazily register more cudf functions and move to backends file #4396

Merged
merged 4 commits into from Jan 23, 2019

Conversation

mrocklin
Copy link
Member

This also builds on #4395

This is a bit nicer than `isinstance(obj, parallel_types())` because it
works also with lazily registered types.
This collects lazily registered functions for cupy, sparse, scipy, and
cudf.
@mrocklin mrocklin changed the title Lazily register more cudf functions Lazily register more cudf functions and move to backends file Jan 17, 2019
@mrocklin
Copy link
Member Author

I've now moved these (and other lazily registered backend functions) to a separate backends.py file in each collection.

@mrocklin
Copy link
Member Author

@jcrist do you have thoughts on this?

Pinging you because I think you're more likely to have a critical eye here.

@mrocklin
Copy link
Member Author

The challenge I ran into is that I would put these in a project like dask-cudf, and they would work properly on one machine, but once I moved things to another worker dask-cudf wouldn't be explicitly imported and so we wouldn't have these. Moving them as lazy-imports into dask is sort of a sledge-hammer solution. It will definitely work, but it probably isn't a good solution long-term as different projects maintain their bindings in our code.

Another approach to this would be to register worker-plugins (I started dask/distributed#2453 for this) but I'm somewhat inclined to continue with the "just import things in dask" approach for a while longer while we figure out something cleaner.

@mrocklin
Copy link
Member Author

Merging this later today if there are no further comments.

@mrocklin mrocklin merged commit 346cb76 into dask:master Jan 23, 2019
@mrocklin mrocklin deleted the more-register-cudf branch January 23, 2019 01:42
jorge-pessoa pushed a commit to jorge-pessoa/dask that referenced this pull request May 14, 2019
)

* Add has_parallel_type

This is a bit nicer than `isinstance(obj, parallel_types())` because it
works also with lazily registered types.

* Add more cudf lazy registrations

* Add explicit backends.py files in dask.array/dataframe

This collects lazily registered functions for cupy, sparse, scipy, and
cudf.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant