Repository navigation
Include "region" in key names for da.store - #3540
Conversation
|
Note that you would still get the same key if you stored data into two different stores, but we can't rightly hash those stores, since, by their nature, they may be massive and/or remote. |
92f24e3 to
f5daf89
Compare
| slices = [fuse_slice(region, slc) for slc in slices] | ||
|
|
||
| name = 'store-%s' % arr.name | ||
| name = 'store-%s' % arr.name + tokenize(region) |
There was a problem hiding this comment.
In other operations we tend to include the input in tokenize rather than extend the name. Otherwise names can grow fairly long.
|
cc @jakirkham for review |
|
Thanks @martindurant. Agree this should be fixed. Think we should consider using a UUID instead as there have been some issues like this one ( #2837 ) where storage doesn't occur if the same Dask Array is written to multiple locations. |
Allows storing of data into many targets without clash
|
@jakirkham , like so? |
| insert_to_ooc(s, t, lock, r, return_stored, load_stored) | ||
| for s, t, r in zip(sources2, targets2, regions) | ||
| insert_to_ooc(s, t, lock, r, return_stored, load_stored, tok) | ||
| for s, t, r, tok in zip(sources2, targets2, regions, toks) |
There was a problem hiding this comment.
Would it be possible for us to pick up the names used to store these objects instead of hanging onto the UUIDs used to generate them? Admittedly the syntax I've added here makes that a bit hard. Feel free to change this or the insert_to_ooc function as needed.
There was a problem hiding this comment.
I don't think so, not easily - the input array name is not useful, because we want to store to multiple outputs, and the outputs don't have names and at best would be hashed. I think uuid is good, and ensures that the write happens even when repeating the identical operation - that seems like the right thing to do to me for something that is essentially a side-effect operation.
|
Thanks @martindurant. Yes the gist is good. Would say how the UUIDs are being managed currently is a bit convoluted, but this almost certainly my fault because of how the code is structured here currently. Feel free to change things around as needed to get the right behavior from this. |
|
@jakirkham , do you think that this can be considered ready as-is? I don't have much appetite to unravel the graph making. |
|
Yeah, I think that is reasonable. The bugs it fixes are pretty important. The issue noted above is pretty minor and is internal to Dask. We can revisit it later. Thanks @martindurant. :) |
|
Cool. |
* master: [array.linalg.qr] added sfqr (short-and-fat) as a counterpart to tsqr… (dask#3575) Drop Dask Array's `learn` module (dask#3580) Adds `isneginf` and `isposinf` (dask#3581) Update sizeof definitions (dask#3582) BUG: do not raise IndexError for identity slice in array.vindex (dask#3559) Correct internal dimension of Dask's SVD (dask#3517) Fix check in configuration with env=None (dask#3562) Dataframe sample method docstring fix (dask#3566) Include "region" in key names for da.store (dask#3540) # Conflicts: # dask/array/linalg.py # dask/array/tests/test_linalg.py
flake8 dask