From 14d56d02432a79646f7c772080ccaf2780bda1fb Mon Sep 17 00:00:00 2001 From: galipremsagar Date: Thu, 3 Jun 2021 12:29:48 -0700 Subject: [PATCH 1/2] add make_meta handling --- dask_cuda/proxy_object.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dask_cuda/proxy_object.py b/dask_cuda/proxy_object.py index 36592526c..0f8366322 100644 --- a/dask_cuda/proxy_object.py +++ b/dask_cuda/proxy_object.py @@ -23,6 +23,13 @@ except ImportError: from dask.dataframe.methods import concat_pandas +try: + from dask.dataframe.dispatch import ( + make_meta_dispatch as make_meta_dispatch, + ) +except ImportError: + from dask.dataframe.utils import make_meta as make_meta_dispatch + from .get_device_memory_objects import get_device_memory_objects from .is_device_object import is_device_object @@ -732,7 +739,7 @@ def wrapper(*args, **kwargs): # Register dispatch of ProxyObject on all known dispatch objects for dispatch in ( dask.dataframe.core.hash_object_dispatch, - dask.dataframe.utils.make_meta, + make_meta_dispatch, dask.dataframe.utils.make_scalar, dask.dataframe.core.group_split_dispatch, dask.array.core.tensordot_lookup, From f0d44189f0af007844277c1d5b471daee4110472 Mon Sep 17 00:00:00 2001 From: galipremsagar Date: Thu, 3 Jun 2021 12:38:32 -0700 Subject: [PATCH 2/2] black --- dask_cuda/proxy_object.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dask_cuda/proxy_object.py b/dask_cuda/proxy_object.py index 0f8366322..649f400ed 100644 --- a/dask_cuda/proxy_object.py +++ b/dask_cuda/proxy_object.py @@ -24,9 +24,7 @@ from dask.dataframe.methods import concat_pandas try: - from dask.dataframe.dispatch import ( - make_meta_dispatch as make_meta_dispatch, - ) + from dask.dataframe.dispatch import make_meta_dispatch as make_meta_dispatch except ImportError: from dask.dataframe.utils import make_meta as make_meta_dispatch