Skip to content

Commit

Permalink
fix type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
madsbk committed Feb 12, 2021
1 parent 0751c4b commit f18137b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions dask_cuda/proxify_device_objects.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Dict, List
from typing import Any, List, MutableMapping

from dask.utils import Dispatch

Expand All @@ -9,7 +9,7 @@

def proxify_device_objects(
obj: Any,
proxied_id_to_proxy: Dict[int, ProxyObject],
proxied_id_to_proxy: MutableMapping[int, ProxyObject],
found_proxies: List[ProxyObject],
):
""" Wrap device objects in ProxyObject
Expand All @@ -22,7 +22,7 @@ def proxify_device_objects(
----------
obj: Any
Object to search through or wrap in a ProxyObject.
proxied_id_to_proxy: Dict[int, ProxyObject]
proxied_id_to_proxy: MutableMapping[int, ProxyObject]
Dict mapping the id() of proxied objects (CUDA device objects) to
their proxy and is updated with all new proxied objects found in `obj`.
found_proxies: List[ProxyObject]
Expand Down
2 changes: 1 addition & 1 deletion dask_cuda/proxify_host_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def get_dev_buffer_to_proxies(self) -> DefaultDict[Hashable, List[ProxyObject]]:
with self.lock:
# Notice, multiple proxy object can point to different non-overlapping
# parts of the same device buffer.
ret = DefaultDict(list)
ret = defaultdict(list)
for proxy in self.proxies_tally.get_unspilled_proxies():
for dev_buffer in proxy._obj_pxy_get_device_memory_objects():
ret[dev_buffer].append(proxy)
Expand Down

0 comments on commit f18137b

Please sign in to comment.