Skip to content

Commit

Permalink
Clean up by @pentschev
Browse files Browse the repository at this point in the history
Co-authored-by: Peter Andreas Entschev <[email protected]>
  • Loading branch information
madsbk and pentschev authored Sep 8, 2021
1 parent a4fdb60 commit 5c4ca1a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions dask_cuda/proxify_device_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,8 @@ def wrapper(*args, **kwargs):
def proxify(obj, proxied_id_to_proxy, found_proxies, subclass=None):
_id = id(obj)
if _id not in proxied_id_to_proxy:
proxied_id_to_proxy[_id] = ret = asproxy(obj, subclass=subclass)
else:
ret = proxied_id_to_proxy[_id]
proxied_id_to_proxy[_id] = asproxy(obj, subclass=subclass)
ret = proxied_id_to_proxy[_id]
found_proxies.append(ret)
return ret

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 @@ -133,7 +133,7 @@ class ProxyManager:
memory usage. It turns out having to re-calculate memory usage continuously
is too expensive.
The idea is to have the ProxifyHostFile or the proxies themself update
The idea is to have the ProxifyHostFile or the proxies themselves update
their location (device or host). The manager then tallies the total memory usage.
Notice, the manager only keeps weak references to the proxies.
Expand Down
2 changes: 1 addition & 1 deletion dask_cuda/proxy_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def __repr__(self):
return ret

@property # type: ignore # mypy doesn't support decorated property
@_obj_pxy_cache_wrapper("type_serialized") #
@_obj_pxy_cache_wrapper("type_serialized")
def __class__(self):
return pickle.loads(self._obj_pxy["type_serialized"])

Expand Down

0 comments on commit 5c4ca1a

Please sign in to comment.