From 66b77953f90d973084a4993d02d2c55cc22213ca Mon Sep 17 00:00:00 2001 From: Peter Andreas Entschev Date: Tue, 29 Jun 2021 10:52:47 +0200 Subject: [PATCH] Update parse_bytes imports to resolve deprecation warnings (#662) Resolves deprecation warnings such as the one below: ```python FutureWarning: parse_bytes is deprecated and will be removed in a future release. Please use dask.utils.parse_bytes instead. from distributed.utils import parse_bytes ``` Authors: - Peter Andreas Entschev (https://github.com/pentschev) Approvers: - Jacob Tomlinson (https://github.com/jacobtomlinson) URL: https://github.com/rapidsai/dask-cuda/pull/662 --- dask_cuda/cuda_worker.py | 2 +- dask_cuda/local_cuda_cluster.py | 4 ++-- dask_cuda/utils.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dask_cuda/cuda_worker.py b/dask_cuda/cuda_worker.py index 999c6a2ca..fd74dddde 100644 --- a/dask_cuda/cuda_worker.py +++ b/dask_cuda/cuda_worker.py @@ -9,6 +9,7 @@ from tornado.ioloop import IOLoop import dask +from dask.utils import parse_bytes from distributed import Nanny from distributed.core import Server from distributed.deploy.cluster import Cluster @@ -16,7 +17,6 @@ enable_proctitle_on_children, enable_proctitle_on_current, ) -from distributed.utils import parse_bytes from distributed.worker import parse_memory_limit from .device_host_file import DeviceHostFile diff --git a/dask_cuda/local_cuda_cluster.py b/dask_cuda/local_cuda_cluster.py index 34e009115..0276a4b6b 100644 --- a/dask_cuda/local_cuda_cluster.py +++ b/dask_cuda/local_cuda_cluster.py @@ -3,8 +3,8 @@ import warnings import dask -from dask.distributed import LocalCluster, Nanny, Worker -from distributed.utils import parse_bytes +from dask.utils import parse_bytes +from distributed import LocalCluster, Nanny, Worker from distributed.worker import parse_memory_limit from .device_host_file import DeviceHostFile diff --git a/dask_cuda/utils.py b/dask_cuda/utils.py index dd8554870..9c6c4dcff 100644 --- a/dask_cuda/utils.py +++ b/dask_cuda/utils.py @@ -9,8 +9,8 @@ import pynvml import toolz +from dask.utils import parse_bytes from distributed import Worker, wait -from distributed.utils import parse_bytes try: from nvtx import annotate as nvtx_annotate