-
-
Notifications
You must be signed in to change notification settings - Fork 719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Numba serialization is slow sometimes #7289
Comments
OK, we have a numba function inside of a SubgraphCallable. We're serializing the same SubgraphCallable many times. This is a bit odd because the SubgraphCallable is exactly the same, except for the |
OK, it looks like we don't generate SubgraphCallables with lots of new keys, they're getting injected later if there are futures in the same unpack because the unique names of these futures get injected. I think that maybe we don't even care about the names of these futures, and instead just want some generic token. The code below probably breaks things, but it seems to work in my example. index c06d3697..c74dd340 100644
--- a/distributed/utils_comm.py
+++ b/distributed/utils_comm.py
@@ -213,7 +213,16 @@ def unpack_remotedata(o, byte_keys=False, myset=None):
if byte_keys
else tuple(f.key for f in futures)
)
- inkeys = sc.inkeys + futures
+ s = str(dsk)
+ inkeys = list(sc.inkeys)
+ for future in futures:
+ if future in s: # does this ever happen?
+ inkeys.append(future)
+ breakpoint()
+ else:
+ inkeys.append("_")
return (
(SubgraphCallable(dsk, sc.outkey, inkeys, sc.name),)
+ args @seibert @ianthomas23 sorry for pinging you. This is definitely an internal Dask issue. cc'ing also @rjzamora due to HLGs |
I'm using Dask + Datashader over here: https://github.com/mrocklin/dask-tutorial/blob/main/2-dataframes-at-scale.ipynb
I'm finding that I'm spending around 20s serializing things, this is mostly in some strange cloudpickle/numba interaction, particularly in numba/cloudpickle.py/cloudpickle_fast. In a dataframe with 800 partitions this gets called 67529 times, and apparently each time is fairly slow.
cc @ianthomas23 @fjetter @seibert
The text was updated successfully, but these errors were encountered: