Skip to content

Commit

Permalink
Fix importing apply from dask (#8517)
Browse files Browse the repository at this point in the history
As part of dask/dask#7801, `apply` has been removed from `dask.compatibility`, hence made changes in `dask_cudf` to import `apply` from `dask.utils`, this change is back-ward compatible to older versions of dask too.

Authors:
  - GALI PREM SAGAR (https://github.com/galipremsagar)

Approvers:
  - Benjamin Zaitlen (https://github.com/quasiben)
  - https://github.com/jakirkham
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: #8517
  • Loading branch information
galipremsagar authored Jun 15, 2021
1 parent 1314bd5 commit 7c8d847
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 18 deletions.
8 changes: 4 additions & 4 deletions ci/benchmark/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ conda install "rmm=$MINOR_VERSION.*" "cudatoolkit=$CUDA_REL" \
# conda install "your-pkg=1.0.0"

# Install the master version of dask, distributed, and streamz
logger "pip install git+https://github.com/dask/distributed.git@main --upgrade --no-deps"
pip install "git+https://github.com/dask/distributed.git@main" --upgrade --no-deps
logger "pip install git+https://github.com/dask/dask.git@main --upgrade --no-deps"
pip install "git+https://github.com/dask/dask.git@main" --upgrade --no-deps
logger "pip install git+https://github.com/dask/distributed.git@2021.06.0 --upgrade --no-deps"
pip install "git+https://github.com/dask/distributed.git@2021.06.0" --upgrade --no-deps
logger "pip install git+https://github.com/dask/dask.git@2021.06.0 --upgrade --no-deps"
pip install "git+https://github.com/dask/dask.git@2021.06.0" --upgrade --no-deps
logger "pip install git+https://github.com/python-streamz/streamz.git --upgrade --no-deps"
pip install "git+https://github.com/python-streamz/streamz.git" --upgrade --no-deps

Expand Down
4 changes: 2 additions & 2 deletions ci/gpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ function install_dask {
# Install the main version of dask, distributed, and streamz
gpuci_logger "Install the main version of dask, distributed, and streamz"
set -x
pip install "git+https://github.com/dask/distributed.git@main" --upgrade --no-deps
pip install "git+https://github.com/dask/dask.git@main" --upgrade --no-deps
pip install "git+https://github.com/dask/distributed.git@2021.06.0" --upgrade --no-deps
pip install "git+https://github.com/dask/dask.git@2021.06.0" --upgrade --no-deps
pip install "git+https://github.com/python-streamz/streamz.git" --upgrade --no-deps
set +x
}
Expand Down
4 changes: 2 additions & 2 deletions conda/environments/cudf_dev_cuda11.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ dependencies:
- cachetools
- transformers
- pip:
- git+https://github.com/dask/dask.git@main
- git+https://github.com/dask/distributed.git@main
- git+https://github.com/dask/dask.git@2021.06.0
- git+https://github.com/dask/distributed.git@2021.06.0
- git+https://github.com/python-streamz/streamz.git
- pyorc
4 changes: 2 additions & 2 deletions conda/environments/cudf_dev_cuda11.2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ dependencies:
- cachetools
- transformers
- pip:
- git+https://github.com/dask/dask.git@main
- git+https://github.com/dask/distributed.git@main
- git+https://github.com/dask/dask.git@2021.06.0
- git+https://github.com/dask/distributed.git@2021.06.0
- git+https://github.com/python-streamz/streamz.git
- pyorc
8 changes: 4 additions & 4 deletions conda/recipes/dask-cudf/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ function logger() {
}

# Install the latest version of dask and distributed
logger "pip install git+https://github.com/dask/distributed.git@main --upgrade --no-deps"
pip install "git+https://github.com/dask/distributed.git@main" --upgrade --no-deps
logger "pip install git+https://github.com/dask/distributed.git@2021.06.0 --upgrade --no-deps"
pip install "git+https://github.com/dask/distributed.git@2021.06.0" --upgrade --no-deps

logger "pip install git+https://github.com/dask/dask.git@main --upgrade --no-deps"
pip install "git+https://github.com/dask/dask.git@main" --upgrade --no-deps
logger "pip install git+https://github.com/dask/dask.git@2021.06.0 --upgrade --no-deps"
pip install "git+https://github.com/dask/dask.git@2021.06.0" --upgrade --no-deps

logger "python -c 'import dask_cudf'"
python -c "import dask_cudf"
3 changes: 1 addition & 2 deletions python/dask_cudf/dask_cudf/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import dask
from dask import dataframe as dd
from dask.base import normalize_token, tokenize
from dask.compatibility import apply
from dask.context import _globals
from dask.core import flatten
from dask.dataframe.core import (
Expand All @@ -24,7 +23,7 @@
from dask.dataframe.utils import raise_on_meta_error
from dask.highlevelgraph import HighLevelGraph
from dask.optimization import cull, fuse
from dask.utils import M, OperatorMethodMixin, derived_from, funcname
from dask.utils import M, OperatorMethodMixin, apply, derived_from, funcname

import cudf
from cudf import _lib as libcudf
Expand Down
3 changes: 1 addition & 2 deletions python/dask_cudf/dask_cudf/io/csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@

from dask import dataframe as dd
from dask.base import tokenize
from dask.compatibility import apply
from dask.dataframe.io.csv import make_reader
from dask.utils import parse_bytes
from dask.utils import apply, parse_bytes

import cudf

Expand Down

0 comments on commit 7c8d847

Please sign in to comment.